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

Commit e18e0f1d authored by Kyrylo Mikos's avatar Kyrylo Mikos Committed by Gerrit Code Review
Browse files

PhoneWindowManager: fix navbar behavior in expanded mode after 4.4.2 merge.

Change-Id: I00f814db6c3800b8eb1cf20004ecdfb8d1ee7036
parent 7adda8f3
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -5718,6 +5718,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        } else {
            mClearedBecauseOfForceShow = false;
        }
        // The window who requested navbar force showing disappeared and next window wants
        // to hide navbar. Instead of hiding we will make it transient. SystemUI will take care
        // about hiding after timeout. This should not happen if next window is keyguard because
        // transient state have more priority than translucent (why?) and cause bad UX
        if (wasCleared && !mClearedBecauseOfForceShow
                && (tmpVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0) {
            mNavigationBarController.showTransient();
            tmpVisibility |= View.NAVIGATION_BAR_TRANSIENT;
            mWindowManagerFuncs.addSystemUIVisibilityFlag(View.NAVIGATION_BAR_TRANSIENT);
        }
        int visibility = updateSystemBarsLw(win, mLastSystemUiFlags, tmpVisibility);
        final int diff = visibility ^ mLastSystemUiFlags;
        final boolean needsMenu = win.getNeedsMenuLw(mTopFullscreenOpaqueWindowState);
@@ -5725,12 +5735,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                && mFocusedApp == win.getAppToken()) {
            return 0;
        }
        if (wasCleared && !mClearedBecauseOfForceShow
                && (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0) {
            mNavigationBarController.showTransient();
            visibility |= View.NAVIGATION_BAR_TRANSIENT;
            mWindowManagerFuncs.addSystemUIVisibilityFlag(View.NAVIGATION_BAR_TRANSIENT);
        }

        final int visibility2 = visibility;
        mLastSystemUiFlags = visibility;
        mLastFocusNeedsMenu = needsMenu;