diff --git a/.gitignore b/.gitignore index 25ed36579e55c761b041e34335f918f78abb11e5..08f6e53da21cf2b5881c60c9a1738cac0621ac28 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,8 @@ build/ user.gradle local.properties .directory +bin/ +.project +.classpath +.output/ +.settings/ diff --git a/extern/GmsApi b/extern/GmsApi index 09bf9494038ab53e0b86d8699db409b955fe3c0c..c6448e7c55ff95c49a6affe2e514ef96b0a30bf3 160000 --- a/extern/GmsApi +++ b/extern/GmsApi @@ -1 +1 @@ -Subproject commit 09bf9494038ab53e0b86d8699db409b955fe3c0c +Subproject commit c6448e7c55ff95c49a6affe2e514ef96b0a30bf3 diff --git a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt index b31472cb446c847765d7700d7ef3af5963b47739..3025263b80f39f0bae205551938b147e37af32ea 100644 --- a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt +++ b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt @@ -210,6 +210,11 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions) override fun stopAnimation() = map?.cancelTransitions() ?: Unit + override fun setMapStyle(options: MapStyleOptions?): Boolean { + Log.d(TAG, "setMapStyle options: " + options?.getJson()) + return true + } + override fun setMinZoomPreference(minZoom: Float) { map?.setMinZoomPreference(minZoom.toDouble() - 1) } @@ -436,7 +441,7 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions) } - override fun snapshot(callback: ISnapshotReadyCallback, bitmap: IObjectWrapper) { + override fun snapshot(callback: ISnapshotReadyCallback, bitmap: IObjectWrapper?) { Log.d(TAG, "unimplemented Method: snapshot") } @@ -678,23 +683,33 @@ class GoogleMapImpl(private val context: Context, var options: GoogleMapOptions) override fun onResume() = mapView?.onResume() ?: Unit override fun onPause() = mapView?.onPause() ?: Unit override fun onDestroy() { - Log.d(TAG, "destroy"); + Log.d(TAG, "destroy") circleManager?.onDestroy() circleManager = null + lineManager?.onDestroy() lineManager = null + fillManager?.onDestroy() fillManager = null + symbolManager?.onDestroy() symbolManager = null + pendingMarkers.clear() markers.clear() + BitmapDescriptorFactoryImpl.unregisterMap(map) + view.removeView(mapView) + // TODO can crash? mapView?.onDestroy() mapView = null - map = null + + // Don't make it null; this object is not deleted immediately, and it may want to access map.* stuff + //map = null + created = false initialized = false loaded = false diff --git a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/MapView.kt b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/MapView.kt index 572eba6f5ef15ea6ab738ab8752940229616332b..9aa8bfd1415dd98b2ca3c505f352aa6bd05dd097 100644 --- a/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/MapView.kt +++ b/play-services-maps-core-mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/MapView.kt @@ -46,6 +46,7 @@ class MapViewImpl(private val context: Context, options: GoogleMapOptions?) : IM override fun onResume() = map?.onResume() ?: Unit override fun onPause() = map?.onPause() ?: Unit override fun onDestroy() { + Log.d(TAG, "destroy") map?.onDestroy() map = null } diff --git a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java index b18189a4f196120dba07fc7d95e90d0945a8bc5c..f16d621f2a8d79da89dabdb9930b66bed002c5e5 100644 --- a/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java +++ b/play-services-maps-core-vtm/src/main/java/org/microg/gms/maps/vtm/GoogleMapImpl.java @@ -59,6 +59,7 @@ import com.google.android.gms.maps.model.CircleOptions; import com.google.android.gms.maps.model.GroundOverlayOptions; import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.MarkerOptions; +import com.google.android.gms.maps.model.MapStyleOptions; import com.google.android.gms.maps.model.PolygonOptions; import com.google.android.gms.maps.model.PolylineOptions; import com.google.android.gms.maps.model.TileOverlayOptions; @@ -210,6 +211,12 @@ public class GoogleMapImpl extends IGoogleMapDelegate.Stub } + @Override + public boolean setMapStyle(MapStyleOptions options) throws RemoteException { + Log.d(TAG, "unimplemented Method: setMapStyle"); + return true; + } + @Override public void setMinZoomPreference(float minZoom) throws RemoteException { Log.d(TAG, "unimplemented Method: setMinZoomPreference");