summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoUI.java
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-12-28 13:47:57 +0700
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 21:57:36 +0200
commit2a671f0626f710bf7494de5a2b765231a2a4ddf4 (patch)
tree299705dad911696fb3158fd2ad1286bf131e6c93 /src/com/android/camera/PhotoUI.java
parent6278af426fc933837cf6a2f66defce951695b8c8 (diff)
downloadandroid_packages_apps_Snap-2a671f0626f710bf7494de5a2b765231a2a4ddf4.tar.gz
android_packages_apps_Snap-2a671f0626f710bf7494de5a2b765231a2a4ddf4.tar.bz2
android_packages_apps_Snap-2a671f0626f710bf7494de5a2b765231a2a4ddf4.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/PhotoUI.java')
-rw-r--r--src/com/android/camera/PhotoUI.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 14c55101c..a3174a67d 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -344,9 +344,7 @@ public class PhotoUI implements PieListener,
public void setAspectRatio(float ratio) {
if (ratio <= 0.0) throw new IllegalArgumentException();
- if (mOrientationResize &&
- mActivity.getResources().getConfiguration().orientation
- != Configuration.ORIENTATION_PORTRAIT) {
+ if (mOrientationResize && CameraUtil.isScreenRotated(mActivity)) {
ratio = 1 / ratio;
}