summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Devin Kim <dojip.kim@lge.com> 2014-05-05 14:34:58 -0700
committer Wale Ogunwale <ogunwale@google.com> 2015-01-03 14:09:19 -0800
commitd7b12b44db17b7a7c4b511273f15234f7b050f84 (patch)
tree4f540dcb26c077afd5e588c8657d703847373e40
parent4fa039dfb1a5a23dad493f3c8c2c7529ecc1e96d (diff)
Do not allow the navigation bar to move if width == height
If width == height and mNavigationBarCanMove is true, the navigation bar doesn't shows properly. Because wm doesn't know if the device is in landscape mode or portrait mode. Change-Id: I2077eacae50e6e498767f5c93b697e0459ad07fe Signed-off-by: Devin Kim <dojip.kim@lge.com>
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 1502829467a8..b310e04f767b 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1190,8 +1190,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density;
int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;
- // Allow the navigation bar to move on small devices (phones).
- mNavigationBarCanMove = shortSizeDp < 600;
+ // Allow the navigation bar to move on non-square small devices (phones).
+ mNavigationBarCanMove = width != height && shortSizeDp < 600;
mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
// Allow a system property to override this. Used by the emulator.