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

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

Merge "Update the uid correctly."

parents 4f8e6d6a d6b1fcaf
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -2089,7 +2089,7 @@ class AlarmManagerService extends SystemService {
            workSource = _ws;
            flags = _flags;
            alarmClock = _info;
            uid = _uid;
            uid = operation.getCreatorUid();
            pid = Binder.getCallingPid();
        }

@@ -2244,6 +2244,12 @@ class AlarmManagerService extends SystemService {
                mInFlight.add(inflight);
                mBroadcastRefCount++;
                mTriggeredUids.add(new Integer(alarm.uid));
                if (checkReleaseWakeLock()) {
                    if (mWakeLock.isHeld()) {
                        mWakeLock.release();
                        if (localLOGV) Slog.v(TAG, "AM WakeLock Released Internally deliverAlarms");
                    }
                }

                if (allowWhileIdle) {
                    // Record the last time this uid handled an ALLOW_WHILE_IDLE alarm.
@@ -2712,8 +2718,12 @@ class AlarmManagerService extends SystemService {
                    }
                } else {
                    // the next of our alarms is now in flight.  reattribute the wakelock.
                    InFlight inFlight = null;
                    if (mInFlight.size() > 0) {
                        InFlight inFlight = mInFlight.get(0);
                        for(int index = 0; index < mInFlight.size(); index++){
                            inFlight = mInFlight.get(index);
                            if(!mBlockedUids.contains(inFlight.mUid)) break;
                        }
                        setWakelockWorkSource(inFlight.mPendingIntent, inFlight.mWorkSource,
                                inFlight.mAlarmType, inFlight.mTag, false);
                    } else {