summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2015-01-28 14:55:30 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-29 00:49:19 -0800
commit104f367812c753362c9c077d1d010e127e3be7f1 (patch)
tree8f09cf9ceb33a8623654e60f1dac8ae352b8a32a /src
parent23016e7422fbe2072c1757bc9b85be06cfd62ae9 (diff)
downloadandroid_packages_apps_Gallery2-104f367812c753362c9c077d1d010e127e3be7f1.tar.gz
android_packages_apps_Gallery2-104f367812c753362c9c077d1d010e127e3be7f1.tar.bz2
android_packages_apps_Gallery2-104f367812c753362c9c077d1d010e127e3be7f1.zip
Gallery2: Set PhotoPage GL root reset when rotate
When there is another activity on top of PhotoPage, the GLRootView will not update to match screen, so the back ground seems corruption. Set GLRoot View resume when onConfigurationChanged happen. CRs-Fixed: 778294 Change-Id: Ib1fd6953462e26f11c3a8957a042db2ad4ecc275
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/AbstractGalleryActivity.java9
-rwxr-xr-xsrc/com/android/gallery3d/app/PhotoPage.java9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index 9af1fb8ba..ae30cb0aa 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -133,6 +133,15 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext
return mGLRootView;
}
+ public void GLRootResume(boolean isResume) {
+ if (isResume) {
+ mGLRootView.onResume();
+ mGLRootView.lockRenderThread();
+ } else {
+ mGLRootView.unlockRenderThread();
+ }
+ }
+
public OrientationManager getOrientationManager() {
return mOrientationManager;
}
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 2deab3234..b5a4d5640 100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -1631,6 +1631,15 @@ public abstract class PhotoPage extends ActivityState implements
}
@Override
+ public void onConfigurationChanged(Configuration config) {
+ super.onConfigurationChanged(config);
+ if(mIsActive) return;
+ mActivity.GLRootResume(true);
+ mModel.resume();
+ mActivity.GLRootResume(false);
+ }
+
+ @Override
protected void onResume() {
super.onResume();