summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-12-20 13:16:21 -0800
committerDanny Baumann <dannybaumann@web.de>2016-01-20 23:29:33 -0800
commit788ae642cf7a89046dfbc82ddfb7de09b4fd569f (patch)
tree491d0965973cd5f781434a35da00e0a19870c98e
parent5d94a49959bffc1c1e1cce63b02dccd994f00ade (diff)
downloadandroid_packages_apps_Snap-788ae642cf7a89046dfbc82ddfb7de09b4fd569f.zip
android_packages_apps_Snap-788ae642cf7a89046dfbc82ddfb7de09b4fd569f.tar.gz
android_packages_apps_Snap-788ae642cf7a89046dfbc82ddfb7de09b4fd569f.tar.bz2
SnapdragonCamera: Fix UI alignment glitches when nav-bar is enabled
Snapdragon Camera is immersive (i.e. fullscreen), so we expect to receive the actual size of the display here, not the modified size when the nav-bar is enabled. Change-Id: I942829f77dda0dbb9dd65a60e66a540eecf708e7 Signed-off-by: Sultanxda <sultanxda@gmail.com>
-rw-r--r--src/com/android/camera/PhotoUI.java2
-rw-r--r--src/com/android/camera/VideoUI.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 693b94b..481463f 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -299,7 +299,7 @@ public class PhotoUI implements PieListener,
mPrevOrientationResize = false;
Point size = new Point();
- mActivity.getWindowManager().getDefaultDisplay().getSize(size);
+ mActivity.getWindowManager().getDefaultDisplay().getRealSize(size);
mScreenRatio = CameraUtil.determineRatio(size.x, size.y);
if (mScreenRatio == CameraUtil.RATIO_16_9) {
int l = size.x > size.y ? size.x : size.y;
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 42d40ab..3f5a73e 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -245,7 +245,7 @@ public class VideoUI implements PieRenderer.PieListener,
mPrevOrientationResize = false;
Point size = new Point();
- mActivity.getWindowManager().getDefaultDisplay().getSize(size);
+ mActivity.getWindowManager().getDefaultDisplay().getRealSize(size);
mScreenRatio = CameraUtil.determineRatio(size.x, size.y);
if (mScreenRatio == CameraUtil.RATIO_16_9) {
int l = size.x > size.y ? size.x : size.y;