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

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

Frameworks: Annotate trivial @GuardedBy in services/ misc

Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Derived by errorprone.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Id1d9fbe5018250e3b9d1466fc5f670d5ad902fa3
parent b5cc7205
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -901,6 +901,7 @@ class MagnificationController implements Handler.Callback {
            }
        }

        @GuardedBy("mLock")
        private void setMagnificationSpecLocked(MagnificationSpec spec) {
            if (mEnabled) {
                if (DEBUG_SET_MAGNIFICATION_SPEC) {
+1 −0
Original line number Diff line number Diff line
@@ -1931,6 +1931,7 @@ public class BackupManagerService implements BackupManagerServiceInterface {
    /**
     * Remove a package from the full-data queue.
     */
    @GuardedBy("mQueueLock")
    private void dequeueFullBackupLocked(String packageName) {
        final int N = mFullBackupQueue.size();
        for (int i = N - 1; i >= 0; i--) {
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@ public class DeviceAdminServiceController {
        }
    }

    @GuardedBy("mLock")
    private void disconnectServiceOnUserLocked(int userId, @NonNull String actionForLog) {
        final DevicePolicyServiceConnection conn = mConnections.get(userId);
        if (conn != null) {
+1 −0
Original line number Diff line number Diff line
@@ -10221,6 +10221,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
            mInjector.registerContentObserver(mDefaultImeChanged, false, this, UserHandle.USER_ALL);
        }
        @GuardedBy("DevicePolicyManagerService.this")
        private void addPendingChangeByOwnerLocked(int userId) {
            mUserIdsWithPendingChangesByOwner.add(userId);
        }
+1 −0
Original line number Diff line number Diff line
@@ -1068,6 +1068,7 @@ public class ApfFilter {
        mLastInstallEvent.flags = ApfProgramEvent.flagsFor(mIPv4Address != null, mMulticastFilter);
    }

    @GuardedBy("this")
    private void logApfProgramEventLocked(long now) {
        if (mLastInstallEvent == null) {
            return;
Loading