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

Skip to content
Commit 89f6bfea authored by Zim's avatar Zim
Browse files

Add a new ANR category on BIND_APPLICATION_TIMEOUT

In 6c8b9089701172796c0a520a790112465c431ccb we enabled the feature
to delay scheduling Broadcasts or Services to an app during startup
until after after its bindApplication. This mitigates Broadcast and
Service ANRs caused by slow app startup. What would have been an ANR
is now treated as a slow process startup and apps don't have any
visibility into that.

We now add a new timeout, BIND_APPLICATION_TIMEOUT that starts counting
after we call bindApplication on the app. If we hit the timeout, it means
the app took too long to run its app startup code and we trigger an ANR
so that apps can get explicit feedback on their apps.

Note that the PROC_START_TIMEOUT which always existed now only gets
triggered if we don't get to call bindApplication on the app. This
indicates an OS problem that apps cannot do anything about.

Test: atest ActivityManagerTest
Bug: 253908737

Change-Id: Iaad8d39221dc9b3877d784d8a79f8de1678eea88
parent eaed4f07
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