Skip to content
Commit a6805188 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Relax broadcast ANR timeouts based on run_delay.

When the majority of CPU resources are being consumed by other
more-important tasks on the device, a broadcast receiver running at
a lower priority could end up triggering the ANR deadline due to
being starved for resources, which is unfair to that app.

This change relaxes the broadcast ANR timeout relative to the
amount of time a process was runnable-but-waiting, up to double the
normal ANR timeout.

Bug: 241829443
Test: atest FrameworksCoreTests:ProcessCpuTrackerTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueTest
Test: atest FrameworksMockingServicesTests:BroadcastQueueModernImplTest
Change-Id: I903c3fa16e4bd64f1660bd0fb2f221b7b82f3661
parent 1740af50
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