Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 950df643 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AuthService registerFaceSensor for hidl should only focus on face...

Merge "AuthService registerFaceSensor for hidl should only focus on face hidlConfigStrings" into main am: 850695bc

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3250975



Change-Id: I446113e366f7485952b38b26a11c1a2ec1c03b15
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0a1a92c9 850695bc
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -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);