OSDN Git Service

Fix camera->gallery relaunch loop on empty camera album
authorBobby Georgescu <georgescu@google.com>
Mon, 7 Jan 2013 19:25:46 +0000 (11:25 -0800)
committerBobby Georgescu <georgescu@google.com>
Mon, 7 Jan 2013 19:25:46 +0000 (11:25 -0800)
Bug: 7952132
Change-Id: I27325abe32177195d07fe310b8c49aca81af9056

src/com/android/gallery3d/app/PhotoPage.java

index ca3ee19..8520234 100644 (file)
@@ -345,7 +345,7 @@ public abstract class PhotoPage extends ActivityState implements
                         }
 
                         if (stayedOnCamera) {
-                            if (mAppBridge == null) {
+                            if (mAppBridge == null && mMediaSet.getTotalMediaItemCount() > 1) {
                                 launchCamera();
                                 /* We got here by swiping from photo 1 to the
                                    placeholder, so make it be the thing that