Load app target labels explicitly

DisplayResolveInfo#getDisplayLabel contains a logic to load the label
if it is missing and the majority of app targets in Chooser are loaded
this way.
This CL:
 * removes label loading logic from DisplayResolveInfo;
 * adds explicit label loading with TargetDataLoader, where it's needed;
 * wrap some of the view related code blocks from
   ChooserListAdapter#onBindView into ViewHoder methods to reduce
   branching in the method and make it easier to read.

The legacy DisplayResolveInfo lable-loading logic is effectively
replaced with LoadLabelTaks's logic, the one that is used by resolver.

Bug: 289264582
Test: manual testing: labes loading, targets groupping, targets pinning.
Change-Id: I86814b5a4c67bf117fb1ea28c1d9980b5cf28ef5
16 files changed
tree: bd337579b6e3a46ac1f20182c9c056a00ff2e2ed
  1. aconfig/
  2. java/
  3. .clang-format
  4. Android.bp
  5. AndroidManifest-app.xml
  6. AndroidManifest-lib.xml
  7. OWNERS
  8. PREUPLOAD.cfg
  9. proguard.flags
  10. README.md
  11. TEST_MAPPING
README.md

IntentResolver

About

IntentResolver provides the implementation for Intent ACTION_CHOOSER

See also: ShareCompat.IntentBuilder