Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4a3242a authored by Devin Kim's avatar Devin Kim Committed by Vladislav Koldobskiy
Browse files

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: default avatarDevin Kim <dojip.kim@lge.com>
parent 5d9bdf41
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1583,8 +1583,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density;
        int shortSizeDp = shortSize * DisplayMetrics.DENSITY_DEFAULT / density;
        int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;
        int longSizeDp = longSize * DisplayMetrics.DENSITY_DEFAULT / density;


        // Allow the navigation bar to move on small devices (phones).
        // Allow the navigation bar to move on non-square small devices (phones).
        mNavigationBarCanMove = shortSizeDp < 600;
        mNavigationBarCanMove = width != height && shortSizeDp < 600;


        mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
        mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
        // Allow a system property to override this. Used by the emulator.
        // Allow a system property to override this. Used by the emulator.