From a5d6cd0981ba54b0fa775a7c6a4f7eb8f425896c Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Wed, 27 Jul 2016 15:12:40 -0700 Subject: [PATCH] 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 --- .../systemui/statusbar/phone/StatusBarWindowManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java index 5271481895884..a7a792b1f1a70 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java @@ -168,7 +168,11 @@ public class StatusBarWindowManager implements RemoteInputController.Callback { } 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) {