Prevent infinite layout while hiding nav bar on keyguard
By the original logic, if there is a focused window which hides
navigation bar while keyguard is showing, PhoneWindowManager would
hide/show navigation bar frequently, which caused infinite layout.
Bug: 78681867
Test: 1. Open a photo in fullscreen mode (hiding navigation bar)
2. Press power key to bring up keyguard
3. See if there is "Performed 6 layouts in a row. Skipping" log
Change-Id: Id8c49ac8fc45b98294e48017308dce3117ed1cf8
This commit is contained in:
@@ -5743,7 +5743,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
mStatusBarController.updateVisibilityLw(false /*transientAllowed*/,
|
||||
mLastSystemUiFlags, mLastSystemUiFlags);
|
||||
}
|
||||
if (statusBarExpanded && mNavigationBar != null) {
|
||||
final boolean isKeyguardShowing = isStatusBarKeyguard() && !mKeyguardOccluded;
|
||||
if (statusBarExpanded && !isKeyguardShowing && mNavigationBar != null) {
|
||||
if (mNavigationBarController.setBarShowingLw(true)) {
|
||||
changes |= FINISH_LAYOUT_REDO_LAYOUT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user