Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +19 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.biometrics; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_REAR; import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UNKNOWN; import static android.view.Display.INVALID_DISPLAY; import static com.android.systemui.Flags.contAuthPlugin; Loading Loading @@ -366,6 +367,8 @@ public class AuthController implements mSfpsEnrolledForUser.put(userId, hasEnrollments); } else if (prop.sensorType == TYPE_REAR) { sensorBiometricType = BiometricType.REAR_FINGERPRINT; } else { sensorBiometricType = BiometricType.OTHER_FINGERPRINT; } break; } Loading Loading @@ -1010,6 +1013,22 @@ public class AuthController implements return false; } /** * @return true if fps HW is supported on this device, but location is unknown. Can return * true even if the user has not enrolled fps. This may be false if called before * onAllAuthenticatorsRegistered. */ public boolean isUnknownFpsSupported() { if (mFpProps != null) { for (FingerprintSensorPropertiesInternal prop: mFpProps) { if (prop.sensorType == TYPE_UNKNOWN) { return true; } } } return false; } private String getNotRecognizedString(@Modality int modality) { final int messageRes; final int userId = mCurrentDialogArgs.argi1; Loading packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricType.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,8 @@ enum class BiometricType(val isFingerprint: Boolean) { // Fingerprint sensor that is located on the side of the device, typically on the power button SIDE_FINGERPRINT(true), // Fingerprint sensor with unknown location OTHER_FINGERPRINT(true), FACE(false), } packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepository.kt +3 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.systemui.biometrics.AuthController import com.android.systemui.biometrics.shared.model.AuthenticationReason import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main Loading @@ -34,6 +33,7 @@ import com.android.systemui.keyguard.shared.model.FailFingerprintAuthenticationS import com.android.systemui.keyguard.shared.model.FingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.HelpFingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope Loading Loading @@ -124,7 +124,8 @@ constructor( private fun getFpSensorType(): BiometricType? { return if (authController.isUdfpsSupported) BiometricType.UNDER_DISPLAY_FINGERPRINT else if (authController.isSfpsSupported) BiometricType.SIDE_FINGERPRINT else if (authController.isRearFpsSupported) BiometricType.REAR_FINGERPRINT else null else if (authController.isRearFpsSupported) BiometricType.REAR_FINGERPRINT else if (authController.isUnknownFpsSupported) BiometricType.OTHER_FINGERPRINT else null } override val isLockedOut: StateFlow<Boolean> by lazy { Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthController.java +19 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.biometrics; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE; import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT; import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_REAR; import static android.hardware.fingerprint.FingerprintSensorProperties.TYPE_UNKNOWN; import static android.view.Display.INVALID_DISPLAY; import static com.android.systemui.Flags.contAuthPlugin; Loading Loading @@ -366,6 +367,8 @@ public class AuthController implements mSfpsEnrolledForUser.put(userId, hasEnrollments); } else if (prop.sensorType == TYPE_REAR) { sensorBiometricType = BiometricType.REAR_FINGERPRINT; } else { sensorBiometricType = BiometricType.OTHER_FINGERPRINT; } break; } Loading Loading @@ -1010,6 +1013,22 @@ public class AuthController implements return false; } /** * @return true if fps HW is supported on this device, but location is unknown. Can return * true even if the user has not enrolled fps. This may be false if called before * onAllAuthenticatorsRegistered. */ public boolean isUnknownFpsSupported() { if (mFpProps != null) { for (FingerprintSensorPropertiesInternal prop: mFpProps) { if (prop.sensorType == TYPE_UNKNOWN) { return true; } } } return false; } private String getNotRecognizedString(@Modality int modality) { final int messageRes; final int userId = mCurrentDialogArgs.argi1; Loading
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/BiometricType.kt +3 −0 Original line number Diff line number Diff line Loading @@ -29,5 +29,8 @@ enum class BiometricType(val isFingerprint: Boolean) { // Fingerprint sensor that is located on the side of the device, typically on the power button SIDE_FINGERPRINT(true), // Fingerprint sensor with unknown location OTHER_FINGERPRINT(true), FACE(false), }
packages/SystemUI/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepository.kt +3 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.systemui.biometrics.AuthController import com.android.systemui.biometrics.shared.model.AuthenticationReason import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main Loading @@ -34,6 +33,7 @@ import com.android.systemui.keyguard.shared.model.FailFingerprintAuthenticationS import com.android.systemui.keyguard.shared.model.FingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.HelpFingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope Loading Loading @@ -124,7 +124,8 @@ constructor( private fun getFpSensorType(): BiometricType? { return if (authController.isUdfpsSupported) BiometricType.UNDER_DISPLAY_FINGERPRINT else if (authController.isSfpsSupported) BiometricType.SIDE_FINGERPRINT else if (authController.isRearFpsSupported) BiometricType.REAR_FINGERPRINT else null else if (authController.isRearFpsSupported) BiometricType.REAR_FINGERPRINT else if (authController.isUnknownFpsSupported) BiometricType.OTHER_FINGERPRINT else null } override val isLockedOut: StateFlow<Boolean> by lazy { Loading