diff options
| author | 2023-03-30 16:39:48 +0000 | |
|---|---|---|
| committer | 2023-03-30 16:39:48 +0000 | |
| commit | 2c67f7ed0061baa22f982807ffd7f7365b13ae18 (patch) | |
| tree | 6eaff0f8b4330939761a1cdc7cff08bdcbc186ec | |
| parent | 3a00521addfa573b2d11d189365863b852e7520c (diff) | |
| parent | 704b4a2c26a05ac257067f7540d11ade5ee72745 (diff) | |
Merge "Fix dismiss callback when keyguard is dismissing." into tm-qpr-dev am: 704b4a2c26
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22317124
Change-Id: Ia4158aedc82ecba35e6b2b3a73415e8de67a80b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 files changed, 7 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt index e9184aeeb29e..59bcfe09df5d 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt @@ -106,10 +106,9 @@ constructor( val panelExpansionAmount: Flow<Float> = repository.panelExpansionAmount /** 0f = bouncer fully hidden. 1f = bouncer fully visible. */ val bouncerExpansion: Flow<Float> = - combine( - repository.panelExpansionAmount, - repository.primaryBouncerShow - ) { panelExpansion, primaryBouncerIsShowing -> + combine(repository.panelExpansionAmount, repository.primaryBouncerShow) { + panelExpansion, + primaryBouncerIsShowing -> if (primaryBouncerIsShowing) { 1f - panelExpansion } else { @@ -201,6 +200,7 @@ constructor( dismissCallbackRegistry.notifyDismissCancelled() } + repository.setPrimaryStartDisappearAnimation(null) falsingCollector.onBouncerHidden() keyguardStateController.notifyPrimaryBouncerShowing(false /* showing */) cancelShowRunnable() @@ -312,11 +312,8 @@ constructor( runnable.run() return } - val finishRunnable = Runnable { - runnable.run() - repository.setPrimaryStartDisappearAnimation(null) - } - repository.setPrimaryStartDisappearAnimation(finishRunnable) + + repository.setPrimaryStartDisappearAnimation(runnable) } /** Determine whether to show the side fps animation. */ diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt index bdc33f45c717..4c8a0a51bcdf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorTest.kt @@ -131,6 +131,7 @@ class PrimaryBouncerInteractorTest : SysuiTestCase() { verify(repository).setPrimaryShowingSoon(false) verify(repository).setPrimaryShow(false) verify(mPrimaryBouncerCallbackInteractor).dispatchVisibilityChanged(View.INVISIBLE) + verify(repository).setPrimaryStartDisappearAnimation(null) } @Test |