From 0bd1b820f6cc5691df6a79e97160590bc5789519 Mon Sep 17 00:00:00 2001 From: Tobrun Date: Tue, 6 Jun 2017 09:21:18 +0200 Subject: [android] - remove upgrade runtime exceptions (#9191) --- .../main/java/com/mapbox/mapboxsdk/maps/MapView.java | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'platform/android') diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java index cf1841e180..19cad1d8e0 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java @@ -69,8 +69,6 @@ public class MapView extends FrameLayout { private MapboxMap mapboxMap; private MapCallback mapCallback; - private boolean onStartCalled; - private boolean onStopCalled; private MapGestureDetector mapGestureDetector; private MapKeyListener mapKeyListener; @@ -242,7 +240,6 @@ public class MapView extends FrameLayout { */ @UiThread public void onStart() { - onStartCalled = true; mapboxMap.onStart(); ConnectivityReceiver.instance(getContext()).activate(); } @@ -252,11 +249,7 @@ public class MapView extends FrameLayout { */ @UiThread public void onResume() { - if (!onStartCalled) { - // TODO: 26/10/16, can be removed after 5.0.0 release - throw new IllegalStateException("MapView#onStart() was not called. " - + "You must call this method from the parent's {@link Activity#onStart()} or {@link Fragment#onStart()}."); - } + // replaced by onStart in v5.0.0 } /** @@ -264,7 +257,7 @@ public class MapView extends FrameLayout { */ @UiThread public void onPause() { - // replaced by onStop in v5.0.0, keep around for future development + // replaced by onStop in v5.0.0 } /** @@ -272,7 +265,6 @@ public class MapView extends FrameLayout { */ @UiThread public void onStop() { - onStopCalled = true; mapboxMap.onStop(); ConnectivityReceiver.instance(getContext()).deactivate(); } @@ -282,12 +274,6 @@ public class MapView extends FrameLayout { */ @UiThread public void onDestroy() { - if (!onStopCalled) { - // TODO: 26/10/16, can be removed after 5.0.0 release - throw new IllegalStateException("MapView#onStop() was not called. " - + "You must call this method from the parent's {@link Activity#onStop()} or {@link Fragment#onStop()}."); - } - destroyed = true; nativeMapView.terminateContext(); nativeMapView.terminateDisplay(); -- cgit v1.2.1