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

Commit a71bee87 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Frameworks: Annotate trivial @GuardedBy in services/core

Add @GuardedBy for simple functions that require locks and have a name in
one of the frameworks naming styles for locks ("^.*(Locked|LPw|LPr|L[a-zA-Z]|UL|AL|NL)$").

Changelist for permission manager.

Derived by errorprone.

Bug: 73000847
Test: m
Change-Id: I54bb3a18cbe88d24028d9a90600cd6102598b358
parent 2e8c7670
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2059,6 +2059,7 @@ public class PermissionManagerService {
        }
    }

    @GuardedBy({"mSettings.mLock", "mLock"})
    private int calculateCurrentPermissionFootprintLocked(BasePermission tree) {
        int size = 0;
        for (BasePermission perm : mSettings.mPermissions.values()) {
@@ -2067,6 +2068,7 @@ public class PermissionManagerService {
        return size;
    }

    @GuardedBy({"mSettings.mLock", "mLock"})
    private void enforcePermissionCapLocked(PermissionInfo info, BasePermission tree) {
        // We calculate the max size of permissions defined by this uid and throw
        // if that plus the size of 'info' would exceed our stated maximum.