Never show transient navigation bar when empty
Prevents the status bar from showing in a transient way
when it's empty and hidden by the focused window.
Change-Id: Iaa191ed7b50cbc656a0a763b02b677d11759293e
Fixes: 30283262
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 22521b9..0f3f2ac 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -6142,7 +6142,9 @@
return;
}
mPendingPanicGestureUptime = SystemClock.uptimeMillis();
- mNavigationBarController.showTransient();
+ if (!isNavBarEmpty(mLastSystemUiFlags)) {
+ mNavigationBarController.showTransient();
+ }
}
}
};
@@ -6154,7 +6156,8 @@
return;
}
boolean sb = mStatusBarController.checkShowTransientBarLw();
- boolean nb = mNavigationBarController.checkShowTransientBarLw();
+ boolean nb = mNavigationBarController.checkShowTransientBarLw()
+ && !isNavBarEmpty(mLastSystemUiFlags);
if (sb || nb) {
// Don't show status bar when swiping on already visible navigation bar
if (!nb && swipeTarget == mNavigationBar) {
@@ -7507,7 +7510,9 @@
// we're no longer on the Keyguard and the screen is ready. We can now request the bars.
mPendingPanicGestureUptime = 0;
mStatusBarController.showTransient();
- mNavigationBarController.showTransient();
+ if (!isNavBarEmpty(vis)) {
+ mNavigationBarController.showTransient();
+ }
}
final boolean denyTransientStatus = mStatusBarController.isTransientShowRequested()