From c9726f4dfea15dfa303086c90650534c32f5f3ec Mon Sep 17 00:00:00 2001 From: huiyan Date: Mon, 18 Apr 2016 13:40:47 +0800 Subject: Revert "Gallery2: Set PhotoPage GL root reset when rotate" This reverts commit 104f367812c753362c9c077d1d010e127e3be7f1. Change the orientation in SlideshowPage which is active, photoPage reload the data and invalidate UI in inactive state. This cause UI is black when return from SlideshowPage to PhotoPage. So revert it to avoid reloading data and invalidating UI, if PhotoPage is inactive state and the orientation change. Change-Id: Ia60af41662c60858d92d00fcacb6686a123c0e21 CRs-Fixed: 997153 --- src/com/android/gallery3d/app/AbstractGalleryActivity.java | 9 --------- src/com/android/gallery3d/app/PhotoPage.java | 9 --------- 2 files changed, 18 deletions(-) diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java index 9f43b8de4..1f8fa1e66 100644 --- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java +++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java @@ -156,15 +156,6 @@ 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 66120f02f..f53231f58 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -1480,15 +1480,6 @@ 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(); -- cgit v1.2.3