summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui/PanoCaptureProcessView.java
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-09-22 13:34:14 -0700
committerJay Wang <jaywang@codeaurora.org>2016-10-13 11:12:45 -0700
commit2322edc10db67d084edf03bb6b522911f2893318 (patch)
treed8a1ad0893c97e1fbeb7bfc3e4f29f6633df2a49 /src/com/android/camera/ui/PanoCaptureProcessView.java
parent00e82ced33ad0248c41f6e0423c80cb6d1604a51 (diff)
downloadandroid_packages_apps_Snap-2322edc10db67d084edf03bb6b522911f2893318.tar.gz
android_packages_apps_Snap-2322edc10db67d084edf03bb6b522911f2893318.tar.bz2
android_packages_apps_Snap-2322edc10db67d084edf03bb6b522911f2893318.zip
SnapdragonCamera: Panorama2 fix
1. Checking if setting manager instance null on closing. 2. Counting in the lens mount orientation value Change-Id: Ib33819ca91b665768601d8195b3e0afb5a3c88c1 CRs-Fixed: 1071798
Diffstat (limited to 'src/com/android/camera/ui/PanoCaptureProcessView.java')
-rw-r--r--src/com/android/camera/ui/PanoCaptureProcessView.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/camera/ui/PanoCaptureProcessView.java b/src/com/android/camera/ui/PanoCaptureProcessView.java
index 724703b10..e73dc9604 100644
--- a/src/com/android/camera/ui/PanoCaptureProcessView.java
+++ b/src/com/android/camera/ui/PanoCaptureProcessView.java
@@ -917,13 +917,14 @@ public class PanoCaptureProcessView extends View implements SensorEventListener
private void rotateAndScale(Bitmap srcBitmap, Bitmap dstBitmap, float ratio) {
Canvas canvas = new Canvas(dstBitmap);
matrix.reset();
+ int sensorOrientation = mController.getCameraSensorOrientation();
if(mOrientation == 0 || mOrientation == 270) {
- matrix.postRotate((90 + mOrientation + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
+ matrix.postRotate((sensorOrientation + mOrientation + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
} else if (mOrientation == 180){
- matrix.postRotate((90 + mOrientation + 180 + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
+ matrix.postRotate((sensorOrientation + mOrientation + 180 + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
matrix.postRotate(180, srcBitmap.getHeight() / 2, srcBitmap.getWidth() / 2);
} else if(mOrientation == 90) {
- matrix.postRotate((90 + mOrientation + 180 + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
+ matrix.postRotate((sensorOrientation + mOrientation + 180 + 360) % 360, srcBitmap.getHeight() / 2, srcBitmap.getHeight() / 2);
matrix.postRotate(180, srcBitmap.getWidth() / 2, srcBitmap.getHeight() / 2);
}
matrix.postScale(ratio, ratio);