Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - remove upgrade runtime exceptions (#9191)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun authored Jun 6, 2017
1 parent 99e71fe commit 0bd1b82
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -242,7 +240,6 @@ public void onSaveInstanceState(@NonNull Bundle outState) {
*/
@UiThread
public void onStart() {
onStartCalled = true;
mapboxMap.onStart();
ConnectivityReceiver.instance(getContext()).activate();
}
Expand All @@ -252,27 +249,22 @@ public void onStart() {
*/
@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
}

/**
* You must call this method from the parent's {@link Activity#onPause()} or {@link Fragment#onPause()}.
*/
@UiThread
public void onPause() {
// replaced by onStop in v5.0.0, keep around for future development
// replaced by onStop in v5.0.0
}

/**
* You must call this method from the parent's {@link Activity#onStop()} or {@link Fragment#onStop()}.
*/
@UiThread
public void onStop() {
onStopCalled = true;
mapboxMap.onStop();
ConnectivityReceiver.instance(getContext()).deactivate();
}
Expand All @@ -282,12 +274,6 @@ public void onStop() {
*/
@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();
Expand Down

0 comments on commit 0bd1b82

Please sign in to comment.