diff options
Diffstat (limited to 'src/com/android/camera/util/CameraUtil.java')
-rwxr-xr-x | src/com/android/camera/util/CameraUtil.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/camera/util/CameraUtil.java b/src/com/android/camera/util/CameraUtil.java index af15143b6..09c9277e4 100755 --- a/src/com/android/camera/util/CameraUtil.java +++ b/src/com/android/camera/util/CameraUtil.java @@ -474,6 +474,11 @@ public class CameraUtil { return 0; } + public static boolean isScreenRotated(Activity activity) { + int rotation = activity.getWindowManager().getDefaultDisplay().getRotation(); + return rotation != Surface.ROTATION_0 && rotation != Surface.ROTATION_180; + } + /** * Calculate the default orientation of the device based on the width and * height of the display when rotation = 0 (i.e. natural width and height) |