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

Commit 19b835ab authored by mattgilbride's avatar mattgilbride Committed by Matt Gilbride
Browse files

services.core.unboosted - call PermissionEnforcer helper on methods annotated...

services.core.unboosted - call PermissionEnforcer helper on methods annotated with @EnforcePermission

Migrates all existing java methods annotated with @EnforcePermission
such that they call the super.<methodName>_enforcePermission
method provided by PermissionEnforcer.

This required by the @EnforcePermission annotation, but is currently a
no-op, and will be switched on with ag/20325484.

This CL migrates incremental additions made since the original LSC
ag/20189550.

Bug: 234083358
Test: TH
Change-Id: Ia8b9c10c7af41ac6dff699e6b78f012d50389e6c
parent 4e72b984
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -780,6 +780,8 @@ public class BiometricService extends SystemService {
        @Override // Binder call
        public void resetLockout(
                int userId, byte[] hardwareAuthToken) {
            super.resetLockout_enforcePermission();

            Slog.d(TAG, "resetLockout(userId=" + userId
                    + ", hat=" + (hardwareAuthToken == null ? "null " : "present") + ")");
            mBiometricContext.getAuthSessionCoordinator()
+2 −0
Original line number Diff line number Diff line
@@ -942,6 +942,8 @@ public class FingerprintService extends SystemService {
        @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
        @Override
        public void setUdfpsOverlay(@NonNull IUdfpsOverlay controller) {
            super.setUdfpsOverlay_enforcePermission();

            for (ServiceProvider provider : mRegistry.getProviders()) {
                provider.setUdfpsOverlay(controller);
            }
+2 −0
Original line number Diff line number Diff line
@@ -2676,6 +2676,8 @@ public class InputManagerService extends IInputManager.Stub
    @EnforcePermission(Manifest.permission.BLUETOOTH)
    @Override
    public String getInputDeviceBluetoothAddress(int deviceId) {
        super.getInputDeviceBluetoothAddress_enforcePermission();

        return mNative.getBluetoothAddress(deviceId);
    }