summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2025-09-18[SP 2025-09-01] Sanitize cross-profile intents. Andrey Yepin
Remove package or component information from payload intents (and their selectors) for cross-profile sharing. Bug: 407764858 Test: manual testing Test: atest IntentResolver-test-unit Test: ag/32976049 (checked out and ran locally) Flag: EXEMPT bugfix Change-Id: I1ebfd96b2aabba6665267722603c72cbe4aefe0f (cherry picked from commit d605b5448615815cb6a7630637b9c55349ffe36e)
2025-03-07Merge "HSUM fixes for IR's ResolverActivityTest" into main Matt Casey
2025-03-07HSUM fixes for IR's ResolverActivityTest Matt Casey
Bug: 401381978 Bug: 401381771 Test: atest com.android.intentresolver.ResolverActivityTest Flag: EXEMPT test only Change-Id: If6042126b0da5b3406b24ad41f17c9928eb6877d
2025-03-06Fix ChooserActivityWorkProfileTest for HSUM Matt Casey
Bug: 396877163 Test: atest ChooserActivityWorkProfileTest Flag: EXEMPT test only Change-Id: I41511b2ed722ef0864ec82e3fef21c8eab8a2206
2025-02-25Merge "Some initial shareousel integration tests." into main Andrey Yepin
2025-02-24Some initial shareousel integration tests. Andrey Yepin
Set debug tags for shareousel items to allow items be targeted by the tests; Bug: 396745989 Test: manual a11y smoke test; manual functionality smoke test. Flag: EXEMPT trivial refactoring; tests only. Change-Id: Ic3c1f14190adea1502ac2cc24b229502c3f0d18d
2025-02-24Update the text preview UI copy button content description Andrey Yepin
Update the text preview UI copy button content description from "copy" to either "Copy text" or "Copy link" depending whether the shared text is a link. Fix: 395683735 Test: atest IntentResolver-tests-unit Test: manual testing: share a text and a link and check TalkBack announcement for the button. Flag: EXEMPT bug fix Change-Id: I668c2fd7e7f0a025c75e43a8a49541ebf3a94730
2025-02-14HSUM fixes for ChooserActivityTest Matt Casey
It's using the instrumentation's personal user ID but then has hard-coded work and clone profile IDs. On HSUM, those were colliding. Bug: 396572907 Bug: 396572029 Test: atest ChooserActivityTest (on HSUM and non-HSUM devices) Flag: EXEMPT test only Change-Id: If5c5c9ad7f23b057ee18b8931cf9086725b36859
2025-01-23Clear cached direct targets. Andrey Yepin
This change re-introduce a fix for direct targets "blinking" after a payload change is mande in the Shareousel under a new flag. It also fixes the critical issue that caused the previus flag's reversal by a proper cache cleaning. Fix: 343300158 Test: test Shareousel payload changing and sharing to a shortcut. Flag: com.android.intentresolver.fix_shortcuts_flashing_fixed Change-Id: If7ade45bda4a2b42f9b5838cbb315ec00546489c
2025-01-14Merge "Allow text toggle for shares from sysui." into main Matt Casey
2025-01-14Allow text toggle for shares from sysui. Matt Casey
Criteria will need to be refined in a follow-up CL, but getting the parts in place behind a flag here. Preview UI change is minimal. Test has some duplicated boilerplate but choosing not to refactor that because the UI itself is a better refactor candidate but outside the scope of this CL. Bug: 242791070 Test: atest ChooserRequestTest Test: atest FilesPlusTExtContentPreviewUiTest Test: manual end-to-end test with feature flag on. Flag: com.android.systemui.shared.screenshot_context_url Change-Id: I6eaca454a88e8b8c8a196d825c7ac3daee437109
2025-01-07Merge "Remove released preview_image_loader feature flag." into main Treehugger Robot
2024-12-20Merge "A feature flag removal" into main Treehugger Robot
2024-12-13An experimental interactive Chooser session implementation Andrey Yepin
Bug: 378493324 Test: manual testing with a test app Test: atest IntentResolver-tests-unit Test: atest IntentResolver-tests-activity Flag: com.android.intentresolver.interactive_session Change-Id: I15b303dd3912c63538930d39b7743e290adb480c
2024-12-13Remove released preview_image_loader feature flag. Andrey Yepin
The flag was released with 24Q4. Unused ImageLoader implementations, CachingImagePreviewImageLoader and ImagePreviewImageLoader, are deleted. Bug: 348665058 Bug: 343819590 Test: atest IntentResolver-tests-unit Test: atest IntentResolver-tests-activity Flag: EXEMPT flag removal Change-Id: Ie6a090b724bfae9355f6c2dace5d6952140c92f3
2024-12-12A feature flag removal Andrey Yepin
Remove 24Q4-released 'fix_shortcut_loader_job_leak' feature flag. Bug: 358135601 Test: presubmits Flag: EXEMPT flag removal Change-Id: I04242737b6269322231527b2110e6a5a07b31777
2024-12-12Replace injection of 'FeatureFlags' with static flag references Mark Renouf
Flag methods should be statically imported and called directly. This aligns usage with SystemUI best practices. For tests, flags are overridden using the @EnableFlags or @DisableFlags test method annotations. Bug: NONE simple cleanup Flag: NONE no functional change Test: NONE no functional change Change-Id: I7213ad2dc969d8c1e1eacd88e00ee702face7cda
2024-11-15Merge "Fix Shareousel not always centering initial selection" into main Treehugger Robot
2024-11-12Merge "Remove deduplication from Shareousel" into main Treehugger Robot
2024-11-08Fix Shareousel not always centering initial selection Govinda Wasserman
Makes starting index correctly update as pages load/unload. This allows us to correctly initialize the scroll without using a LaunchedEffect. Also consolidates measurement-related logic into a helper class for consistency. Test: atest com.android.intentresolver Test: manual test using Sharetest with 5 images and selected index 3 or 4 BUG: 351911089 FIX: 351911089 flag: EXEMPT Bugfix Change-Id: I5a10b5d50f393958b3574bf0a7742b5af93d4a67
2024-11-08Remove deduplication from Shareousel Govinda Wasserman
Test: atest com.android.intentresolver BUG: 351911089 Flag: EXEMPT bugfix Change-Id: I5eb5d93b61891e8f91928361f375b1ca6562f724
2024-11-08Send content URI from sharesheet Miranda Kephart
Leaving out the content URIs means that the quick actions component is no longer able to match sharesheet actions with the screenshots that were taking, breaking screenshot quickshare functionality. Method used is the same as in the old version of the sharesheet. Bug: 340867497 Test: manual (verify that quick share option shows up in screenshots) Flag: EXEMPT (minor change, restoring previous functionality) Change-Id: Id0e6b0e02071aa8c6e0c969d3e5bd81bbc200552
2024-11-06Reload targets by recreating adapters in response to target pinning. Andrey Yepin
Use Shareousel's target list updating logic in response to target pinning and application changed broadcasts. Create new adapters and attach them to the views after data is loaded, resulting in a cleaner visual update. Fix: 230703572 Test: manual testing Test: atest IntentResolver-tests-unit Flag: com.android.intentresolver.rebuild_adapters_on_target_pinning Change-Id: I1e7e2fd820195134ec4940f2e76bf7b3eac9e086
2024-11-01Fix shortcut icon loading. Andrey Yepin
The SimpleIconFactory constructor fails when invoked with a context returned by Context.createContextAsUser(). Previously, shortcut icons were loaded due to the reuse of cached icon factory instances from prior tasks. This change introduces SimpleIconFactory as a dependency to ensure correct instance creation. Fix: 376891146 Test: Disable SimpleIconFactory instance pooling through an injecetd debug code and verify that shortcut icons are loaded. Test: atest IntentResolver-tests-unit Flag: EXEMPT bugfix Change-Id: I2ad2a2bda2e4e152b11be852a04873d3c8104166
2024-10-28Remove android.service.chooser.chooser_payload_toggling flag Andrey Yepin
Bug: 302691505 Test: presubmits Flag: EXEMPT flag removal Change-Id: I5250ac14301e09274d5e971349d3e44cd25545ef
2024-10-10Merge "Add Launcher hover effect" into main Treehugger Robot
2024-10-09Add Launcher hover effect Andrey Yepin
Use Launcher iconlib's FastBitmapDrawable for chooser item icons to enable the Launcher pointer hover effect. Add a custom ChooserTargetItemView to dispatch hover events. Modify the chooser item layout to use the new view and replace image view margins with paddings to accommodate scaled-up icons on hover. Bug: 295175912 Test: atest IntentResolver-tests-unit Test: manual testing for icons hover effect including the case of disabled icons when no selections is made in Shareousel Flag: com.android.intentresolver.target_hover_and_keyboard_focus_states Change-Id: I9bc468895b72dc6770b8c4c7eeac7673b4d6a8b4
2024-10-09Merge "CachingTargetDataLoader to cache bitmaps and not drawables" into main Treehugger Robot
2024-10-08CachingTargetDataLoader to cache bitmaps and not drawables Andrey Yepin
A preparation refactoring. Make ChachingTargetDataLoader to cache icon bitmaps instead of the end drawables. Drawables carry state and the same drawable can be used in two places in the target grid (i.e. in the ranked targets row and in the all-target grid) yet the new hover effect needs to be provided independently for each position. Bug: 295175912 Test: manual basic functinality testing including Shareousel selection change. Test: atest IntentResolver-tests-unit Flag: EXEMPT refactoring Change-Id: I1c5e6333310e0984e39e22cab8cf162f2f31d6e8 Change-Id: I4a3b5dff8fcfcffe7742be8ea3bd348351332c9e
2024-10-07Update test for Truth8 deprecation. am: 7b0cf4237f am: 68b62d37eb Krzysztof Kosiński
Original change: https://android-review.googlesource.com/c/platform/packages/modules/IntentResolver/+/3283923 Change-Id: I86e100bcd54f19038429ca373b3ba5a5928777cd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-03Update test for Truth8 deprecation. Krzysztof Kosiński
Truth8 is now included in Truth and importing both no longer works in version 1.4.0. Bug: 369506710 Test: presubmit, m IntentResolver-tests-unit Flag: EXEMPT test-only change Change-Id: Ia3bfcb92ed08b2889d637b9f508e2dea15602147
2024-10-01Retrieve URI title metadata through separate query calls Andrey Epin
As a file name accessed independently from preview-related metadata and also asynchronously, make it be retrieved through a separate provider calls. This way an error during preview metadata call won't affect the file name reading. Bug: 365748223 Test: atest IntentResolver-tests-unit Test: manual testing with a test app that shares a MediaProvider video Flag: com.android.intentresolver.individual_metadata_title_read Change-Id: I2e87913149e679fee22e4371d2b42f485c8b04e4
2024-10-01Merge "Remove FLAG_ENABLE_CHOOSER_RESULT (IntentResolver)" into main Treehugger Robot
2024-09-24Merge "Do not store the initial intent's extra in the saved state." into main Treehugger Robot
2024-09-18Replace atomicfu with AtomicReference Sunny Goyal
atomicfu internally replaces it with AtomicReference during compile This avoids an additional preprocessing step during compile, and also makes the gradle setup easier Bug: 368177559 Test: Presubmit Flag: EXEMPT refactor Change-Id: I6840e0687b78b38df7ac5d187bf147e0c5a33e24
2024-09-17Do not store the initial intent's extra in the saved state. Andrey Yepin
CreationExtras's DEFAULT_ARGS_KEY vlaue gets saved in SavedStateHandle for each view model the activity creates. Thus by storing the ActivityModel in there we effectively duplicated the initial intent's extra in the activity's saved state 4 times: DEFAULT_ARGS_KEY contains the extras (put there by ComponentActivity) plus ActivityModel per two view models we created. This change makes Chooser and Resolver activities provide default CreationExtras with empty DEFAULT_ARGS_KEY values and stores ActivityModel in the new repository class (instead of the SavedStateHandle instance). Fix: 331897641 Test: manual testing with injected logging the values being put in the activity's saved state Test: atest IntentResolver-tests-unit Test: atest Intentresolver-tests-activity Flag: EXEMPT bugfix Change-Id: Ice2e51971476b2bb963f04275d7b180c85126288
2024-09-11Fix list adapters unit tests. Andrey Yepin
Bug: N/A Test: atest IntentResolver-tests-unit Flag: EXEMPT test only Change-Id: I82e14b7f3df0503c6d653fdba6162cb509c0903f
2024-08-30Make java_sdk_library dependencies explicit am: ad39060b46 am: 4318f4a210 Jihoon Kang
Original change: https://android-review.googlesource.com/c/platform/packages/modules/IntentResolver/+/3250832 Change-Id: I04b9d386c6694958626d06bf278d50d1aa2f7db5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30Make java_sdk_library dependencies explicit am: ad39060b46 Jihoon Kang
Original change: https://android-review.googlesource.com/c/platform/packages/modules/IntentResolver/+/3250832 Change-Id: I80ea53bc84cbeadcf51b9b15aa58daa9ba1e0b9d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30Make java_sdk_library dependencies explicit Jihoon Kang
modules should specify the submodule of java_sdk_library that the module actually depends on Test: CI Bug: 358613520 Change-Id: I9a90b1e47d5790230496c31e84e5d10f40b1ea70
2024-08-29Log payload selection changes Andrey Yepin
Bug: 329068612 Test: manual testing with an injected debug logging Test: atest IntentResolver-tests-unit Flag: EXEMPT ui events logging Change-Id: Iac9e2bcf93375d5761be5287b6cf9297be399e77
2024-08-29Report Shareousel preview type Andrey Yepin
Bug: 329068612 Test: atest IntentResolver-tests-unit Flag: EXEMPT ui events logging Change-Id: I0a9cd4d50f4a883c162be153c9e0a0a8f10816c2
2024-08-22Fix ChooserRequest.sharedText value parsing Andrey Yepin
readChooserRequest was reading sharedText value from the chooser intent's extra instead of the target intent's extra. Additional refactorings: * sharedTextTitle is added to the ChooserReqeust (read from target intent's EXTRA_TITLE extra); * ChooserContentPreviewUi is modified to use ChooserReqeust instead of extracting values form the target intent. Fix: 361654855 Test: atest IntentResolver-tests-unit Test: manual testing various previw variations with the ShareTest app Flag: EXEMPT bugfix Change-Id: Ic9e0e200f4b9a84df4830e99dd42cb1bc7258caf
2024-08-22Remove FLAG_ENABLE_CHOOSER_RESULT (IntentResolver) Matt Casey
Launched in V. Bug: 263474465 Test: atest ShareResultSenderImplTest Flag: EXEMPT flag removal Change-Id: I5cd53e1608b415e3b9db80ce48899c42c755660d
2024-08-15Allow toggling of final shareousel item Andrey Yepin
When no items selected the UI will: * change the chooser headline; * make the custom action row invisible; * make all targets disabled and all target icons greyscale. Fix: 349468879 Test: atest IntentResolver-tests-unit Test: manual functionality testing Flag: com.android.intentresolver.unselect_final_item Change-Id: I53b9c908943b1f1003cb0131a6dec8abc26ec782
2024-08-14Add timeout for AppPredictor response. Andrey Yepin
Timeout AppPredictor callbacks and fallback to ShortcutManager. Bug: 295956687 Bug: 343300158 Test: atest IntentResolver-tests-unit Flag: com.android.intentresolver.fix_shortcuts_flashing Change-Id: Ia6e5643451a840e10213f242c6c79364b0193e78
2024-08-14Merge "Unify profile records and profile tabs creation." into main Andrey Yepin
2024-08-13Use nested scope for ShortcutLoader Andrey Yepin
Use a nested coroutine scope for each ShortcutLoader instance and close it when the instance is stopped being used. Fix: 358135601 Test: atest IntentResolver-tests-unit Test: manual testing checking the logs Flag: com.android.intentresolver.fix_shortcut_loader_job_leak Change-Id: I84bbca75612f153193b03e24bfc0cb8842a8d3e2
2024-08-12Unify profile records and profile tabs creation. Andrey Yepin
Create one ProfileRecord per profile tab. Utilize legacy profile tab logic to build an ordered map of ProfileRecords and generate profile tabs from these records. This change enforces 1:1 relation between profile records and tabs and highlights the exsiting dependency between them. Bug: 343300158 Test: manual testing with varius profile combinations available on the device Flag: EXEMPT refactoring Change-Id: I47bbbbdcc7832d6b881a272b0e489622c31de231
2024-08-12Merge "Don't send target selection callbacks crossprofile" into main Treehugger Robot