Skip to content
Commit 7e6ce392 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Promote an app to RECEIVER only when handling a broadcast.

AMS.isReceivingBroadcastLocked() uses
getPreferredSchedulingGroupLocked() to check if a process is
handling a broadcast and which scheduling group the process
should belong to. With the current implementation, even if
an app is not handling a broadcast, it will be promoted to
the RECEIVER state as long as it has some broadcasts waiting
for it, which is not necessary and prevents some broadcast
delays that we added for cached processes from being effective.

Bug: 268082390
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueModernImplTest.java
Change-Id: I6e1df941b6e9715add1727fc5cfe0234c5a5a7f6
parent 0126a404
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment