More "favoring to identify tabs by profile"

Switching over more cases in the style of ag/25661285.

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

Snapshot 1:
Change the signature of the pager's listener API to include both
profile ID and page number, and update the (one) implementation to be
explicit about which mechanism it's trying to use.

Snapshot 2:
Add metadata to the pager's `ProfileDescriptor` to identify the
associated profile, and begin to generalize away from the assumption
that profile ID numbers are equivalent to their associated page
numbers (i.e., their indexes in the `mItems` list).

Snapshot 3:
Move ResolverActivity's `updateActiveTabStyle()` to be an internal
implementation detail (as a "lambda") of its `setupProfileTabs()`
method. An upcoming snapshot will move `setupProfileTabs()` to the
pager, and this prepares to move it as a unit.

Snapshot 4:
Move "application" logic for tab-switches into the existing
`onProfileTabSelected()` callback, again to make `setupProfileTabs()`
more generic in preparation to move it over to the pager.

Snapshot 5 rebase / snapshot 6 fix conflicts (notably,
`ChooserActivity` no longer inherits from `ResolverActivity` and so
the changes to `ResolverActivity` needed to be replicated in Chooser.)

(Remaining snapshots are tweaks to continue fixing merge conflicts.)

Bug: 310211468
Test: `IntentResolver-tests-actvity`, `ResolverActivityTest`
Change-Id: I9a51a671447a6c4d1a200bf3b0a12a33088ac042
3 files changed
tree: 91fb37ccbb5a1b57851e36e46bbc617f4ed9b103
  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