diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-06-27 00:05:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-27 00:05:15 -0700 |
commit | d593a2c1853b4a5a900f194b0a32dc1ac9b1939c (patch) | |
tree | 6138171cb162efaad5bd7e0b40347f75ce1b4ae5 /src/com/android/gallery3d/app/PhotoPage.java | |
parent | 676ec6a3ac03d7f0797325dc7067b82cf55b1ff2 (diff) | |
parent | e0dcf33665378829a4a0d437ef06429d95f6e211 (diff) | |
download | android_packages_apps_Snap-d593a2c1853b4a5a900f194b0a32dc1ac9b1939c.tar.gz android_packages_apps_Snap-d593a2c1853b4a5a900f194b0a32dc1ac9b1939c.tar.bz2 android_packages_apps_Snap-d593a2c1853b4a5a900f194b0a32dc1ac9b1939c.zip |
Merge "Show undo option for 3 seconds after the last picture is deleted." into jb-dev
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 568f5901f..17f57c204 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -253,7 +253,12 @@ public class PhotoPage extends ActivityState implements MediaItem photo = mModel.getMediaItem(0); if (photo != null) updateCurrentPhoto(photo); } else if (mIsActive) { - mActivity.getStateManager().finishState(PhotoPage.this); + // We only want to finish the PhotoPage if there is no + // deletion that the user can undo. + if (mMediaSet.getNumberOfDeletions() == 0) { + mActivity.getStateManager().finishState( + PhotoPage.this); + } } } |