From 8efa34872e0000481293f979cf5d0094067ad574 Mon Sep 17 00:00:00 2001 From: Byunghun Jeon Date: Thu, 26 May 2016 10:58:34 -0700 Subject: 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 --- src/com/android/camera/CaptureModule.java | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3