android15 锁屏灭屏 去掉指纹解锁动画效果

发布于:2025-07-04 ⋅ 阅读:(13) ⋅ 点赞:(0)

锁屏灭屏状态下,指纹解锁时, 去掉指纹解锁动画效果(这个动画效果是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()
            }
        }
    }

网站公告

今日签到

点亮在社区的每一天
去签到