Add caller ChooserTargets every time the list is rebuilt.
The list gets rebuilt when the screen goes off and on, but the weird
place where the custom targets were being inserted was not getting
called.
Notes:
1. This removes the override of
ResolverActivity.addUseDifferentAppLabelIfNecessary(). I could keep
an empty override to be risk-adverse, but looking at the
ResolverActivity implementation, it only does anything when
ResolverListAdapter.mFilterLastUsed is true, which is only in
ResolverActivity.
2. I verified that multiple calls to addServiceResults() do get deduped
if they happen (see ShortcutSelectionLogic.insertServiceTarget())
Test: atest UnbundledChooserActivityTest
Test: Sharing from photos, turn screen off and on and verify that custom
target properly reappears.
Bug: 280517911
Change-Id: Ie2854ef06ead4fd8085d93c348f31467fd21656e
1 file changed