0b710af834f5e8c593ed00bc3c46e36f0d0076fb
The one-at-a-time processing model was vestigial from supporting ChooserTargetService. If we need to process n shortcuts, it's inefficient to context-switch and handle n+1 messages (including the completion message) if we can instead pack all n results into a single message. The new approach is also much simpler, since we now know we have all the data on hand before proceeding - previously we forced an "unbatched" processing model on the downstream clients, and then had to design around the problems that *that* created (in particular, I haven't confirmed yet, but I *suspect* that we could get rid of the 250ms LIST_VIEW_UPDATE_MESSAGE delay after this change, since now we can just send that message a single time at the end of the batch without worrying about throttling). Further cleanup like that will come in a later CL -- for now this is the minimum change required to adopt a batch-processing model. I claim that this change is safe because there was no benefit to the one-at-a-time streaming model -- it didn't cause results to appear to the user any faster. We already had the full set of results on hand when we started emitting these messages from ChooserActivity::sendShareShortcutInfoList; the per-result processing we do in that loop isn't very expensive (and it runs in the same thread as the ChooserHandler anyways); and even if we were somehow picking up a marginal benefit, it would've been masked by the 250ms timeout. (There *maybe* could be some concern if ChooserListAdapter's addServiceResults is too expensive for us to block and call for each result in the batch, but 1. that seems unlikely; 2. if there *is* anything expensive about addServiceResults we can probably optimize it by switching to a batch-processing model in the Adapter as well; and 3. if the Adapter needs to subdivide these tasks to remain performant, it should take that responsibility on for itself.) This optimization was made possible by the removal of ChooserTargetService support (since in the old model, we actually *didn't* have all the results on hand at the start). Test: manual & atest Change-Id: Iaaab546cc274bf1879941901260b7ade62cbcaa5
Merge "Rename merged services.txt module" am:
74b15ca3c5 am: 58ae8524f5 am: 590544a108 am: 2e4629a729 am: 7fafe71ffc
…
…
Merge "Migrate WALLPAPER_LIGHT debug message to ProtoLog." into sc-v2-dev am:
cd9c90750a am: 54bfd5e650
…
…
…
…
…
…
…
…
…
Merge "Add empty package + OWNERS file for critical event protos" am:
ae99d9ba9c am: d27b7d3952 am: 259ca6f387 am: 169b1b9f79 am: c806e66504
…
…
…
Merge "WindowState isSyncFinished should also check isVisibleRequested" into sc-v2-dev am:
1d0c96e853 am: adfa19fde5
Merge "Do not strip trailing F's of test ICCID" am:
78a8259df5 am: 60a553a4e6 am: 1701e21425 am: 347582a227 am: 7ee17eb840
…
…
…
…
Description
No description provided
Languages
Java
73.7%
Kotlin
14%
PowerBuilder
5.8%
C++
5.2%
AIDL
1%