[android] verify no native method is called when saving state
This commit is contained in:
committed by
Łukasz Paczos
parent
638b91afc4
commit
2ce70f7335
@@ -500,7 +500,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
*/
|
||||
@UiThread
|
||||
public void onLowMemory() {
|
||||
if (nativeMapView != null) {
|
||||
if (nativeMapView != null && !destroyed) {
|
||||
nativeMapView.onLowMemory();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class SupportMapFragment extends Fragment implements OnMapReadyCallback {
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
if (map != null && !map.isDestroyed()) {
|
||||
if (map != null) {
|
||||
map.onSaveInstanceState(outState);
|
||||
}
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public class SupportMapFragment extends Fragment implements OnMapReadyCallback {
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
if (map != null && !map.isDestroyed()) {
|
||||
if (map != null) {
|
||||
map.onLowMemory();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user