diff options
| author | Bobby Georgescu <georgescu@google.com> | 2012-10-07 23:21:18 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-07 23:21:18 -0700 |
| commit | 4ffccfd908d05307fdccefdf8923ee438c824410 (patch) | |
| tree | 714f7005e17365be3461d381f2f9928555dff912 | |
| parent | 212fe291f6766dbb928fb8413d34e40ebc6ad639 (diff) | |
| parent | d81b264931cfa3b34096efd46659b81f9a628fb5 (diff) | |
| download | android_packages_apps_Gallery2-4ffccfd908d05307fdccefdf8923ee438c824410.tar.gz android_packages_apps_Gallery2-4ffccfd908d05307fdccefdf8923ee438c824410.tar.bz2 android_packages_apps_Gallery2-4ffccfd908d05307fdccefdf8923ee438c824410.zip | |
am d81b2649: No Camera recenter on resume after editing or viewing items
* commit 'd81b264931cfa3b34096efd46659b81f9a628fb5':
No Camera recenter on resume after editing or viewing items
| -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); } |
