Keyguard: Reapply insets when fitsSystemWindow changes

Fixes a race in setting up the bouncer. Previously, if the bouncer was
set up before fitting system windows changed to keyguard mode, the bouncer
would not get the insets because they were eaten by the status bar view.

Change-Id: I326081604c59d0a7d57257f4c16bba54edd8d6c0
Fixes: 30401184
This commit is contained in:
Adrian Roos
2016-07-27 15:12:40 -07:00
parent a0f07728d9
commit a5d6cd0981

View File

@@ -168,7 +168,11 @@ public class StatusBarWindowManager implements RemoteInputController.Callback {
} }
private void applyFitsSystemWindows(State state) { private void applyFitsSystemWindows(State state) {
mStatusBarView.setFitsSystemWindows(!state.isKeyguardShowingAndNotOccluded()); boolean fitsSystemWindows = !state.isKeyguardShowingAndNotOccluded();
if (mStatusBarView.getFitsSystemWindows() != fitsSystemWindows) {
mStatusBarView.setFitsSystemWindows(fitsSystemWindows);
mStatusBarView.requestApplyInsets();
}
} }
private void applyUserActivityTimeout(State state) { private void applyUserActivityTimeout(State state) {