super.onDestroy();
// The Android rotate screen mess.
- this.mMapActivityOnMapReadyCallback.onDestroy();
- this.mButtonsUpdate.onDestroy();
+ if (this.mMapActivityOnMapReadyCallback != null) {
+ this.mMapActivityOnMapReadyCallback.onDestroy();
+ }
+ if (this.mButtonsUpdate != null) {
+ this.mButtonsUpdate.onDestroy();
+ }
+ if (this.mMapUpdate != null) {
+ this.mMapUpdate.onDestroy();
+ }
}
public void onClickSaveLocation(final View v) {
this.mapActivity.mMap.animateCamera(CameraUpdateFactory.zoomIn());
this.mapActivity.mMap.animateCamera(CameraUpdateFactory.zoomTo(8), 2000, null);
}
+
+ /**
+ * The Android rotate screen mess. Required because the Activity.isDestroyed method exists
+ * just from API level 17.
+ */
+ private void onDestroy() {
+ this.mapActivity = null;
+ }
}
private class ButtonsUpdate {
}
}
+ /**
+ * The Android rotate screen mess. Required because the Activity.isDestroyed method exists
+ * just from API level 17.
+ */
private void onDestroy() {
this.mapActivity = null;
}