Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2019-05-07 11:37:30 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2019-05-08 16:49:33 +0300
commit84c366f946861ec9a9a8c57d6e415745f8124996 (patch)
tree0f97c306333b066643271e37b8f57e88523b0a88 /android
parent53adc749fb7b44fbf21f6f47ba071e59e842bbcd (diff)
[android] Fixed onResume invocation in MapFragment
Diffstat (limited to 'android')
-rw-r--r--android/src/com/mapswithme/maps/MapFragment.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/android/src/com/mapswithme/maps/MapFragment.java b/android/src/com/mapswithme/maps/MapFragment.java
index ff0111ca44..47f67923a2 100644
--- a/android/src/com/mapswithme/maps/MapFragment.java
+++ b/android/src/com/mapswithme/maps/MapFragment.java
@@ -187,6 +187,7 @@ public class MapFragment extends BaseMwmFragment
mSurfaceCreated = true;
mSurfaceAttached = true;
mRequireResize = true;
+ nativeResumeSurfaceRendering();
return;
}
@@ -220,6 +221,7 @@ public class MapFragment extends BaseMwmFragment
mSurfaceCreated = true;
mSurfaceAttached = true;
+ nativeResumeSurfaceRendering();
onRenderingInitialized();
}
@@ -290,7 +292,11 @@ public class MapFragment extends BaseMwmFragment
public void onPause()
{
mUiThemeOnPause = Config.getCurrentUiTheme();
- nativePauseSurfaceRendering();
+
+ // Pause/Resume can be called without surface creation/destroy.
+ if (mSurfaceAttached)
+ nativePauseSurfaceRendering();
+
super.onPause();
}
@@ -298,7 +304,10 @@ public class MapFragment extends BaseMwmFragment
public void onResume()
{
super.onResume();
- nativeResumeSurfaceRendering();
+
+ // Pause/Resume can be called without surface creation/destroy.
+ if (mSurfaceAttached)
+ nativeResumeSurfaceRendering();
}
@Override