diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2011-10-19 12:09:54 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-19 12:09:54 -0700 |
commit | 7b52266b6f9af570f1fdb200a1d0fa7947344e1a (patch) | |
tree | f47c80871af09a79e5439e1841c6888874ac67c1 /src/com/android/camera/VideoCamera.java | |
parent | 53d86908dc3e1cb54add568aa6bc325485e3efe5 (diff) | |
parent | 131cf9886c4f34431598be0b1f5b7aaa915277cc (diff) | |
download | packages_apps_LegacyCamera-7b52266b6f9af570f1fdb200a1d0fa7947344e1a.tar.gz packages_apps_LegacyCamera-7b52266b6f9af570f1fdb200a1d0fa7947344e1a.tar.bz2 packages_apps_LegacyCamera-7b52266b6f9af570f1fdb200a1d0fa7947344e1a.zip |
Merge "Add hysteresis to orientation rounding." into ics-mr0
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-x | src/com/android/camera/VideoCamera.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index fa3a9d6e..89603113 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 |