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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user