diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-12-21 14:01:32 +0100 |
---|---|---|
committer | tobrun <tobrun.van.nuland@gmail.com> | 2018-12-21 14:01:32 +0100 |
commit | a795e6deed41db2ab131eefc0ef77ff668470b1e (patch) | |
tree | 635d1c30b1a33b49e69cbe94ad59d77b724cc0ae | |
parent | edf33c8a1c0aaac25b75500c284ab76c4bcdc2c6 (diff) | |
download | qtlocation-mapboxgl-upstream/tvn-cache-debug-state.tar.gz |
[android] - save debug cache state vs map stateupstream/tvn-cache-debug-state
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index a94bc0874b..dcd40326aa 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -75,6 +75,8 @@ public final class MapboxMap { @Nullable private Style style; + private boolean debugActive; + MapboxMap(NativeMapView map, Transform transform, UiSettings ui, Projection projection, OnGesturesManagerInteractionListener listener, CameraChangeDispatcher cameraChangeDispatcher) { this.nativeMapView = map; @@ -145,7 +147,7 @@ public final class MapboxMap { */ void onSaveInstanceState(@NonNull Bundle outState) { outState.putParcelable(MapboxConstants.STATE_CAMERA_POSITION, transform.getCameraPosition()); - outState.putBoolean(MapboxConstants.STATE_DEBUG_ACTIVE, nativeMapView.getDebug()); + outState.putBoolean(MapboxConstants.STATE_DEBUG_ACTIVE, isDebugActive()); uiSettings.onSaveInstanceState(outState); } @@ -696,7 +698,7 @@ public final class MapboxMap { * @return If true, map debug information is currently shown. */ public boolean isDebugActive() { - return nativeMapView.getDebug(); + return debugActive; } /** @@ -708,6 +710,7 @@ public final class MapboxMap { * @param debugActive If true, map debug information is shown. */ public void setDebugActive(boolean debugActive) { + this.debugActive = debugActive; nativeMapView.setDebug(debugActive); } @@ -722,6 +725,7 @@ public final class MapboxMap { */ public void cycleDebugOptions() { nativeMapView.cycleDebugOptions(); + this.debugActive = nativeMapView.getDebug(); } // |