diff options
Diffstat (limited to 'src/com/android/camera/panorama/PanoramaActivity.java')
-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 |