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

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

Merge "Fix tracking of broadcast reference count"

parents 0ac0d17d d3d42814
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1638,11 +1638,11 @@ class AlarmManagerService extends IAlarmManager.Stub {
                } else {
                    mLog.w("No in-flight alarm for " + pi + " " + intent);
                }
                mTriggeredUids.remove(new Integer(uid));
                if(mBlockedUids.contains(new Integer(uid))) {
                    mBlockedUids.remove(new Integer(uid));
                } else {
                    if(mBroadcastRefCount > 0){
                        mTriggeredUids.remove(new Integer(uid));
                        mBroadcastRefCount--;
                        if (mBroadcastRefCount == 0) {
                            mWakeLock.release();
@@ -1670,7 +1670,8 @@ class AlarmManagerService extends IAlarmManager.Stub {
                        // should never happen
                        try {
                        mLog.w("Alarm wakelock still held but sent queue empty");
                        mWakeLock.setWorkSource(null);
                        mBroadcastRefCount = 0;
                        mWakeLock.release();
                        } catch (IllegalArgumentException ex) {
                            ex.printStackTrace();
                        }