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

Commit 2f4aaa47 authored by Haining Chen's avatar Haining Chen
Browse files

Fix inconsistent permission checks for getSensorPropertiesInternal

There is an inconsistency between FaceManager and FaceService for the
permission required for getSensorPropertiesInternal. FaceManager checks
for USE_BIOMETRIC_INTERNAL while FaceService checks for
MANAGE_BIOMETRIC. Based on the definitions of those two permissions,
change to enforce USE_BIOMETRIC_INTERNAL.

Bug: 264719388

Test: m -j && atest com.android.server.biometrics
Change-Id: I86f7902b3dfc99aef094643e1b2fe88299c2aff4
parent f76de3d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ interface IFaceService {
    byte[] dumpSensorServiceStateProto(int sensorId, boolean clearSchedulerBuffer);

    // Retrieve static sensor properties for all face sensors
    @EnforcePermission("MANAGE_BIOMETRIC")
    @EnforcePermission("USE_BIOMETRIC_INTERNAL")
    List<FaceSensorPropertiesInternal> getSensorPropertiesInternal(String opPackageName);

    // Retrieve static sensor properties for the specified sensor
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ public class FaceService extends SystemService {
            return proto.getBytes();
        }

        @android.annotation.EnforcePermission(android.Manifest.permission.MANAGE_BIOMETRIC)
        @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
        @Override // Binder call
        public List<FaceSensorPropertiesInternal> getSensorPropertiesInternal(
                String opPackageName) {