summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-05-26 10:58:34 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-25 21:55:20 -0700
commit25dcb8f411490fe977029d5a4e1c5c23f1faf59c (patch)
tree6fc849952e366ff19b549409129342fc70aead4d /src
parent633f8e0d5009a9ef97da4acc78b8a7d14cb38aac (diff)
downloadandroid_packages_apps_Snap-25dcb8f411490fe977029d5a4e1c5c23f1faf59c.tar.gz
android_packages_apps_Snap-25dcb8f411490fe977029d5a4e1c5c23f1faf59c.tar.bz2
android_packages_apps_Snap-25dcb8f411490fe977029d5a4e1c5c23f1faf59c.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')
-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);