[android] verify no native method is called when saving state

This commit is contained in:
Łukasz Paczos
2019-02-25 14:29:18 +01:00
committed by Łukasz Paczos
parent 638b91afc4
commit 2ce70f7335
3 changed files with 14 additions and 18 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}
}