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

Skip to content
Commit a3a10f3a authored by Zim's avatar Zim Committed by Zimuzo Ezeozue
Browse files

Finish attach appliation before creating app context

Creating the app context involves getting app resources from the app's
apk. This operation could be blocked on an incremental fs and trigger the proc start timeout.

While fixing this, I noticed that apps could also run code and block in
AppComponentFactory#instantiateClassLoader, so moved the call to finishAttachApplication even earlier.

It's probably worth re-thinking the AnR timeouts around proc starts, because currently, if the app blocks in instantiateClassLoader for instance, neither AnR timeout nor proc start timeout will trigger.

For now, this fixes the test and keeps the behavior as close to the old behavior as possible.

Test: atest CtsPackageManagerStatsHostTestCases:com.android.cts.packagemanager.stats.host.IncrementalAppErrorStatsTests#testAppCrashOnIncremental
Bug: 261009296
Change-Id: Ic75a4e9d38a7c21d4a0b948d6fb26389723a80f6
parent 763a69a3
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