diff options
author | NBruderman <nbruderman@gmail.com> | 2015-06-11 15:08:49 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-10-07 22:04:13 +0300 |
commit | 71876d738cb815f3a3b8f8fc021797b793646b43 (patch) | |
tree | 34042d74da4ebc1030c2244674f80d4b00c077e3 | |
parent | a6c500b62ba3c0dedc42f34eb3b29296c4eb572b (diff) | |
download | android_packages_apps_Camera2-71876d738cb815f3a3b8f8fc021797b793646b43.tar.gz android_packages_apps_Camera2-71876d738cb815f3a3b8f8fc021797b793646b43.tar.bz2 android_packages_apps_Camera2-71876d738cb815f3a3b8f8fc021797b793646b43.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
-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 eed425c29..d60979327 100644 --- a/src/com/android/camera/CameraActivity.java +++ b/src/com/android/camera/CameraActivity.java @@ -1352,7 +1352,8 @@ public class CameraActivity extends QuickActivity private void removeItemAt(int index) { mDataAdapter.removeAt(index); - if (mDataAdapter.getTotalNumber() > 0) { + final int placeholders = mSecureCamera ? 1 : 0; + if (mDataAdapter.getTotalNumber() > placeholders) { showUndoDeletionBar(); } else { // If camera preview is the only view left in filmstrip, |