Skip to content

Commit 31d2d19

Browse files
authored
fix: activity added to manifest, state saving fix (#416)
1 parent 6c04988 commit 31d2d19

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ApiDemos/kotlin/app/src/gms/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
<activity android:name=".UiSettingsDemoActivity" />
5757
<activity android:name=".VisibleRegionDemoActivity"/>
5858
<activity android:name=".polyline.PolylineDemoActivity" />
59+
<activity android:name=".RawMapViewDemoActivity" />
5960
</application>
6061

6162
</manifest>

ApiDemos/kotlin/app/src/gms/java/com/example/kotlindemos/RawMapViewDemoActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class RawMapViewDemoActivity : AppCompatActivity(), OnMapReadyCallback {
4343

4444
override fun onSaveInstanceState(outState: Bundle) {
4545
super.onSaveInstanceState(outState)
46-
val mapViewBundle = outState.getBundle(MAPVIEW_BUNDLE_KEY) ?: Bundle().apply {
47-
putBundle(MAPVIEW_BUNDLE_KEY, this)
46+
val mapViewBundle = outState.getBundle(MAPVIEW_BUNDLE_KEY) ?: Bundle().also {
47+
outState.putBundle(MAPVIEW_BUNDLE_KEY, it)
4848
}
4949
mapView.onSaveInstanceState(mapViewBundle)
5050
}

0 commit comments

Comments
 (0)