diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2011-10-19 12:11:17 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-19 12:11:17 -0700 |
commit | 0042b3b48b693a46030ec02f31df625b767e4977 (patch) | |
tree | f2a36319b94ebff5d36597fb5353ee2ad1d5f5a2 /src/com/android/camera/panorama | |
parent | fdea7c43e7b48e39cc0c8fb588bada0d6cb5c71a (diff) | |
parent | 7b52266b6f9af570f1fdb200a1d0fa7947344e1a (diff) | |
download | LegacyCamera-0042b3b48b693a46030ec02f31df625b767e4977.zip LegacyCamera-0042b3b48b693a46030ec02f31df625b767e4977.tar.gz 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/panorama')
-rwxr-xr-x | src/com/android/camera/panorama/PanoramaActivity.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index 82d2f3d..592b9c3 100755 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -190,10 +190,6 @@ public class PanoramaActivity extends ActivityBase implements public final boolean isValid; } - public static int roundOrientation(int orientation) { - return ((orientation + 45) / 90 * 90) % 360; - } - private class PanoOrientationEventListener extends OrientationEventListener { public PanoOrientationEventListener(Context context) { super(context); @@ -205,7 +201,7 @@ public class PanoramaActivity extends ActivityBase implements // the camera then point the camera to floor or sky, we still have // the correct orientation. if (orientation == ORIENTATION_UNKNOWN) return; - mDeviceOrientation = roundOrientation(orientation); + mDeviceOrientation = Util.roundOrientation(orientation, mDeviceOrientation); // When the screen is unlocked, display rotation may change. Always // calculate the up-to-date orientationCompensation. int orientationCompensation = mDeviceOrientation |