Do the sorting for the ShareSheet asynchronously.
This lets the screen fade out and share sheet start being displayed
before all results are sorted. Based heavily on ag/1126533. There are
two other follow ups that I'd like to do after this that aren't a part
of this change:
1) Investigating images being loaded multiple times (from original
change)
2) Put placeholder space while the sorted images are coming in - at the
moment there's some jank when the list of applications becomes
visible.
Test: Unit tests for ChooserActivityTest (still would like to add tests
for ResolveInfoController and UsbResolverActivity).
Change-Id: I4c4a65fff1b0f17fc52b9bd01c3d5c59d649d119
7 files changed