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

Commit e95a2e00 authored by Romain Hunault's avatar Romain Hunault
Browse files

Merge branch 'microg/master' into merge-upstream

parents 686ff938 73fd85a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -360,8 +360,8 @@ class GoogleMapImpl(private val context: Context, private val options: GoogleMap
        cameraIdleListener = listener
    }

    fun onCreate(savedInstanceState: Bundle) {
        mapView?.onCreate(savedInstanceState.toMapbox())
    fun onCreate(savedInstanceState: Bundle?) {
        mapView?.onCreate(savedInstanceState?.toMapbox())
        mapView?.getMapAsync(this::initMap)
    }

+2 −2
Original line number Diff line number Diff line
@@ -46,14 +46,14 @@ class MapFragmentImpl(private val activity: Activity) : IMapFragmentDelegate.Stu
        }
    }

    override fun onCreateView(layoutInflater: IObjectWrapper, container: IObjectWrapper, savedInstanceState: Bundle): IObjectWrapper {
    override fun onCreateView(layoutInflater: IObjectWrapper, container: IObjectWrapper, savedInstanceState: Bundle?): IObjectWrapper {
        if (map == null) {
            map = GoogleMapImpl(activity, options ?: GoogleMapOptions())
            map!!.onCreate(savedInstanceState)
            return ObjectWrapper.wrap(map!!.view)
        } else {
            val view = map!!.view
            val parent = view?.parent as ViewGroup
            val parent = view.parent as ViewGroup
            parent.removeView(view)
            return ObjectWrapper.wrap(view)
        }
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ class MapViewImpl(private val context: Context, options: GoogleMapOptions?) : IM
        this.options = options ?: GoogleMapOptions()
    }

    override fun onCreate(savedInstanceState: Bundle) {
    override fun onCreate(savedInstanceState: Bundle?) {
        map = GoogleMapImpl(context, options)
        map?.onCreate(savedInstanceState)
    }