diff options
| author | 2023-02-01 22:04:03 +0000 | |
|---|---|---|
| committer | 2023-02-01 22:04:03 +0000 | |
| commit | 245bba607f7a5b48a0dba1cc19aa03e167b6c9c5 (patch) | |
| tree | bbe356608e663a055c1206df8336d42aa7f0f0c5 | |
| parent | b4226a794a02f14b79a10db5eba862a9165f23e3 (diff) | |
| parent | af376971c876469bf268ff303a99ca75d3d0362e (diff) | |
Merge "Separates SFPS and UDFPS BP animation logic" into tm-qpr-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt index 71d9940cf79d..1f6f6d97680c 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintIconController.kt @@ -106,7 +106,7 @@ open class AuthBiometricFingerprintIconController( iconView.frame = 0 iconViewOverlay.frame = 0 - if (shouldAnimateIconViewForTransition(lastState, newState)) { + if (shouldAnimateSfpsIconViewForTransition(lastState, newState)) { iconView.playAnimation() } @@ -171,6 +171,18 @@ open class AuthBiometricFingerprintIconController( 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 + STATE_AUTHENTICATING_ANIMATING_IN, STATE_AUTHENTICATING -> oldState == STATE_ERROR || oldState == STATE_HELP || oldState == STATE_IDLE STATE_AUTHENTICATED -> true |