summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-08 13:37:41 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-08 14:55:38 -0700
commit65de4b056f718c1f286ecd74ede24ec9b19514fa (patch)
treeadfa18a35d94d7528b275ed94d6b2c707677c56d
parentd922690a19edb8afbb103381f3a9c329ee2f9681 (diff)
downloadandroid_packages_apps_Snap-65de4b056f718c1f286ecd74ede24ec9b19514fa.tar.gz
android_packages_apps_Snap-65de4b056f718c1f286ecd74ede24ec9b19514fa.tar.bz2
android_packages_apps_Snap-65de4b056f718c1f286ecd74ede24ec9b19514fa.zip
Correct undo behavior
Bug: 7307293 Change-Id: I72f814acd3625024f1e2aeccec4abfd28ad3319b
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java2
-rw-r--r--src/com/android/gallery3d/ui/PhotoView.java11
2 files changed, 4 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 7ded7250a..3a97c53d7 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -303,7 +303,7 @@ public class PhotoPage extends ActivityState implements
mMediaSet.getMediaItemCount() > 1) {
mPhotoView.switchToImage(1);
} else {
- mPhotoView.setFilmMode(false);
+ mPhotoView.setFilmMode(mPhotoView.canUndo());
stayedOnCamera = true;
}
diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java
index 3fa13cfad..7097dff28 100644
--- a/src/com/android/gallery3d/ui/PhotoView.java
+++ b/src/com/android/gallery3d/ui/PhotoView.java
@@ -630,7 +630,7 @@ public class PhotoView extends GLView {
if ((mHolding & ~HOLD_TOUCH_DOWN) != 0) return;
if (mWantPictureCenterCallbacks && mPositionController.isCenter()) {
- mListener.onPictureCenter(mIsCamera && !canUndoLastPicture());
+ mListener.onPictureCenter(mIsCamera);
}
}
@@ -1375,13 +1375,8 @@ public class PhotoView extends GLView {
}
}
- // Returns true if the user can still undo the deletion of the last
- // remaining picture in the album. We need to check this and delay making
- // the camera preview full screen, otherwise the user won't have a chance to
- // undo it.
- private boolean canUndoLastPicture() {
- if ((mUndoBarState & UNDO_BAR_SHOW) == 0) return false;
- return (mUndoBarState & UNDO_BAR_DELETE_LAST) != 0;
+ public boolean canUndo() {
+ return (mUndoBarState & UNDO_BAR_SHOW) != 0;
}
////////////////////////////////////////////////////////////////////////////