commit | 17975c5e39c9eb30b20fb92857a92fbaef43029a | [log] [tgz] |
---|---|---|
author | Matt Pietal <mpietal@google.com> | Thu Oct 31 16:02:53 2024 +0000 |
committer | Matt Pietal <mpietal@google.com> | Thu Oct 31 16:02:53 2024 +0000 |
tree | 0f41e9d4195774c1b47c8344a98b8eae451e6476 | |
parent | 98b44b0bf4571dff23fc4d824d8a372cd527b49a [diff] |
Clear leave shade open on bouncer exit Various points in the code may set the state to indicate that the shade should stay open after unlocking. However, if the bouncer is canceled via back gesture, the flag could remain on. Fixes: 375969371 Test: atest StatusBarKeyguardViewManagerTest Flag: EXEMPT bugfix Change-Id: I973b1532624f12421d223f6241db1fea80d02c94
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java index b2794d8..0eb6203 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java
@@ -804,6 +804,13 @@ } @Test + public void onBackPressedResetsLeaveOnKeyguardHide() { + when(mPrimaryBouncerInteractor.isFullyShowing()).thenReturn(true); + mStatusBarKeyguardViewManager.onBackPressed(); + verify(mStatusBarStateController).setLeaveOpenOnKeyguardHide(false); + } + + @Test public void testResetHideBouncerWhenShowingIsFalse_alternateBouncerHides() { // GIVEN the keyguard is showing reset(mAlternateBouncerInteractor);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 9cda199..0c511aea 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -1348,6 +1348,7 @@ if (!canHandleBackPressed()) { return; } + mStatusBarStateController.setLeaveOpenOnKeyguardHide(false); boolean hideBouncerOverDream = isBouncerShowing() && mDreamOverlayStateController.isOverlayActive();