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>
This commit is contained in:
Aaron Liu
2023-03-30 16:39:48 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 9 deletions

View File

@@ -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. */

View File

@@ -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