diff options
| author | 2024-05-24 17:05:26 +0100 | |
|---|---|---|
| committer | 2024-12-09 19:39:37 +0000 | |
| commit | 752c49b6e444d6fb78bd9c1df5b33c408e406f1a (patch) | |
| tree | 1d8dab5fefd776b6101b9ef4eadbe2f083e53690 /libs/input/PointerController.cpp | |
| parent | 5054fff0ca9fade624543369be3fae1f4a7a0a62 (diff) | |
Fix bindApplication starting activities late
With the attachApplication split introduced in
I659f2083f460701d858ebb7a8af9fa748ff4bfe9 apps send
a finishAttachApplication back to the system after
their initialization (Application#onCreate). The system
then dispatches Broadcast, Service and Activity starts
to the app. The delayed dispatch of Activity has 2 side
effects:
1. Apps could post messages on their main thread that will
run before activity start message which could slow down their
ttff.
2. The setFocusedApplication call is delayed and the system
doesn't know the focused application until after app init.
To mitigate this, we dispatch Activity start early before
app init.
Test: atest ActivityManagerTest
Bug: 319519089
Bug: 333663697
Bug: 382378705
Bug: 366147979
Bug: 358102320
Flag: com.android.server.am.expedite_activity_launch_on_cold_start
Change-Id: I762d6e943530133f8031a16f40eda97b4f476cd0
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions