diff options
| author | 2024-09-11 07:54:18 +0000 | |
|---|---|---|
| committer | 2024-09-11 07:54:18 +0000 | |
| commit | 850695bc73ee1d32c87008ecea374545234bedd0 (patch) | |
| tree | 5ea6d37519a91f4473371809f09e665bb13f7024 | |
| parent | 314fcf45f8567d736c700218fb6517764ac6a9e1 (diff) | |
| parent | f19b45e12f397576d961f03bf0de013e5127ce1f (diff) | |
Merge "AuthService registerFaceSensor for hidl should only focus on face hidlConfigStrings" into main
| -rw-r--r-- | services/core/java/com/android/server/biometrics/AuthService.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java index 2a1687209aad..de8aa2d6c246 100644 --- a/services/core/java/com/android/server/biometrics/AuthService.java +++ b/services/core/java/com/android/server/biometrics/AuthService.java @@ -850,10 +850,28 @@ public class AuthService extends SystemService { return; } + boolean tempResetLockoutRequiresChallenge = false; + + if (hidlConfigStrings != null && hidlConfigStrings.length > 0) { + for (String configString : hidlConfigStrings) { + try { + SensorConfig sensor = new SensorConfig(configString); + switch (sensor.modality) { + case BiometricAuthenticator.TYPE_FACE: + tempResetLockoutRequiresChallenge = true; + break; + } + } catch (Exception e) { + Slog.e(TAG, "Error parsing configString: " + configString, e); + } + } + } + + final boolean resetLockoutRequiresChallenge = tempResetLockoutRequiresChallenge; + handlerProvider.getFaceHandler().post(() -> { final FaceSensorConfigurations mFaceSensorConfigurations = - new FaceSensorConfigurations(hidlConfigStrings != null - && hidlConfigStrings.length > 0); + new FaceSensorConfigurations(resetLockoutRequiresChallenge); if (hidlConfigStrings != null && hidlConfigStrings.length > 0) { mFaceSensorConfigurations.addHidlConfigs(hidlConfigStrings, context); |