summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-07 16:25:54 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-07 17:00:20 -0700
commitd81b264931cfa3b34096efd46659b81f9a628fb5 (patch)
tree13fd4c8ffc31fe37827b27c2cb79292c2b908cc7
parent4b39551d67b9868c289fd2c31f62d3326fc6f697 (diff)
downloadandroid_packages_apps_Gallery2-d81b264931cfa3b34096efd46659b81f9a628fb5.tar.gz
android_packages_apps_Gallery2-d81b264931cfa3b34096efd46659b81f9a628fb5.tar.bz2
android_packages_apps_Gallery2-d81b264931cfa3b34096efd46659b81f9a628fb5.zip
No Camera recenter on resume after editing or viewing items
Bug: 7302361 Change-Id: I7420f89a766dc86d873166789b1875539541825c
-rw-r--r--src/com/android/gallery3d/app/PhotoPage.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index cfc9aa0ed..7f6d77325 100644
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -162,6 +162,7 @@ public class PhotoPage extends ActivityState implements
private boolean mStartInFilmstrip;
private boolean mInCameraRoll;
private boolean mStartedFromAlbumPage;
+ private boolean mRecenterCameraOnResume = true;
private long mCameraSwitchCutoff = 0;
private boolean mSkipUpdateCurrentPhoto = false;
@@ -533,6 +534,7 @@ public class PhotoPage extends ActivityState implements
launchPhotoEditor();
return;
case R.id.photopage_bottom_control_panorama:
+ mRecenterCameraOnResume = false;
LightCycleHelper.viewPanorama(mActivity, mCurrentPhoto.getContentUri());
return;
default:
@@ -598,6 +600,7 @@ public class PhotoPage extends ActivityState implements
.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY).size() == 0) {
intent.setAction(Intent.ACTION_EDIT);
}
+ mRecenterCameraOnResume = false;
((Activity) mActivity).startActivityForResult(Intent.createChooser(intent, null),
REQUEST_EDIT);
}
@@ -1082,7 +1085,8 @@ public class PhotoPage extends ActivityState implements
mDeletePath = null;
}
- public static void playVideo(Activity activity, Uri uri, String title) {
+ public void playVideo(Activity activity, Uri uri, String title) {
+ mRecenterCameraOnResume = false;
try {
Intent intent = new Intent(Intent.ACTION_VIEW)
.setDataAndType(uri, "video/*")
@@ -1226,7 +1230,8 @@ public class PhotoPage extends ActivityState implements
int albumPageTransition = transitions.get(
KEY_ALBUMPAGE_TRANSITION, MSG_ALBUMPAGE_NONE);
- if (albumPageTransition == MSG_ALBUMPAGE_NONE && mAppBridge != null) {
+ if (albumPageTransition == MSG_ALBUMPAGE_NONE && mAppBridge != null
+ && mRecenterCameraOnResume) {
// Generally, resuming the PhotoPage when in Camera should
// reset to the capture mode to allow quick photo taking
mCurrentIndex = 0;
@@ -1301,6 +1306,7 @@ public class PhotoPage extends ActivityState implements
}
mHasActivityResult = false;
+ mRecenterCameraOnResume = true;
mHandler.sendEmptyMessageDelayed(MSG_UNFREEZE_GLROOT, UNFREEZE_GLROOT_TIMEOUT);
}