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

Commit 4739407c authored by LuK1337's avatar LuK1337 Committed by Łukasz Patron
Browse files

PhoneWindowManager: Fix issues introduced with runtime navbar

* With system settings we need to pass UserHandle.USER_CURRENT
  to make sure we are getting proper value, otherwise we always
  end up getting '0'. Also we need to make sure to set valid
  mHasNavigationBar in setInitialDisplaySize().

Change-Id: I3efd614e735f9a602f13263a742ce858a9d14769
parent 1494159d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2711,6 +2711,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }

        mNeedsNavigationBar = mHasNavigationBar;
        mHasNavigationBar |= mForceNavbar == 1;

        // For demo purposes, allow the rotation of the HDMI display to be controlled.
        // By default, HDMI locks rotation to landscape.
@@ -2843,8 +2844,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                updateWakeGestureListenerLp();
            }

            int forceNavbar = LineageSettings.System.getInt(resolver,
                    LineageSettings.System.FORCE_SHOW_NAVBAR, 0);
            int forceNavbar = LineageSettings.System.getIntForUser(resolver,
                    LineageSettings.System.FORCE_SHOW_NAVBAR, 0,
                    UserHandle.USER_CURRENT);
            if (forceNavbar != mForceNavbar) {
                mForceNavbar = forceNavbar;
                if (mLineageHardware.isSupported(LineageHardwareManager.FEATURE_KEY_DISABLE)) {