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
Loading
Please register or sign in to comment