diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-22 13:49:35 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-10-22 15:10:42 -0700 |
commit | 1426b538b0df7653b77b05243c422b2e155c5d14 (patch) | |
tree | 47590e68ffd40d7187725b28997055c64f5b9563 | |
parent | 2f7d7b23ff41800d01edad9d30ddd9517b309e18 (diff) | |
download | android_packages_apps_Snap-1426b538b0df7653b77b05243c422b2e155c5d14.tar.gz android_packages_apps_Snap-1426b538b0df7653b77b05243c422b2e155c5d14.tar.bz2 android_packages_apps_Snap-1426b538b0df7653b77b05243c422b2e155c5d14.zip |
Scroll to placeholder in gallery filmstrip launches camera
Bug: 7368079
Change-Id: I50323b6b4d64672486cdca785b9f1e1ae2f02a97
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index d6c8ef481..fb4e88b2a 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -345,13 +345,22 @@ public class PhotoPage extends ActivityState implements mMediaSet.getMediaItemCount() > 1) { mPhotoView.switchToImage(1); } else { - mPhotoView.setFilmMode(false); + if (mAppBridge != null) mPhotoView.setFilmMode(false); stayedOnCamera = true; } if (stayedOnCamera) { - updateBars(); - updateCurrentPhoto(mModel.getMediaItem(0)); + if (mAppBridge == null) { + GalleryUtils.startCameraActivity(mActivity); + /* We got here by swiping from photo 1 to the + placeholder, so make it be the thing that + is in focus when the user presses back from + the camera app */ + mPhotoView.switchToImage(1); + } else { + updateBars(); + updateCurrentPhoto(mModel.getMediaItem(0)); + } } break; } @@ -579,6 +588,7 @@ public class PhotoPage extends ActivityState implements @Override public void onPictureCenter(boolean isCamera) { + isCamera = isCamera || (mInCameraRoll && mAppBridge == null); mPhotoView.setWantPictureCenterCallbacks(false); mHandler.removeMessages(MSG_ON_CAMERA_CENTER); mHandler.removeMessages(MSG_ON_PICTURE_CENTER); |