summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kevin Chyn <kchyn@google.com> 2019-04-25 12:34:15 -0700
committer Kevin Chyn <kchyn@google.com> 2019-04-25 12:34:15 -0700
commit8addd4f67eb94780f39dba42cd2bcde418dd4145 (patch)
tree8990d2563235c0d501bccc02d8a9aee072332505
parenteb8b30d226a24f4c852b02b26fb256efc01f1915 (diff)
Check INTERACT_ACROSS_USERS for getEnrolledTemplates when user is different
Fixes: 128599663 Test: Fingerprint enroll/auth works as expected Change-Id: I18d22d802e6f691056a525c22b221b01b6528ea8
-rw-r--r--services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
index 3d9a47be56ea..6ebeaf9ebe59 100644
--- a/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java
@@ -855,6 +855,9 @@ public class FingerprintService extends BiometricServiceBase {
@Override
protected List<Fingerprint> getEnrolledTemplates(int userId) {
+ if (userId != UserHandle.getCallingUserId()) {
+ checkPermission(INTERACT_ACROSS_USERS);
+ }
return getBiometricUtils().getBiometricsForUser(getContext(), userId);
}