patches/frameworks/base/0011-Set-old-fingerprint-sensors-to-security-strong.patch

37 lines
2.2 KiB
Diff

From edb6d1c2d1fc4a8f890ec253844db569c846523e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 3 Dec 2022 17:13:24 -0500
Subject: [PATCH 11/11] Set old fingerprint sensors to security "strong"
This allows removing config_biometric_sensors from overlays, which led
to Pixels not booting, because they are using AIDL biometric sensor, and
despite its name, config_biometric_sensors is HIDL-specific
---
.../core/java/com/android/server/biometrics/AuthService.java | 4 ++--
1 file changed, 2 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 b6768c9c087a..bc9684974fca 100644
--- a/services/core/java/com/android/server/biometrics/AuthService.java
+++ b/services/core/java/com/android/server/biometrics/AuthService.java
@@ -753,7 +753,7 @@ public class AuthService extends SystemService {
final int firstApiLevel = SystemProperties.getInt(SYSPROP_FIRST_API_LEVEL, 0);
final int apiLevel = SystemProperties.getInt(SYSPROP_API_LEVEL, firstApiLevel);
String[] configStrings = mInjector.getConfiguration(getContext());
- if (configStrings.length == 0 && apiLevel == Build.VERSION_CODES.R) {
+ if (configStrings.length == 0 && apiLevel <= Build.VERSION_CODES.R) {
// For backwards compatibility with R where biometrics could work without being
// configured in config_biometric_sensors. In the absence of a vendor provided
// configuration, we assume the weakest biometric strength (i.e. convenience).
@@ -938,7 +938,7 @@ public class AuthService extends SystemService {
if (pm.hasSystemFeature(PackageManager.FEATURE_FACE)) {
modalities.add(String.valueOf(BiometricAuthenticator.TYPE_FACE));
}
- final String strength = String.valueOf(Authenticators.BIOMETRIC_CONVENIENCE);
+ final String strength = String.valueOf(Authenticators.BIOMETRIC_STRONG);
final String[] configStrings = new String[modalities.size()];
for (int i = 0; i < modalities.size(); ++i) {
final String id = String.valueOf(i);
--
2.48.1