summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-12-04 14:46:23 -0800
committerMichael Kolb <kolby@google.com>2012-12-04 14:46:23 -0800
commit3e9860b5e0e9cb93b4af3ff59aa94ea7fb83201b (patch)
tree599c40f5229861c86c165300bae1a4eed96fa901
parentc5317f7dbd812f83ba086817d077f44ea4494f91 (diff)
downloadandroid_packages_apps_Snap-3e9860b5e0e9cb93b4af3ff59aa94ea7fb83201b.tar.gz
android_packages_apps_Snap-3e9860b5e0e9cb93b4af3ff59aa94ea7fb83201b.tar.bz2
android_packages_apps_Snap-3e9860b5e0e9cb93b4af3ff59aa94ea7fb83201b.zip
Prevent Camera UI in Gallery
Bug: 7668856 At startup, the PhotoView wouldn't execute the onFullScreenChanged callback, so the Camera UI believed it was in Camera. Change-Id: I6794c2a5a4eb06d39161a681b7a0afc27d5e4b3f
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 0758656a1..6dcae4ca4 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -205,6 +205,7 @@ public class PhotoView extends GLView {
private boolean mFullScreenCamera;
private Rect mCameraRelativeFrame = new Rect();
private Rect mCameraRect = new Rect();
+ private boolean mFirst = true;
// [mPrevBound, mNextBound] is the range of index for all pictures in the
// model, if we assume the index of current focused picture is 0. So if
@@ -1406,8 +1407,9 @@ public class PhotoView extends GLView {
boolean full = !mFilmMode && mPictures.get(0).isCamera()
&& mPositionController.isCenter()
&& mPositionController.isAtMinimalScale();
- if (full != mFullScreenCamera) {
+ if (mFirst || full != mFullScreenCamera) {
mFullScreenCamera = full;
+ mFirst = false;
mListener.onFullScreenChanged(full);
if (full) mHandler.sendEmptyMessage(MSG_UNDO_BAR_FULL_CAMERA);
}