summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-10-19 12:11:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-19 12:11:17 -0700
commit0042b3b48b693a46030ec02f31df625b767e4977 (patch)
treef2a36319b94ebff5d36597fb5353ee2ad1d5f5a2 /src/com/android/camera/VideoCamera.java
parentfdea7c43e7b48e39cc0c8fb588bada0d6cb5c71a (diff)
parent7b52266b6f9af570f1fdb200a1d0fa7947344e1a (diff)
downloadpackages_apps_LegacyCamera-0042b3b48b693a46030ec02f31df625b767e4977.zip
packages_apps_LegacyCamera-0042b3b48b693a46030ec02f31df625b767e4977.tar.gz
packages_apps_LegacyCamera-0042b3b48b693a46030ec02f31df625b767e4977.tar.bz2
am 7b52266b: Merge "Add hysteresis to orientation rounding." into ics-mr0
* commit '7b52266b6f9af570f1fdb200a1d0fa7947344e1a': Add hysteresis to orientation rounding.
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 267a95e..d5343fb 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -500,9 +500,6 @@ public class VideoCamera extends ActivityBase
}
}
- public static int roundOrientation(int orientation) {
- return ((orientation + 45) / 90 * 90) % 360;
- }
private class MyOrientationEventListener
extends OrientationEventListener {
@@ -516,7 +513,7 @@ public class VideoCamera extends ActivityBase
// the camera then point the camera to floor or sky, we still have
// the correct orientation.
if (orientation == ORIENTATION_UNKNOWN) return;
- mOrientation = roundOrientation(orientation);
+ mOrientation = Util.roundOrientation(orientation, mOrientation);
// When the screen is unlocked, display rotation may change. Always
// calculate the up-to-date orientationCompensation.
int orientationCompensation = mOrientation