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

Verified Commit 73aca6ea authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Various fixes and improvements to Maps API

parent 73fd85a8
Loading
Loading
Loading
Loading
Compare 7197b832 to bfe649fc
Original line number Diff line number Diff line
Subproject commit 7197b8320b4e6d55d15b76d4faf05adaba36bf72
Subproject commit bfe649fc36a40e2498f1ecf123edfb9278fe0a1d
+292 −96

File changed.

Preview size limit exceeded, changes collapsed.

+29 −15

File changed.

Preview size limit exceeded, changes collapsed.

+9 −6
Original line number Diff line number Diff line
@@ -28,25 +28,28 @@ import com.google.android.gms.maps.internal.IMapViewDelegate
import com.google.android.gms.maps.internal.IOnMapReadyCallback

class MapViewImpl(private val context: Context, options: GoogleMapOptions?) : IMapViewDelegate.Stub() {
    private val options: GoogleMapOptions
    private var map: GoogleMapImpl? = null

    init {
        this.options = options ?: GoogleMapOptions()
    }
    private val options: GoogleMapOptions = options ?: GoogleMapOptions()
    private var map: GoogleMapImpl? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        Log.d(TAG, "onCreate: ${options?.camera?.target}")
        map = GoogleMapImpl(context, options)
        map?.onCreate(savedInstanceState)
        map!!.onCreate(savedInstanceState)
    }

    override fun getMap(): IGoogleMapDelegate? = map
    override fun onEnterAmbient(bundle: Bundle?) = map?.onEnterAmbient(bundle) ?: Unit
    override fun onExitAmbient() = map?.onExitAmbient() ?: Unit
    override fun onStart() = map?.onStart() ?: Unit
    override fun onStop() = map?.onStop() ?: Unit
    override fun onResume() = map?.onResume() ?: Unit
    override fun onPause() = map?.onPause() ?: Unit
    override fun onDestroy() {
        map?.onDestroy()
        map = null
    }

    override fun onLowMemory() = map?.onLowMemory() ?: Unit
    override fun onSaveInstanceState(outState: Bundle) = map?.onSaveInstanceState(outState) ?: Unit
    override fun getView(): IObjectWrapper = ObjectWrapper.wrap(map?.view)
+11 −6

File changed.

Preview size limit exceeded, changes collapsed.

Loading