Merge "Separates SFPS and UDFPS BP animation logic" into tm-qpr-dev am: 245bba607f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21147718

Change-Id: I4ffaa4ce35950785bfc395962aac7e19602af4c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Grace Cheng
2023-02-01 22:41:44 +00:00
committed by Automerger Merge Worker

View File

@@ -106,7 +106,7 @@ open class AuthBiometricFingerprintIconController(
iconView.frame = 0
iconViewOverlay.frame = 0
if (shouldAnimateIconViewForTransition(lastState, newState)) {
if (shouldAnimateSfpsIconViewForTransition(lastState, newState)) {
iconView.playAnimation()
}
@@ -167,6 +167,18 @@ open class AuthBiometricFingerprintIconController(
protected open fun shouldAnimateIconViewForTransition(
@BiometricState oldState: Int,
@BiometricState newState: Int
) = when (newState) {
STATE_HELP,
STATE_ERROR -> true
STATE_AUTHENTICATING_ANIMATING_IN,
STATE_AUTHENTICATING -> oldState == STATE_ERROR || oldState == STATE_HELP
STATE_AUTHENTICATED -> true
else -> false
}
private fun shouldAnimateSfpsIconViewForTransition(
@BiometricState oldState: Int,
@BiometricState newState: Int
) = when (newState) {
STATE_HELP,
STATE_ERROR -> true