Loading play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt +13 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG val waitingCameraUpdates = mutableListOf<CameraUpdate>() var locationEnabled: Boolean = false var isStarted = false init { BitmapDescriptorFactoryImpl.initialize(mapContext.resources, context.resources) LibraryLoader.setLibraryLoader(MultiArchLoader(mapContext, context)) Loading Loading @@ -459,8 +461,15 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG Log.e(TAG, "snapshot could not be taken because map is null") runOnMainLooper { callback.onBitmapWrappedReady(ObjectWrapper.wrap(null)) } } else { Log.d(TAG, "taking snapshot") onStart() // else snapshot fails silently if client app, like Signal, forgot to call onStart() if (!isStarted) { Log.w(TAG, "Caller did not call onStart() before taking snapshot. Calling onStart() now, for snapshot not to fail.") // Snapshots fail silently if onStart had not been called. This is the case with Signal. onStart() isStarted = true } Log.d(TAG, "taking snapshot now") map.snapshot { runOnMainLooper { Log.d(TAG, "snapshot ready, providing to application") Loading Loading @@ -788,10 +797,12 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG } override fun onStart() { isStarted = true mapView?.onStart() } override fun onStop() { isStarted = false mapView?.onStop() } Loading Loading
play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt +13 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG val waitingCameraUpdates = mutableListOf<CameraUpdate>() var locationEnabled: Boolean = false var isStarted = false init { BitmapDescriptorFactoryImpl.initialize(mapContext.resources, context.resources) LibraryLoader.setLibraryLoader(MultiArchLoader(mapContext, context)) Loading Loading @@ -459,8 +461,15 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG Log.e(TAG, "snapshot could not be taken because map is null") runOnMainLooper { callback.onBitmapWrappedReady(ObjectWrapper.wrap(null)) } } else { Log.d(TAG, "taking snapshot") onStart() // else snapshot fails silently if client app, like Signal, forgot to call onStart() if (!isStarted) { Log.w(TAG, "Caller did not call onStart() before taking snapshot. Calling onStart() now, for snapshot not to fail.") // Snapshots fail silently if onStart had not been called. This is the case with Signal. onStart() isStarted = true } Log.d(TAG, "taking snapshot now") map.snapshot { runOnMainLooper { Log.d(TAG, "snapshot ready, providing to application") Loading Loading @@ -788,10 +797,12 @@ class GoogleMapImpl(context: Context, var options: GoogleMapOptions) : AbstractG } override fun onStart() { isStarted = true mapView?.onStart() } override fun onStop() { isStarted = false mapView?.onStop() } Loading