OSDN Git Service

Fix improper transition from gallery to camera
authorInseob Kim <inseob@google.com>
Thu, 30 Aug 2018 02:36:36 +0000 (11:36 +0900)
committerInseob Kim <inseob@google.com>
Thu, 30 Aug 2018 02:50:00 +0000 (11:50 +0900)
Camera app has been wrongly falling back from the gallery to camera
activity. It happens when a user deletes images and only one image left.
This patch fixes it so that the app can stay at the gallery.

Bug: 113361301
Test: 1) Capture a few photos.
2) Move to film view by dragging screen from right to left.
3) Try to delete photos except one by dragging from bottom to up.

Change-Id: I72c0c678df76386e891a9a1b3dfcaa7e452afd27

src/com/android/camera/CameraActivity.java

index 110ce16..352fa38 100644 (file)
@@ -1335,7 +1335,7 @@ public class CameraActivity extends QuickActivity
 
     private void removeItemAt(int index) {
         mDataAdapter.removeAt(index);
-        if (mDataAdapter.getTotalNumber() > 1) {
+        if (mDataAdapter.getTotalNumber() > 0) {
             showUndoDeletionBar();
         } else {
             // If camera preview is the only view left in filmstrip,