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

Unverified Commit f64cb7e1 authored by Joshua McCloskey's avatar Joshua McCloskey Committed by Kevin F. Haggerty
Browse files

[DO NOT MERGE] fpService#authWithPrompt uses correct user handle.

CTS > BYOD Managed Provisioning > Authentication Bound Keys

Verified Fingerprint-bound key test works as expected.

Test: Manually verified CTS
Bug: 231932206
Change-Id: I473c9c28cd0fbb01f4dd48447ddea8aa32834131
(cherry picked from commit f3650a6d)
(cherry picked from commit c7934628)
Merged-In: I473c9c28cd0fbb01f4dd48447ddea8aa32834131
parent bbf84477
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -332,8 +332,8 @@ public class FingerprintService extends SystemService {
            if (!isKeyguard && !Utils.isSettings(getContext(), opPackageName)
                    && sensorProps != null && sensorProps.isAnyUdfpsType()) {
                try {
                    return authenticateWithPrompt(operationId, sensorProps, userId, receiver,
                            ignoreEnrollmentState, opPackageName);
                    return authenticateWithPrompt(operationId, sensorProps, callingUid,
                            callingUserId, receiver, ignoreEnrollmentState, opPackageName);
                } catch (PackageManager.NameNotFoundException e) {
                    Slog.e(TAG, "Invalid package", e);
                }
@@ -346,6 +346,7 @@ public class FingerprintService extends SystemService {
        private long authenticateWithPrompt(
                final long operationId,
                @NonNull final FingerprintSensorPropertiesInternal props,
                final int uId,
                final int userId,
                final IFingerprintServiceReceiver receiver,
                boolean ignoreEnrollmentState,
@@ -353,7 +354,7 @@ public class FingerprintService extends SystemService {

            final Context context = getUiContext();
            final Context promptContext = context.createPackageContextAsUser(
                    opPackageName, 0 /* flags */, UserHandle.getUserHandleForUid(userId));
                    opPackageName, 0 /* flags */, UserHandle.getUserHandleForUid(uId));
            final Executor executor = context.getMainExecutor();

            final BiometricPrompt biometricPrompt = new BiometricPrompt.Builder(promptContext)