summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-07 13:34:57 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-07 13:44:35 -0700
commitbbc993162d687df20e2ff9a329bb9b6e04926ba8 (patch)
tree59cf7e1213efb569984f05bcd154492ce46ee345
parent4de36129b57e3a5308c109a407ea17b4fa103fe4 (diff)
downloadandroid_packages_apps_Gallery2-bbc993162d687df20e2ff9a329bb9b6e04926ba8.tar.gz
android_packages_apps_Gallery2-bbc993162d687df20e2ff9a329bb9b6e04926ba8.tar.bz2
android_packages_apps_Gallery2-bbc993162d687df20e2ff9a329bb9b6e04926ba8.zip
Fix orientation locking issues when going back to Camera
Bug: 7287039 Change-Id: Ib993266706b24269fd759f1ded1b6a85c2c5c7ba
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index cd8b80259..cfc9aa0ed 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -295,19 +295,19 @@ public class PhotoPage extends ActivityState implements
}
case MSG_ON_CAMERA_CENTER: {
mSkipUpdateCurrentPhoto = false;
- boolean updateNeeded = false;
+ boolean stayedOnCamera = false;
if (!mPhotoView.getFilmMode()) {
- lockOrientation();
- updateNeeded = true;
+ stayedOnCamera = true;
} else if (SystemClock.uptimeMillis() < mCameraSwitchCutoff &&
mMediaSet.getMediaItemCount() > 1) {
mPhotoView.switchToImage(1);
} else {
mPhotoView.setFilmMode(false);
- updateNeeded = true;
+ stayedOnCamera = true;
}
- if (updateNeeded) {
+ if (stayedOnCamera) {
+ lockOrientation();
updateBars();
updateCurrentPhoto(mModel.getMediaItem(0));
}
@@ -444,7 +444,7 @@ public class PhotoPage extends ActivityState implements
mCameraSwitchCutoff = SystemClock.uptimeMillis() +
CAMERA_SWITCH_CUTOFF_THRESHOLD_MS;
mPhotoView.stopScrolling();
- } else if (oldIndex == 1 && mCurrentIndex == 0) {
+ } else if (oldIndex >= 1 && mCurrentIndex == 0) {
mPhotoView.setWantPictureCenterCallbacks(true);
mSkipUpdateCurrentPhoto = true;
}