summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/WideAnglePanoramaModule.java
diff options
context:
space:
mode:
authorSuman Mukherjee <sumam@codeaurora.org>2014-01-14 15:30:14 +0530
committerSuman Mukherjee <sumam@codeaurora.org>2014-01-20 10:34:09 +0530
commitbcbe738c2ce016e4d34d7ca8297393aba7f74700 (patch)
tree850e99592977a2b98d70767e91eddeb32792a672 /src/com/android/camera/WideAnglePanoramaModule.java
parent4fa5b46ba5ba7872a6815d869ab1d4c72a588dc9 (diff)
downloadandroid_packages_apps_Snap-bcbe738c2ce016e4d34d7ca8297393aba7f74700.tar.gz
android_packages_apps_Snap-bcbe738c2ce016e4d34d7ca8297393aba7f74700.tar.bz2
android_packages_apps_Snap-bcbe738c2ce016e4d34d7ca8297393aba7f74700.zip
Camera2: Inverted preview in Panorama
For 8x26MTP device, panorama preview is coming as inverted. In present android version flippreview is itself taking care of rotation. This additional rotation is causing the inverted preview for the device where mount angle for sensor is more than 180degree. The logic related to mPanoAngle is not needed which had been added for previous android version. Change-Id: I6c5ed526382e0971e555a70946adb63a2acdf180 CRs-Fixed: 591767
Diffstat (limited to 'src/com/android/camera/WideAnglePanoramaModule.java')
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index c5629fd22..d8d980533 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -130,7 +130,6 @@ public class WideAnglePanoramaModule
private int mDeviceOrientation;
private int mDeviceOrientationAtCapture;
private int mCameraOrientation;
- private int mPanoAngle;
private int mOrientationCompensation;
private SoundClips.Player mSoundPlayer;
@@ -657,9 +656,9 @@ public class WideAnglePanoramaModule
if (mUsingFrontCamera) {
// mCameraOrientation is negative with respect to the front facing camera.
// See document of android.hardware.Camera.Parameters.setRotation.
- orientation = (mDeviceOrientationAtCapture - mCameraOrientation - mPanoAngle + 360) % 360;
+ orientation = (mDeviceOrientationAtCapture - mCameraOrientation - 360) % 360;
} else {
- orientation = (mDeviceOrientationAtCapture + mCameraOrientation - mPanoAngle) % 360;
+ orientation = (mDeviceOrientationAtCapture + mCameraOrientation) % 360;
}
return orientation;
}
@@ -1005,8 +1004,7 @@ public class WideAnglePanoramaModule
// as Panoroma will add 90 degree rotation compensation during
// postprocessing, we need to consider both camera mount angle and
// this compensation angle
- mPanoAngle = (mCameraOrientation - 90 + 360) % 360;
- mCameraDevice.setDisplayOrientation(mPanoAngle);
+ mCameraDevice.setDisplayOrientation(0);
if (mCameraTexture != null)
mCameraTexture.setOnFrameAvailableListener(this);