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

Commit 014a5be3 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

[4/?] Reduce BroadcastQueue interface complexity.

Hide dispatch of processNextBroadcastLocked() as an implementation
detail inside the broadcast stack.

This is a no-op change.

Bug: 243656033
Test: atest CtsContentTestCases:BroadcastReceiverTest
Change-Id: I7b5fa50ee5dcd47ca0f5dcda4a59c14d4238634b
parent 7b234eef
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -13349,8 +13349,6 @@ public class ActivityManagerService extends IActivityManager.Stub
                                r.resultAbort, false);
                        if (doNext) {
                            doTrim = true;
                            r.queue.processNextBroadcastLocked(/* frommsg */ false,
                                    /* skipOomAdj */ true);
                        }
                    }
@@ -14546,9 +14544,6 @@ public class ActivityManagerService extends IActivityManager.Stub
                    doNext = r.queue.finishReceiverLocked(r, resultCode,
                        resultData, resultExtras, resultAbort, true);
                }
                if (doNext) {
                    r.queue.processNextBroadcastLocked(/*fromMsg=*/ false, /*skipOomAdj=*/ true);
                }
                // updateOomAdjLocked() will be done here
                trimApplicationsLocked(false, OomAdjuster.OOM_ADJ_REASON_FINISH_RECEIVER);
            }
+0 −2
Original line number Diff line number Diff line
@@ -91,8 +91,6 @@ public abstract class BroadcastQueue {

    public abstract void backgroundServicesFinishedLocked(int userId);

    public abstract void processNextBroadcastLocked(boolean fromMsg, boolean skipOomAdj);

    /**
     * Signal from OS internals that the given process has just been actively
     * attached, and is ready to begin receiving broadcasts.
+6 −2
Original line number Diff line number Diff line
@@ -677,8 +677,12 @@ public class BroadcastQueueImpl extends BroadcastQueue {
        // We will process the next receiver right now if this is finishing
        // an app receiver (which is always asynchronous) or after we have
        // come back from calling a receiver.
        return state == BroadcastRecord.APP_RECEIVE
                || state == BroadcastRecord.CALL_DONE_RECEIVE;
        final boolean doNext = (state == BroadcastRecord.APP_RECEIVE)
                || (state == BroadcastRecord.CALL_DONE_RECEIVE);
        if (doNext) {
            processNextBroadcastLocked(/* fromMsg= */ false, /* skipOomAdj= */ true);
        }
        return doNext;
    }

    public void backgroundServicesFinishedLocked(int userId) {