summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-06-27 13:40:06 +0800
committerChih-Chung Chang <chihchung@google.com>2012-06-27 13:40:06 +0800
commite0dcf33665378829a4a0d437ef06429d95f6e211 (patch)
tree3e273bb231324750198e98a7f4f82e0fecbdce3a /src/com/android/gallery3d/app
parenteb55e15ba4989e172ccfe9b7eeb6768c9020a514 (diff)
downloadandroid_packages_apps_Camera2-e0dcf33665378829a4a0d437ef06429d95f6e211.tar.gz
android_packages_apps_Camera2-e0dcf33665378829a4a0d437ef06429d95f6e211.tar.bz2
android_packages_apps_Camera2-e0dcf33665378829a4a0d437ef06429d95f6e211.zip
Show undo option for 3 seconds after the last picture is deleted.
Bug: 6742326 Change-Id: I5008c1984fff0a2affaeabf2a195cfcdc517ebc2
Diffstat (limited to 'src/com/android/gallery3d/app')
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java7
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);
+ }
}
}