Loading
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