Merge "Check INTERACT_ACROSS_USERS for getEnrolledTemplates when user is different" into qt-dev
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 3d9a47b..6ebeaf9 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 @@
 
     @Override
     protected List<Fingerprint> getEnrolledTemplates(int userId) {
+        if (userId != UserHandle.getCallingUserId()) {
+            checkPermission(INTERACT_ACROSS_USERS);
+        }
         return getBiometricUtils().getBiometricsForUser(getContext(), userId);
     }