diff options
author | NBruderman <nbruderman@gmail.com> | 2015-06-11 15:08:49 +0300 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-03 23:59:56 +0200 |
commit | 55f9a6a4d4352e320a4dd1b6f8b554945fa25006 (patch) | |
tree | 1a7016406f89d6ccc70143d8c9bfd411d45ceecb /src | |
parent | 8b2cd20977404af09251a5734808dcf6b09899e5 (diff) | |
download | android_packages_apps_Camera2-55f9a6a4d4352e320a4dd1b6f8b554945fa25006.tar.gz android_packages_apps_Camera2-55f9a6a4d4352e320a4dd1b6f8b554945fa25006.tar.bz2 android_packages_apps_Camera2-55f9a6a4d4352e320a4dd1b6f8b554945fa25006.zip |
Camera2: 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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java index 80a931999..81fe13f15 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -1353,7 +1353,8 @@ public class CameraActivity extends QuickActivity private void removeItemAt(int index) { mDataAdapter.removeAt(index); - 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, |