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
Fixes: 231932206
Change-Id: I473c9c28cd0fbb01f4dd48447ddea8aa32834131
(cherry picked from commit f3650a6dee)
This commit is contained in:
committed by
Joshua Mccloskey
parent
8ae2b04df7
commit
5194e4ab29
@@ -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,
|
||||
opPackageName, ignoreEnrollmentState);
|
||||
return authenticateWithPrompt(operationId, sensorProps, callingUid,
|
||||
callingUserId, receiver, opPackageName, ignoreEnrollmentState);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Slog.e(TAG, "Invalid package", e);
|
||||
return -1;
|
||||
@@ -347,6 +347,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,
|
||||
final String opPackageName,
|
||||
@@ -354,7 +355,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)
|
||||
|
||||
Reference in New Issue
Block a user