Use keyguard state directly instead of trying to remember it

When updating the divider, this was using the last-remembered
hidden state of the dividerview. The only user of hidden state
was keyguard. Sometimes, split-screen would be dismissed
before keyguard was dismissed. In this situation, the divider
state wouldn't be updated properly. So, instead of trying
to use the potentially incorrect state, always just check the
keyguard directly to determine hidden state.

Bug: 161170237
Test: put 2 apps in splitscreen, lock screen, open emergency,
      then unlock, go to splitscreen again, re-lock and see
      no divider bar.
Change-Id: I470be161e6c712111549959b0f4471867d08a276
This commit is contained in:
Evan Rosky
2020-07-14 09:06:51 -07:00
parent c232251896
commit 4f83ff47a9

View File

@@ -197,7 +197,9 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
return;
}
mView.setHidden(mKeyguardStateController.isShowing());
mImePositionProcessor.updateAdjustForIme();
if (!mKeyguardStateController.isShowing()) {
mImePositionProcessor.updateAdjustForIme();
}
}
@Override
@@ -316,7 +318,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
}
private void update(Configuration configuration) {
final boolean isDividerHidden = mView != null && mView.isHidden();
final boolean isDividerHidden = mView != null && mKeyguardStateController.isShowing();
removeDivider();
addDivider(configuration);