summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoUI.java
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-12-28 13:47:57 +0700
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:02 +0300
commitfee810cb66383b2962af5250a0f67a12147c0455 (patch)
tree41e855ea93c97f133a4d544caf8c86fb5abf65f6 /src/com/android/camera/VideoUI.java
parent94aff93adaaef84da82dfe46ac92a91c3b3fe2c8 (diff)
downloadandroid_packages_apps_Snap-fee810cb66383b2962af5250a0f67a12147c0455.tar.gz
android_packages_apps_Snap-fee810cb66383b2962af5250a0f67a12147c0455.tar.bz2
android_packages_apps_Snap-fee810cb66383b2962af5250a0f67a12147c0455.zip
Camera: fix preview for landscape devices
Landscape devices have broken preview because PORTRAIT mode is being abused to check for screen rotation. Use proper rotation check to fix. Ported from cm-10.2 Change-Id: I75588cbce9843e180e4be7591f6a43bcec788506
Diffstat (limited to 'src/com/android/camera/VideoUI.java')
-rw-r--r--src/com/android/camera/VideoUI.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index bc29d47c4..2db71335c 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -316,9 +316,7 @@ public class VideoUI implements PieRenderer.PieListener,
} else {
ratio = (float) height / width;
}
- if (mOrientationResize &&
- mActivity.getResources().getConfiguration().orientation
- != Configuration.ORIENTATION_PORTRAIT) {
+ if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
}
@@ -627,9 +625,7 @@ public class VideoUI implements PieRenderer.PieListener,
}
public void setAspectRatio(double ratio) {
- if (mOrientationResize &&
- mActivity.getResources().getConfiguration().orientation
- != Configuration.ORIENTATION_PORTRAIT) {
+ if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
}