summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSultanxda <sultanxda@gmail.com>2015-12-20 13:16:21 -0800
committerBruno Martins <bgcngm@gmail.com>2018-11-20 12:31:35 +0000
commitdb66345c01358983abe5410f02028137d99d579b (patch)
treed20c09c6e732f80785931e204eedd10aa6a22366 /src/com
parentd54948a36e752cc9e50cd5e885d8c147af4dc200 (diff)
downloadandroid_packages_apps_Snap-db66345c01358983abe5410f02028137d99d579b.tar.gz
android_packages_apps_Snap-db66345c01358983abe5410f02028137d99d579b.tar.bz2
android_packages_apps_Snap-db66345c01358983abe5410f02028137d99d579b.zip
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>
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/camera/PhotoUI.java2
-rwxr-xr-xsrc/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 bd5efbf0e..61ea9f93b 100755
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -302,7 +302,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);
calculateMargins(size);
mCameraControls.setMargins(mTopMargin, mBottomMargin);
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 80951496a..6138e5acb 100755
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -293,7 +293,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);
calculateMargins(size);
mCameraControls.setMargins(mTopMargin, mBottomMargin);