diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-06-27 00:07:46 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-06-27 00:07:46 -0700 |
commit | acd753010dcf6d8079e4620722921694cb041dbf (patch) | |
tree | 18f8d7ae8744b4f94203f3c1dde1c42fb1bc5379 /src/com/android/gallery3d/app | |
parent | 52d51fff7affd82bc69b025d261ebf19b25728c2 (diff) | |
parent | bb52543c6ba40749d7046f6ea9da4a8b30793f8d (diff) | |
download | android_packages_apps_Gallery2-acd753010dcf6d8079e4620722921694cb041dbf.tar.gz android_packages_apps_Gallery2-acd753010dcf6d8079e4620722921694cb041dbf.tar.bz2 android_packages_apps_Gallery2-acd753010dcf6d8079e4620722921694cb041dbf.zip |
am bb52543c: Merge "Show undo option for 3 seconds after the last picture is deleted." into jb-dev
* commit 'bb52543c6ba40749d7046f6ea9da4a8b30793f8d':
Show undo option for 3 seconds after the last picture is deleted.
Diffstat (limited to 'src/com/android/gallery3d/app')
-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); + } } } |