Pull package change handling into pager-adapter

This *somewhat* cleans up a convoluted flow so that the "per-profile"
concerns / references to "inactive profiles" get consolidated into
MultiProfilePagerAdapter, where they'll be audited and generalized in
the n-tab work. This has no side effects (beyond those noted for the
parent change).

These changes are as prototyped in ag/25335069 and described in
go/chooser-ntab-refactoring. See below for a "by-snapshot" breakdown
of the incremental changes composed in this CL.

Snapshot 1:
Move the main implementation from ResolverActivity to delegate through
MultiProfilePagerAdapter, the component that owned most of the data
responsibilities anyways. Note our `-activity` tests provide coverage
for this basic flow (e.g., in manual experimentation, the tests would
fail if I had the relocated method return the wrong value).

Snapshot 2:
Move ChooserActivity's customized package-change consideration (i.e.,
calling `notifyDataSetChanged()` prior to invoking the pager-adapter
package-change handling steps) into `ChooserMultiProfilePagerAdapter`.
This makes the "driver" code in the activities more generic in advance
of moving more responsibilities to the page-adapter.

Snapshot 3: Rebase on parent change, equivalent to snapshots 4 and 5 in
ag/25335069.

(Snapshot 4: update CL description after rebase)

Snapshot 5:
Move "per-profile" handling of refreshing all adapters
into the MultiProfilePagerAdapter, which has a better model of the
complete set of adapters that might need to be refreshed. (From
ag/25335069 "snapshot 6")


Bug: 310211468
Test: `IntentResolver-tests-{unit,activity,integration}`. See notes ^
Change-Id: I77981794345de23d52b4ca6b57ec974c60871dff
4 files changed
tree: 216e8449a550c2f945e73ebaf8dc37746eea3c55
  1. aconfig/
  2. java/
  3. tests/
  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