summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-10-10 11:27:13 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-19 07:19:45 -0800
commit48408c91285b1b695ede1c184dfe85c54e78b13b (patch)
treebb37fa6f2ae1af11b1fa78c35fdecc3efcb57b03
parent6411b0a9b601977bdfac1feb88120720b8440ac2 (diff)
downloadandroid_packages_apps_Snap-48408c91285b1b695ede1c184dfe85c54e78b13b.zip
android_packages_apps_Snap-48408c91285b1b695ede1c184dfe85c54e78b13b.tar.gz
android_packages_apps_Snap-48408c91285b1b695ede1c184dfe85c54e78b13b.tar.bz2
SnapdragonCamera: Fix overly-aggressive auto rotation
Change-Id: I534c0e36ac826b1d46befe99182bfbfb3b0f22da
-rw-r--r--src/com/android/camera/util/CameraUtil.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/camera/util/CameraUtil.java b/src/com/android/camera/util/CameraUtil.java
index d508c7b..4cac65b 100644
--- a/src/com/android/camera/util/CameraUtil.java
+++ b/src/com/android/camera/util/CameraUtil.java
@@ -90,7 +90,7 @@ public class CameraUtil {
public static final String KEY_SHOW_WHEN_LOCKED = "showWhenLocked";
// Orientation hysteresis amount used in rounding, in degrees
- public static final int ORIENTATION_HYSTERESIS = 5;
+ public static final int ORIENTATION_HYSTERESIS = 10;
public static final String REVIEW_ACTION = "com.android.camera.action.REVIEW";
// See android.hardware.Camera.ACTION_NEW_PICTURE.
@@ -514,7 +514,7 @@ public class CameraUtil {
} else {
int dist = Math.abs(orientation - orientationHistory);
dist = Math.min( dist, 360 - dist );
- changeOrientation = ( dist >= 45 + ORIENTATION_HYSTERESIS );
+ changeOrientation = ( dist >= 60 + ORIENTATION_HYSTERESIS );
}
if (changeOrientation) {
return ((orientation + 45) / 90 * 90) % 360;