Loading services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java +4 −3 Original line number Diff line number Diff line Loading @@ -298,8 +298,8 @@ public class FingerprintService extends SystemService { if (!isKeyguard && !Utils.isSettings(getContext(), opPackageName) && sensorProps != null && sensorProps.isAnyUdfpsType()) { try { authenticateWithPrompt(operationId, sensorProps, userId, receiver, opPackageName); authenticateWithPrompt(operationId, sensorProps, callingUid, callingUserId, receiver, opPackageName); } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Invalid package", e); } Loading @@ -313,13 +313,14 @@ public class FingerprintService extends SystemService { private void authenticateWithPrompt( final long operationId, @NonNull final FingerprintSensorPropertiesInternal props, final int uId, final int userId, final IFingerprintServiceReceiver receiver, final String opPackageName) throws PackageManager.NameNotFoundException { 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) Loading Loading
services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java +4 −3 Original line number Diff line number Diff line Loading @@ -298,8 +298,8 @@ public class FingerprintService extends SystemService { if (!isKeyguard && !Utils.isSettings(getContext(), opPackageName) && sensorProps != null && sensorProps.isAnyUdfpsType()) { try { authenticateWithPrompt(operationId, sensorProps, userId, receiver, opPackageName); authenticateWithPrompt(operationId, sensorProps, callingUid, callingUserId, receiver, opPackageName); } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Invalid package", e); } Loading @@ -313,13 +313,14 @@ public class FingerprintService extends SystemService { private void authenticateWithPrompt( final long operationId, @NonNull final FingerprintSensorPropertiesInternal props, final int uId, final int userId, final IFingerprintServiceReceiver receiver, final String opPackageName) throws PackageManager.NameNotFoundException { 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) Loading