diff options
author | Kerong Sui <ksui@codeaurora.org> | 2014-03-17 11:38:34 +0800 |
---|---|---|
committer | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-10-20 23:13:28 +0000 |
commit | 0121f804d1bb080780b2dc07a1cb4890c70e82df (patch) | |
tree | f40ab114c62e3fbd0f6c69f5521c960e20829017 | |
parent | e0a2e3152a0482f2974be1e5c47590d60c01b798 (diff) | |
download | android_packages_apps_Camera2-0121f804d1bb080780b2dc07a1cb4890c70e82df.tar.gz android_packages_apps_Camera2-0121f804d1bb080780b2dc07a1cb4890c70e82df.tar.bz2 android_packages_apps_Camera2-0121f804d1bb080780b2dc07a1cb4890c70e82df.zip |
Camera2: save the picture when rotate the device
If we rotate the device, the panoroma can not mosaic image, so if
we rotate the device, we should stop capture immediately and save the
previous capture frames.
Change-Id: I4ba304957d4083b4ae58c084239d6dc3d7f4dc89
CRs-fixed: 627105
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaModule.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java index 3a4e8e6a1..5601b61e0 100644 --- a/src/com/android/camera/WideAnglePanoramaModule.java +++ b/src/com/android/camera/WideAnglePanoramaModule.java @@ -532,9 +532,11 @@ public class WideAnglePanoramaModule float progressX, float progressY) { float accumulatedHorizontalAngle = progressX * mHorizontalViewAngle; float accumulatedVerticalAngle = progressY * mVerticalViewAngle; + boolean isRotated = !(mDeviceOrientationAtCapture == mDeviceOrientation); if (isFinished || (Math.abs(accumulatedHorizontalAngle) >= DEFAULT_SWEEP_ANGLE) - || (Math.abs(accumulatedVerticalAngle) >= DEFAULT_SWEEP_ANGLE)) { + || (Math.abs(accumulatedVerticalAngle) >= DEFAULT_SWEEP_ANGLE) + || isRotated) { stopCapture(false); } else { float panningRateXInDegree = panningRateX * mHorizontalViewAngle; |