diff options
| author | 2023-08-01 19:13:43 +0100 | |
|---|---|---|
| committer | 2023-08-08 11:50:22 +0100 | |
| commit | beef3189eaa76c7675b89ba5dc50bb8176603a72 (patch) | |
| tree | e34370a5c3a37ba331f909355b08d31c6b626ef8 /cmds/bootanimation/BootAnimation.cpp | |
| parent | 77bfa874878227b4aea39aa98d882c182c025e93 (diff) | |
Defer service requests if the app hasn't finished startup
If an app is still in the 'pending finish attach' state, we should
not schedule any service requests to the app because:
1. Pending requests will be dispatched as soon as its startup completes
2. Even if we dispatch a request, it doesn't actually expedite the request
because it will be blocked on the apps main thread which is currently
busy starting up.
3. Lastly and most importantly, this could lead to multiple onCreate requests
to the same service when the app completes startup if there were multiple bind
requests prior to its startup.
This is easy to repro with a test app that sleeps in the Application#onCreate
while a bindService is sent multiple times during the sleep.
Test: Manual (CTS pending)
Bug: 289688173
Change-Id: Iedaa62354418428a98b612067dd6439daf9dd530
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
0 files changed, 0 insertions, 0 deletions