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

[android] - remove upgrade runtime exceptions #9191

Merged
merged 1 commit into from
Jun 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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