summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2017-02-28 14:59:42 +0800
committermingwax <mingwax@codeaurora.org>2017-02-28 15:04:51 +0800
commitfccc93f3ce9a13a4ef1c23af90845f8da26f1cf8 (patch)
treedcdc9e6ec8154313c72edb630920c49436da4e30 /src
parent3196565b3091f36a00428c0509c2bfd959c84b85 (diff)
downloadandroid_packages_apps_Snap-fccc93f3ce9a13a4ef1c23af90845f8da26f1cf8.tar.gz
android_packages_apps_Snap-fccc93f3ce9a13a4ef1c23af90845f8da26f1cf8.tar.bz2
android_packages_apps_Snap-fccc93f3ce9a13a4ef1c23af90845f8da26f1cf8.zip
SnapdragonCamera: Fix photo reversed when enable selfie Mirror
When camera is opened with front camera, enable SelfieMirror in horizontal screen. When jpegData`s exif `s orientation is enabled, set the image rotation angle of 180 degrees to ensure the picture is right direction. SDM660 installed front camera is 270 degree. MSM8998 installed front camera is 90 degree. CRs-Fixed: 1112749 Change-Id: I350f588142215e7b0793d1aa6dc573bad239baac
Diffstat (limited to 'src')
-rw-r--r--[-rwxr-xr-x]src/com/android/camera/PhotoModule.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index f3bec263a..035ad5fff 100755..100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1287,9 +1287,7 @@ public class PhotoModule
private byte[] flipJpeg(byte[] jpegData, int orientation, int jpegOrientation) {
Bitmap srcBitmap = BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length);
Matrix m = new Matrix();
- if(orientation == 270) {
- m.preScale(-1, 1);
- } else { //if it's 90
+ if(orientation == 270 || orientation == 90) {
// Judge whether the picture or phone is horizontal screen
if (jpegOrientation == 0 || jpegOrientation == 180) {
m.preScale(-1, 1);