Switch activities to AnnotatedUserHandles fully

As we proceed with our refactoring of other components that may
benefit from AnnotatedUserHandles, it's important that we keep
consistent values; in one local experiment, I had to debug tests that
failed after injecting AnnotatedUserHandles into one such component,
because the test overrides weren't reflected in the annotated records.

This CL switches to AnnotatedUserHandles as the "single source of
truth" (at least w/r/t the getters exposed in the activities/test
wrappers; downstream clients can switch over incrementally).

This is essentially the same as (abandoned) ag/24083383, but this
version is more thorough at switching over in the tests; the previous
version used the legacy (per-handle) data overrides and then adapted
to AnnotatedUserHandles on-the-fly in the one overridden accessor
method. The current approach better mirrors our real app usage in
tests.

Note: as in that earlier draft, this also switches some test cases to
specifying the "handle Sharesheet launched as" instead of the "tab
owner user handle for launch." The "launch handle" is an independent
environment variable that we use to *derive* the "tab owner" according
to our application logic, and we shouldn't skip that in tests.

Test: IntentResolverUnitTests, CtsSharesheetDeviceTest
Bug: 286249609
Change-Id: I3ad911c691b43db52a2774c74dab58eeddb8e443
8 files changed
tree: d114e783f80ca2dc54f0a9555368e3c787f3c06c
  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