diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-08 13:37:41 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-08 14:55:38 -0700 |
commit | 65de4b056f718c1f286ecd74ede24ec9b19514fa (patch) | |
tree | adfa18a35d94d7528b275ed94d6b2c707677c56d /src/com/android/gallery3d/ui | |
parent | d922690a19edb8afbb103381f3a9c329ee2f9681 (diff) | |
download | android_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
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r-- | src/com/android/gallery3d/ui/PhotoView.java | 11 |
1 files changed, 3 insertions, 8 deletions
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; } //////////////////////////////////////////////////////////////////////////// |