summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNBruderman <nbruderman@gmail.com>2015-06-11 15:08:49 +0300
committerMichael Bestas <mkbestas@lineageos.org>2019-11-09 22:47:37 +0200
commitb0e6afd9beb2781fac489663c7a3921c28aa2fa9 (patch)
treeca928a59ded67e9cad67d4ecc60bcef889ebef70
parentda8508e11d76b91afc4783da5b166d09845b91fb (diff)
downloadandroid_packages_apps_Snap-b0e6afd9beb2781fac489663c7a3921c28aa2fa9.zip
android_packages_apps_Snap-b0e6afd9beb2781fac489663c7a3921c28aa2fa9.tar.gz
android_packages_apps_Snap-b0e6afd9beb2781fac489663c7a3921c28aa2fa9.tar.bz2
Snap: Fix Undo button behaviour
The undo behaviour depends on if the camera present secure settings or not. If secure, it should have 1 placeholder. 0 in other cases. Repro (for non secure cameras): 1. Leave only 3 pictures on the album. 2. Delete one picture, it will work fine. 3. Leave only 2 pictures on the album. 4. Try to delete, and you will go straight to the camera, without the undo pannel showing up. Change-Id: I360076381867a74628ffa492065ccf2ca53c72d6
-rwxr-xr-xsrc/com/android/camera/CameraActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 39c80bb..e7d66e7 100755
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1343,7 +1343,8 @@ public class CameraActivity extends Activity
private void removeData(int dataID) {
mDataAdapter.removeData(CameraActivity.this, dataID);
- if (mDataAdapter.getTotalNumber() > 1) {
+ final int placeholders = mSecureCamera ? 1 : 0;
+ if (mDataAdapter.getTotalNumber() > placeholders) {
showUndoDeletionBar();
} else {
// If camera preview is the only view left in filmstrip,