summaryrefslogtreecommitdiff
path: root/java
AgeCommit message (Collapse)Author
2024-02-12Remove shareousel preview action button Steve Elliott
Bug: 302691505 Flag: ACONFIG android.service.chooser.chooser_payload_toggling DEVELOPMENT Test: N/A - code isn't live Change-Id: I52709bc0740792e1a63cc5a2519559df67b746f7
2024-02-09Merge changes I0d568a6c,I092d9b67 into main Treehugger Robot
* changes: Add PayloadToggleInteractor implementation Shareousel selection tracker component
2024-02-09Add PayloadToggleInteractor implementation Andrey Epin
Bug: 302691505 Test: IntentResolver-tests-unit Change-Id: I0d568a6c30781e81a65b33e8e8ae46e3def23bb9
2024-02-09Shareousel selection tracker component Andrey Epin
A building block for the payload toggling functionality. A component to track items selection and their relative order. The order is specified by the set of the initially selected items and can be overriden by the order on items in the cursor (in case the cursor and the set of initilly selected items is not in sync, which is not expected). Bug: 302691505 Test: IntentResolver-tests-unit Change-Id: I092d9b678c7fbcdc8303e04de0cacbb9d125fa5f
2024-02-09Makes default sharesheet show metadata text below title Govinda Wasserman
This change is guarded by android.service.chooser.Flags.FLAG_ENABLE_SHARESHEET_METADATA_EXTRA. Test: atest com.android.intentresover.v2.ui.viewmodel \ com.android.intentresolver.contentpreview BUG: 318942069 Change-Id: I7530338ce4e8ce1ca4d1b9f6498c27881d31e6a7
2024-02-09Merge "Import translations. DO NOT MERGE ANYWHERE" into main Bill Yi
2024-02-09Merge "Add album headline override support to Chooser" into main Matt Casey
2024-02-09Shareousel selection change callback component Andrey Epin
A building block for payload toggling functinality. A component that selectin change callback invocation. Bug: 302691505 Test: IntentResolver-tests-unit Change-Id: I02d99dedb6166568ecae1e52973df90598601c9d
2024-02-09Merge "Shareousel target intent modifier component" into main Andrey Yepin
2024-02-09Merge "Correctly color + place Shareousel preview icons" into main Treehugger Robot
2024-02-09Shareousel target intent modifier component Andrey Epin
A building block for the payload toggling functinality. Modifies target intent based on the set of selected items. Bug: 302691505 Test: IntentResolver-tests-unit Change-Id: If3b165254fef70cf58718e20d28e874554a9818f
2024-02-09Add album headline override support to Chooser Matt Casey
Test: atest TextContentPreviewUiTest HeadlineGeneratorImplTest ChooserRequestParametersTest ChooserRequestTest Test: Manual testing with ShareTest Test: Manual testing with CTS Verifier Flag: intentresolver/android.service.chooser.chooser_album_text Bug: 323380224 Change-Id: I319cb2a402554ee658b91f1139051136742527e5
2024-02-08Correctly color + place Shareousel preview icons Steve Elliott
Bug: 302691505 Flag: ACONFIG android.service.chooser.chooser_payload_toggling DEVELOPMENT Test: N/A - code isn't live Change-Id: I98bb1fec01e20a5dd61ba8c641f4f7a58639035e
2024-02-08Shareousel cursor reader Andrey Epin
A building block for the payload toggling functinality -- a bi-directional cursor reaer that starts reading URIs from the cursor starting at a specified position ignoring all items thad does not match a given predicate. Bug: 302691505 Test: IntentResolver-tests-unit Change-Id: I83d40435f4b73c73f6d8b49080645a008d34727b
2024-02-08Add new API arguments to ChooserRequest Andrey Epin
Bug: 302691505 Test: atest IntentResolver-tests-unit Change-Id: I8f7122649f07a56a67df3db513fe73f5870e3eb6
2024-02-08Merge "Shareousel content preview ui + view-model" into main Steve Elliott
2024-02-08Merge "Shareousel composables and view-model definitions" into main Treehugger Robot
2024-02-08Shareousel content preview ui + view-model Steve Elliott
Domain is mostly stubbed, coming in later CLs. Bug: 302691505 Flag: ACONFIG android.service.chooser.chooser_payload_toggling DEVELOPMENT Test: N/A - code isn't live Change-Id: Id9041f1e842007aef64653e8f96357d90bb7a657
2024-02-08Shareousel composables and view-model definitions Steve Elliott
Bug: 302691505 Flag: ACONFIG android.service.chooser.chooser_payload_toggling DEVELOPMENT Test: N/A - code isn't live Change-Id: Ibf197591b238a286b12290ccc33d69ab3efd56d8
2024-02-08Import translations. DO NOT MERGE ANYWHERE Bill Yi
Auto-generated-cl: translation import Change-Id: If8b6015693c22fd851f421dc1722e6dbc2d02a62
2024-02-07Inject multiple flag libs as uniquely named typealiases Mark Renouf
Bug: n/a Test: n/a Change-Id: I4763676802bf59a9582d26e467953dcc501dd8d6
2024-02-06Fix usage of wrong resource constant Mark Renouf
The wrong 'R' class was referenced. Use of com.android.internal.R to fetch resources from the application will result in undefined behavior, crashes or just random strings. This is failing several activity tests due to assertions on text that is expected to appear. Test: atest IntentResolver-tests-activity Bug: n/a Change-Id: I3289b46d71469795a7e03416f29cbf8ad3868c2f
2024-02-06Merge "Fix duplicated User values when availability changes" into main Treehugger Robot
2024-02-06Fix duplicated User values when availability changes Mark Renouf
When the availability has updated, the updated user was appended, but the prvious value was never removed, causing the list to continue growing. Test: atest IntentResolver-tests-unit Test: onHandleAvailabilityChange_userStateMaintained Bug: 324073704 Change-Id: I3c51ea9e1a2cf0de9c064b08e7c9f21c4c0f7af1
2024-02-05Move ChooserListController out of ChooserActivity Mark Renouf
Test: n/a - purely mechanical refactor Change-Id: I00995885e0845b8bfff92b113feb80f29867b9a4
2024-02-03Merge "Adds updateState to UserInteractor" into main Mark Renouf
2024-02-03Merge "Adds ResolverRequest, moves handing to tested code" into main Treehugger Robot
2024-02-03Adds updateState to UserInteractor Mark Renouf
This allows the domain layer to modify the availability of a profile. Test: atest IntentResolver-tests-unit:UserInteractorTest Bug: 309960444 Change-Id: I70b5eac3e0d58a7b16c09b3814ad71719d3937dd
2024-02-03Adds ResolverRequest, moves handing to tested code Mark Renouf
This formalizes the inputs to ResolverActivity, replacing the equivalent inline code. Fields that were temporarily routed through 'ActivityLogic' are now removed. Bug: 300157408 Test: atest IntentResolver-tests-activity Test: atest IntentResolver-tests-unit:ResolveRequestTest Change-Id: I79d9fa21b91d0ce9b008af12ba3bffbd60e91a38
2024-02-01Merge "Adds ProfilePagerResources" into main Mark Renouf
2024-01-31Merge "Use Injected package manager consistently" into main Treehugger Robot
2024-01-30Adds ProfilePagerResources Mark Renouf
This consolidates resources for tabbed profile UI into a form which can be accessed generically, via profile type, instead of specific properties. Bug: 309960444 Test: manual Change-Id: If96d1a5956ee5c25a36ab5d7160289bb655c224b
2024-01-30Merge "Rename CallerInfo -> ActivityLaunch and inject" into main Mark Renouf
2024-01-30Merge "ChooserAdapter: fix NPE for non-work profiles" into main Treehugger Robot
2024-01-30Use Injected package manager consistently Mark Renouf
Fixes several places in ResolverActivity which access activity.getPackageManager() directly. This is to prepare migrating the existing depdendency override mechansim to the one provided by hilt-testing. Bug: 300157408 Test: atest IntentResolver-tests-activity Change-Id: I16052383061ff8f44d54fd3d6f9dc0d1e9809821
2024-01-30Rename CallerInfo -> ActivityLaunch and inject Mark Renouf
Rename CallerInfo to ActivityLaunch and renames some existing properties as appropriate for clarity. Adds the [Intent] from the activity. This completes the set of info that is needed as inputs from the caller, containing the extras with all request parameters. Updates readChooserRequest require only an ActivityLaunchInfo instance. Injects ActivityLaunch into usage sites. This removes the direct link of reading acitivty.intent, and will allow writing test code which operates directly on inputs without starting an activity. Introduces an extension method to minimize duplicated code in the activities: CreationExtras.addDefaultArgs: Bug: 300157408 Test: atest IntentResolver-tests-activity Test: atest IntentResolver-tests-unit:ActivityLaunchTest Change-Id: Ie132cb3d61e139e03316063186c3ad79d2c488ef
2024-01-26ChooserAdapter: fix NPE for non-work profiles Adam Bookatz
For some non-work profiles (Communal, and maybe Private), the getListAdapterForUserHandle is returning null. The method is indeed nullable. But we run getCount on it without doing a null-check, causing crashes for such profiles. This previously couldn't have happened, since shouldShowTabs() returns false in these cases, and the evaluation was skipped; however, ag/I8273cf365a1e00b1acff4030086f1a044ad7531f moved that check to later, so we are hitting this problem. Bug: 322523699 Bug: 320369524 Bug: 320615143 Bug: 322497953 Test: atest IntentResolver-tests-unit Change-Id: I82303d6a6a1be1066f5c3e05c53f6a70d486bf5a
2024-01-25UserInteractor and Profile Mark Renouf
A domain component which applies business logic to User data. This component maps Users to Profiles, the set of which is defined by Profile.Type Bug: 309960444 Test: atest IntentResolver-tests-unit:UserInteractorTest \ FakeUserRepositoryTest Change-Id: I9832836ae019ba1b0ae45366f9fc0e26bc9b23ce
2024-01-24Make ProfileRecords map a normal Map Mark Renouf
Change-Id: Ifb0f34133c2c6c12e985eb6e732acb4f5858675f
2024-01-23Updates UserRepository users to List<User> Mark Renouf
This is a way to provide a stable iteration order to consumers. Bug: 300157408 Bug: 309960444 Test: atest IntentResolver-tests-unit Change-Id: I502b9744e93288bf1682d009c1e2ba03cfc013a9
2024-01-23Specify tabs to display by a list of `TabConfig`s Joshua Trask
This was the last "snapshot" (#37) from my prototype CL ag/25335069. We should now be able to support arbitrary sets of tabs as specified by the activity (or other client, if/when we move the instantiation). Test: IntentResolver-tests-{unit,activity}; ResolverActivityTest Bug: 310211468 Change-Id: I1526cbce97bff6305c4e79c53a96181e185ab27f
2024-01-23Rename @Profile to @ProfileType Mark Renouf
This is a temporary step before introducing a new data class to represent a Profile which will also carry a type identifier within. This is a name only change with no functional changes. Bug: 309960444 Test: atest IntentResolver-tests-unit Change-Id: I40e09b2b59005b3d91ea310aff1137813230733f
2024-01-19Merge "Refactor ChooserRequestParameters usage" into main Mark Renouf
2024-01-19Don't crash using a destroyed AppPredictor client Joshua Trask
Bug: 318294957 Test: Build/presubmits Change-Id: Ic0a99e61cf6e1e687b75034c392f08eb098f7544
2024-01-18Refactor ChooserRequestParameters usage mrenouf
Creates ChooserRequest data class Uses validation lib to implement parsing of source data Introduces ChooserViewModel as a new target to begin migration of control flow, data and dependencies out of ChooserActivity and into smaller testable units. Test: atest IntentResolver-tests-activity:com.android.intentresolver.v2 Bug: 309960444 Change-Id: I39b3517ec9e17525441d349b3da139ad5956c600
2024-01-10Removes TargetDataLoader from adapter factory method chain Mark Renouf
TargetDataLoader is removed from ActivityLogic since it is now only used via direct constructor call by ResolverActivity, and injected directly to a field of ChooserActivity. Since it is only needed to pass to the ChooserListAdapter or ResolverListAdapter constructor, this removes the parameter from being forwarded through a sequence of functions and instead references the injected parameter directly when calling the contructor. This allows smoother transition to an assisted-inject factory. Bug: 300157408 Test: atest IntentResolver-tests-activity:com.android.intentresolver.v2 Change-Id: I18b230eaf97bf8e26e23e2e1cd1372e7d078520f
2024-01-09Move common intent forwarding code into shared module Mark Renouf
This change combines and deduplicates intent forwarding code from both Chooser and Resolver, as well the temporary scaffolding from ActivityLogic. Bug: 300157408 Test: atest IntentResolver-tests-activity:com.android.intentresolver.v2 Change-Id: If9dde430f24608e4a0c5bb9ec69a374386c044ed
2024-01-09Break system service deps into separate modules Mark Renouf
This is required to selectively replace dependencies within tests using @UninstallModules with @TestInstallIn or @BindValue. Within this change, tests which override package manager behavior are updated to use this mechanism, and PackageManager is removed from ChooserActivityOverrideData. Bug: 300157408 Test: atest IntentResolver-tests-activity:com.android.intentresolver.v2 Change-Id: I439b291b5768871f5a1c10f608bea1a9e7c2635b
2024-01-09Fix crash on pinning a target, and launching 'stacked' results Mark Renouf
ChooserTargetActionsDialogFragment was attempting to cast it's containing activity to a specific instance in order to make a listener call. ChooserStackedAppDialogFragment has the same issue, downcasting getActivity(). This change fixes the crashes by introducing a common interface for both versions. Bug: 319127480 Test: manual; enable chooser v2, share, pin a target Change-Id: Ib4817494c257e8620fe742320d3fc157a0daa15e
2024-01-08Merge "Generalize pager-adapter to support "many" tabs" into main Joshua Trask