锁屏灭屏状态下,指纹解锁时, 去掉指纹解锁动画效果(这个动画效果是android原生设计)
frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt
private fun showUnlockRippleInternal(biometricSourceType: BiometricSourceType) {
val keyguardNotShowing = !keyguardStateController.isShowing
val unlockNotAllowed = !keyguardUpdateMonitor
.isUnlockingWithBiometricAllowed(biometricSourceType)
if (keyguardNotShowing || unlockNotAllowed) {
logger.notShowingUnlockRipple(keyguardNotShowing, unlockNotAllowed)
return
}
updateSensorLocation()
if (biometricSourceType == BiometricSourceType.FINGERPRINT) {
fingerprintSensorLocation?.let {
mView.setFingerprintSensorLocation(it, udfpsRadius)
circleReveal = CircleReveal(
it.x,
it.y,
0,
Math.max(
Math.max(it.x, displayMetrics.widthPixels - it.x),
Math.max(it.y, displayMetrics.heightPixels - it.y)
)
)
logger.showingUnlockRippleAt(it.x, it.y, "FP sensor radius: $udfpsRadius")
//showUnlockedRipple() //这里注释掉
}
} else if (biometricSourceType == BiometricSourceType.FACE) {
faceSensorLocation?.let {
mView.setSensorLocation(it)
circleReveal = CircleReveal(
it.x,
it.y,
0,
Math.max(
Math.max(it.x, displayMetrics.widthPixels - it.x),
Math.max(it.y, displayMetrics.heightPixels - it.y)
)
)
logger.showingUnlockRippleAt(it.x, it.y, "Face unlock ripple")
showUnlockedRipple()
}
}
}