Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 632a8364 authored by Fynn Godau's avatar Fynn Godau
Browse files

Fix lite mode map instance restoration crash

This fixes a crash in the sample app
parent ff8baba0
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr

            if (savedInstanceState?.containsKey(BUNDLE_CAMERA_POSITION) == true) {
                cameraPosition = savedInstanceState.getParcelable(BUNDLE_CAMERA_POSITION)!!
                cameraBounds = savedInstanceState.getParcelable(BUNDLE_CAMERA_BOUNDS)
                cameraBounds = (savedInstanceState.getParcelable(BUNDLE_CAMERA_BOUNDS) as LatLngBounds?)?.toMapbox()
            }

            postUpdateSnapshot()
@@ -616,7 +616,7 @@ class LiteGoogleMapImpl(context: Context, var options: GoogleMapOptions) : Abstr

    override fun onSaveInstanceState(outState: Bundle) {
        outState.putParcelable(BUNDLE_CAMERA_POSITION, cameraPosition)
        outState.putParcelable(BUNDLE_CAMERA_BOUNDS, cameraBounds)
        outState.putParcelable(BUNDLE_CAMERA_BOUNDS, cameraBounds?.toGms())
    }

    override fun setContentDescription(desc: String?) {