Generalize pager-adapter to support "many" tabs

(as in "0-1-many": if we have to support "multiple" then we shouldn't
hard-code limitations on the number that we *do* support.)

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

Snapshot 1: build pager-adapters from requests that include enough
details about the pages for us to be able to implement
`setupProfileTabs()` from our own records, without requiring the
caller to provide per-tab data. This change stops short of actually
changing the implementation of `setupProfileTabs()` and mostly just
establishes the bookkeeping / new convention for configuration.

Snapshot 2: implement `MultiProfilePagerAdapter.setupProfileTabs()` to
build tabs from its own records.

Snapshot 3: look up the page number for the "default profile" page,
instead of assuming it's equal to the profile ID (since that may not
be true in the "n-tab" case).

Bug: 310211468
Test: `IntentResolver-tests-{activity,unit}`, `ResolverActivityTest`
Change-Id: I3f8b9f9e53ff7a0740d1accd3a50b08e7c01bb55
6 files changed
tree: b34c2b20724181bf57f0b360796b4ce81fde2ba1
  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