diff options
author | Byunghun Jeon <bjeon@codeaurora.org> | 2016-05-26 10:58:34 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-21 18:45:51 -0700 |
commit | 8efa34872e0000481293f979cf5d0094067ad574 (patch) | |
tree | e9f5b72d289332ea2b4713df08ac47c981e3b257 /src/com | |
parent | 58af4e7bb6f048fea48d3c4656548188eca5f1de (diff) | |
download | android_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.tar.gz android_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.tar.bz2 android_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.zip |
SnapdragonCamera: Fix picture orientation
Fix picture orientation when device is in landscape.
We need to use mOrientation for calculating proper
orientation for jpeg because this field contains the
right orientation information (portrait/landscape)
Change-Id: I25137265c1037a6121e0e89828b78dd4bc1c35d4
CRs-Fixed: 1018118
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index feef31fec..c053655f5 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -863,9 +863,7 @@ public class CaptureModule implements CameraModule, PhotoController, captureBuilder = mCameraDevice[id].createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE); } - // Orientation - int rotation = mActivity.getWindowManager().getDefaultDisplay().getRotation(); - captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, CameraUtil.getJpegRotation(id, rotation)); + captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, CameraUtil.getJpegRotation(id, mOrientation)); captureBuilder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO); captureBuilder.addTarget(getPreviewSurface(id)); captureBuilder.set(CaptureRequest.CONTROL_AF_MODE, mControlAFMode); |