Separates SFPS and UDFPS BP animation logic
Fixes issue with UDFPS animation playing on transition from STATE_IDLE Test: Tested BP on rear-FPS, SFPS, UDFPS devices to check animations Fixes: 266367594 Change-Id: I8ed3371519fe3b2419c32829036bbb0c530e48e1
This commit is contained in:
@@ -104,7 +104,7 @@ open class AuthBiometricFingerprintIconController(
|
||||
|
||||
iconView.frame = 0
|
||||
iconViewOverlay.frame = 0
|
||||
if (shouldAnimateIconViewForTransition(lastState, newState)) {
|
||||
if (shouldAnimateSfpsIconViewForTransition(lastState, newState)) {
|
||||
iconView.playAnimation()
|
||||
}
|
||||
|
||||
@@ -165,6 +165,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
|
||||
|
||||
Reference in New Issue
Block a user