commit | 500df2ce5d4c36934a347aeaed5435e4d136453e | [log] [tgz] |
---|---|---|
author | Joshua Trask <joshtrask@google.com> | Wed Aug 23 22:19:54 2023 +0000 |
committer | Joshua Trask <joshtrask@google.com> | Thu Sep 14 13:55:03 2023 +0000 |
tree | d114e783f80ca2dc54f0a9555368e3c787f3c06c | |
parent | 9e2a01d0ca25a274ad317f1b1c7866b8967724b2 [diff] |
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
IntentResolver
provides the implementation for Intent ACTION_CHOOSER
See also: ShareCompat.IntentBuilder