diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-07 16:25:54 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-10-07 17:00:20 -0700 |
commit | 86350720d916bd26faadfead5ef91f7f11f8e8e4 (patch) | |
tree | 5cd102a33fbe3e1455a6d39fa651e52f603fc99e /src/com/android/gallery3d | |
parent | 3dc62b6c99a2e34e49a86ae651353bb41129588d (diff) | |
download | android_packages_apps_Snap-86350720d916bd26faadfead5ef91f7f11f8e8e4.tar.gz android_packages_apps_Snap-86350720d916bd26faadfead5ef91f7f11f8e8e4.tar.bz2 android_packages_apps_Snap-86350720d916bd26faadfead5ef91f7f11f8e8e4.zip |
No Camera recenter on resume after editing or viewing items
Bug: 7302361
Change-Id: I7420f89a766dc86d873166789b1875539541825c
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 10 |
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); } |