summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-05-26 10:58:34 -0700
committerByunghun Jeon <bjeon@codeaurora.org>2016-06-09 10:41:40 -0700
commit3bca2c0ffd2c3cd1cbc6d85109438193704d3bfe (patch)
tree39e61c7e5544a7b3a0bbd7249b17970556edfc70 /src/com/android/camera
parent2256df6faca5ac16e37f5d0b076fb72fdc8c327b (diff)
downloadandroid_packages_apps_Snap-3bca2c0ffd2c3cd1cbc6d85109438193704d3bfe.tar.gz
android_packages_apps_Snap-3bca2c0ffd2c3cd1cbc6d85109438193704d3bfe.tar.bz2
android_packages_apps_Snap-3bca2c0ffd2c3cd1cbc6d85109438193704d3bfe.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/android/camera')
-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 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);