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

Commit c6829793 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Release wakelocks acquired by SyncManager"

parents 22e68d68 fa266db4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -838,6 +838,13 @@ public final class PowerManagerService extends IPowerManager.Stub
                for (int index = 0; index < mWakeLocks.size(); index++) {
                    WakeLock wl = mWakeLocks.get(index);
                    if(wl != null) {
                        if(wl.mTag.startsWith("*sync*") && wl.mOwnerUid == Process.SYSTEM_UID) {
                            releaseWakeLockInternal(wl.mLock, wl.mFlags);
                            index--;
                            if (DEBUG_SPEW) Slog.v(TAG, "Internally releasing the wakelock"
                                                      + "acquired by SyncManager");
                            continue;
                        }
                        // release the wakelock for the blocked uid
                        if (wl.mOwnerUid == uid || checkWorkSourceObjectId(uid, wl)) {
                            releaseWakeLockInternal(wl.mLock, wl.mFlags);