diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2022-05-24 22:34:58 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-05-24 22:34:58 +0000 |
| commit | ad395487d1d26f3d8a99bc0a4e1747cecbefd960 (patch) | |
| tree | 91bf3b0dce284431cbbe5ab1a77b72166cff79b9 | |
| parent | 67fb0d155abb56f1043e1c681614a4e3b341f8a0 (diff) | |
| parent | 98a9953334420e08f7e712ea1b40574cf8f70d5c (diff) | |
Merge changes I0ababa6b,I1a1ad69b into tm-dev am: 27a45d8ec3 am: 98a9953334
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18577092
Change-Id: I1e2c3e27fe426c28e7d211922b5c37eb531b19bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
3 files changed, 16 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index c6611afe437a..a9692a306c21 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -3517,11 +3517,6 @@ public class CentralSurfacesImpl extends CoreStartable implements @Override public void onTrackingStopped(boolean expand) { - if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) { - if (!expand && !mKeyguardStateController.canDismissLockScreen()) { - mStatusBarKeyguardViewManager.showBouncer(false /* scrimmed */); - } - } } // TODO: Figure out way to remove these. 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 48f57774218b..e3c070e3686e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -483,12 +483,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (mBouncer == null) { return; } + mBouncer.hide(destroyView); if (mShowing) { // If we were showing the bouncer and then aborting, we need to also clear out any // potential actions unless we actually unlocked. cancelPostAuthActions(); } - mBouncer.hide(destroyView); cancelPendingWakeupAction(); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java index aaa5a6bdbe83..0c1d04253bf5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java @@ -320,6 +320,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { mStatusBarKeyguardViewManager.dismissWithAction( action, cancelAction, true /* afterKeyguardGone */); + when(mBouncer.isShowing()).thenReturn(false); mStatusBarKeyguardViewManager.hideBouncer(true); mStatusBarKeyguardViewManager.hide(0, 30); verify(action, never()).onDismiss(); @@ -327,6 +328,20 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { } @Test + public void testHidingBouncer_cancelsGoneRunnable() { + OnDismissAction action = mock(OnDismissAction.class); + Runnable cancelAction = mock(Runnable.class); + mStatusBarKeyguardViewManager.dismissWithAction( + action, cancelAction, true /* afterKeyguardGone */); + + when(mBouncer.isShowing()).thenReturn(false); + mStatusBarKeyguardViewManager.hideBouncer(true); + + verify(action, never()).onDismiss(); + verify(cancelAction).run(); + } + + @Test public void testHiding_doesntCancelWhenShowing() { OnDismissAction action = mock(OnDismissAction.class); Runnable cancelAction = mock(Runnable.class); |
