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

Commit 9aa45dec authored by mattgilbride's avatar mattgilbride Committed by Matt Gilbride
Browse files

FingerprintService - 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.

Bug: 234083358
Test: TH
Change-Id: Iff0327fe516ef7916f616352df151347df28453f
parent 66257b83
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -960,6 +960,8 @@ public class FingerprintService extends SystemService {
        @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
        @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
        @Override
        @Override
        public void scheduleWatchdog() {
        public void scheduleWatchdog() {
            super.scheduleWatchdog_enforcePermission();

            final Pair<Integer, ServiceProvider> provider = mRegistry.getSingleProvider();
            final Pair<Integer, ServiceProvider> provider = mRegistry.getSingleProvider();
            if (provider == null) {
            if (provider == null) {
                Slog.w(TAG, "Null provider for scheduling watchdog");
                Slog.w(TAG, "Null provider for scheduling watchdog");