summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-05-26 10:58:34 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-21 18:45:51 -0700
commit8efa34872e0000481293f979cf5d0094067ad574 (patch)
treee9f5b72d289332ea2b4713df08ac47c981e3b257
parent58af4e7bb6f048fea48d3c4656548188eca5f1de (diff)
downloadandroid_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.zip
android_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.tar.gz
android_packages_apps_Snap-8efa34872e0000481293f979cf5d0094067ad574.tar.bz2
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
-rw-r--r--src/com/android/camera/CaptureModule.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index feef31f..c053655 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);