diff options
author | Doris Liu <tianliu@google.com> | 2013-02-15 10:55:37 -0800 |
---|---|---|
committer | Doris Liu <tianliu@google.com> | 2013-02-15 17:33:00 -0800 |
commit | 3cf565c4242a9deab7da5eb84fc302c79d594f11 (patch) | |
tree | e7e86576e14ad8b374b4e893d0629746961ef210 /src/com/android/camera/PhotoModule.java | |
parent | 4d88243c1e0c8d0ac5390b79ef0cf3418adcf02a (diff) | |
download | android_packages_apps_Snap-3cf565c4242a9deab7da5eb84fc302c79d594f11.tar.gz android_packages_apps_Snap-3cf565c4242a9deab7da5eb84fc302c79d594f11.tar.bz2 android_packages_apps_Snap-3cf565c4242a9deab7da5eb84fc302c79d594f11.zip |
Make photo orientation consistent with UI
Also fixed the wrong animation orientation.
Bug: 7302506
Change-Id: I58615a7b3cc2e08c2a8dc4e174512a502c2482f5
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 60cb67896..33ebcd931 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -1133,7 +1133,15 @@ public class PhotoModule } // Set rotation and gps data. - mJpegRotation = Util.getJpegRotation(mCameraId, mOrientation); + int orientation; + // We need to be consistent with the framework orientation (i.e. the + // orientation of the UI.) when the auto-rotate screen setting is on. + if (mActivity.isAutoRotateScreen()) { + orientation = (360 - mDisplayRotation) % 360; + } else { + orientation = mOrientation; + } + mJpegRotation = Util.getJpegRotation(mCameraId, orientation); mParameters.setRotation(mJpegRotation); Location loc = mLocationManager.getCurrentLocation(); Util.setGpsParameters(mParameters, loc); |