summaryrefslogtreecommitdiff
path: root/java/src
AgeCommit message (Collapse)Author
2025-09-18[SP 2025-09-01] Launch image editor as sharesheet-launching user (flag off)banksia-dev Matt Casey
ag/34038177 but for the cases where use_preferred_image_editor is off or does not exist. Bug: 407991863 Test: Manual repro of bug and verification of fix. Test: atest IntentResolver-tests-* Flag: EXEMPT bugfix Change-Id: Idf2d76615f4396f09e7de33becc87afaea782d41 Merged-In: Idf2d76615f4396f09e7de33becc87afaea782d41 (cherry picked from commit 29da3d663edd566f0b5c4dce434f40aa7e3877de)
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-12Avoid drawer offset calculation if app targets are not yet processed. Andrey Yepin
Fix: 338229069 Test: manual testing Flag: com.android.intentresolver.delay_drawer_offset_calculation Change-Id: Ie18ccfa044f5067e769219359e6507615566be78
2025-03-03Improve tap to scroll support to be ready for rollout Govinda Wasserman
- Moves tap to scroll detection to the scrollable container instead of the children of the container, reducing the amount of jank from calculations required for each tap, as well as the code complexity. - Encapsulates the behavior in a single Modifier extension for ease of code readability and usability. - Generifies the solution to work with any arbitrary scrollable container. Test: Manual test with Share Test BUG: 384656926 Flag: com.android.intentresolver.shareousel_tap_to_scroll_support Change-Id: Ic40e040068b2a8ce6038d2e9d7d2bca6f0a88670
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-13Add tap to scroll support to Shareousel Govinda Wasserman
Taps on the left or right edge of the scroll region will scroll in that direction. Test: manual test using ShareTest BUG: 384656926 Flag: com.android.intentresolver.shareousel_tap_to_scroll Change-Id: Ie0ebec58303577f56be8b28b4869c0ef9df3e3b8
2025-02-10Shareousel: add item position to item content description. Andrey Yepin
Add known item cursor position to the item content description annotation when showing more than one item. This works well when the data provided by the app is consistent (the expected majority of the cases). The position annotation will be ommited in cases when we show the initially shared items before the cursor is loaded and for the initially shared items that were missing in the cursor. Fix: 379032721 Test: manual testing Flag: com.android.intentresolver.announce_shareousel_item_list_position Change-Id: Ie669db3897961d2cf09a30ef229e10badb501566
2025-01-29Merge "Check underlying intent as well as intent selector" into main Oli Thompson
2025-01-28Merge "Clear cached direct targets." into main Treehugger Robot
2025-01-28Fix targets TalkBack focus. Andrey Yepin
Targets should receive the TalkBack focus on tap. Fix: 388361798 Test: Manually test that the new pointer hover effect works as expected. Test: Manually test that targets receive TalkBack focus on tap. Flag: com.android.intentresolver.target_hover_and_keyboard_focus_states Change-Id: Ifb6a743f214a454e16bad45504bd8e107a6f0d28
2025-01-28Check underlying intent as well as intent selector oli
When checking if an intent can be forwarded across profiles, the selector action is checked rather than the intent itself. This means badIntents can be spoofed with a different selector and launched across profiles. Bug: 376674080 Test: manually tested Flag: EXEMPT bugfix Change-Id: I744d0d7f89e35665405a14a814d4e0861082a106
2025-01-27Merge "Present target grid as hierarchical for a11y purposes." into main Treehugger Robot
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-14Present target grid as hierarchical for a11y purposes. Andrey Yepin
Present target grid as hierarchical for a11y purposes. This makes TalkBack to announce sub-groups of targets. Fix: 379208685 Test: Manual test for the following cases: (i) all group present (shortcuts, suggested, all-apps), (ii) shortcuts are missing -- the no-target message is shown, (iii) no suggested targets. Flag: com.android.intentresolver.announce_shortcuts_and_suggested_apps Change-Id: If08e9bcccab9db423c5b67c759bc0854d290e880
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-20Add select/unselect visual cue to Shareousel Govinda Wasserman
When an item is selected it will shrink and when it is unselected it will grow back to the standard size. This provides improved visual confirmation of the selected state of items. Test: Manual test using Photos or ShareTest BUG: 361792274 Flag: com.android.intentresolver.shareousel_selection_shrink Change-Id: I7f5ca60d584900fc5e2ba0d479ecc0f2e624b367
2024-12-16Merge "An experimental interactive Chooser session implementation" into main Treehugger Robot
2024-12-13Fix Shareousel crash when recomposing Govinda Wasserman
Recomposition could cause a crash when initial position was no longer in the LazyRow. This fixes it by encapsulating the problematic array indexing within the remember block so that it is only performed on the first composition when it is guaranteed to be a valid index position. Test: Manual test using ShareTest BUG: 383852288 Flag: EXEMPT Bugfix Change-Id: Ie6b322d449ddc5c83d9d4e481967c2511b165290
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-12A feature flag removal Andrey Yepin
Remove 24Q4-released 'fix_missing_drawer_offset_calculation' feature flag. Bug: 347316548 Test: presubmits Flag: EXEMPT flag removal Change-Id: Id03271034a81015d77b6bd4164073671feb50e9b
2024-12-12A feature flag removal Andrey Yepin
fix_drawer_offset_on_config_change was released in 24Q4; removed. Bug: 344057117 Test: presubmits Flag: EXEMPT flag removal Change-Id: I20c2488e3a8d08fa349af9a05299745d32f8c9c2
2024-12-12Remove flag 'fix_empty_state_padding_bug' Mark Renouf
And the other original (unused) flag without the '_bug' suffix. Bug: 377522331 Flag: NONE released flag removal Test: NONE no functional change Change-Id: I6109a91a87c95681951cd254c0e470047c5b1741
2024-12-12Removes the flag 'fix_private_space_locked_on_restart' Mark Renouf
Bug: 377521592 Flag: NONE released flag removal Test: NONE no functional change Change-Id: Ic21fa9975e58d0ae35d60cda5a2975ab028eac69
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-12-12Remove flag 'modular_framework' Mark Renouf
Bug: 377522152 Flag: NONE flag removal Test: NONE removing released flag Change-Id: I690082b7b98f2fe3cf1bcc390613eaa31f105e23
2024-11-27Add a11y role to the text preview copy action widget Andrey Yepin
Fix: 377643104 Test: manual testing Flag: EXEMPT bug fix Change-Id: Id8454df01e4ca891f85ba8e1ff3979156673ed3d
2024-11-26Merge "ChooserActivity refreshes creator token" into main Nan Wu
2024-11-22Skip "last-chosen" query for Chooser Joshua Trask
`getLastChosen()` is invoked in the course of the generic/"base-class" `ResolverListAdapter::rebuildList()`, and the result is cached as `mLastChosen`. By inspection, `mLastChosen` is *only* ever read by `ResolverListAdapter` methods that are gated on `mFilterLastUsed` (except when it's used internally to derive `mLastChosenPosition`, but that field is *also* only used in conjunction with `mFilterLastUsed`). `mFilterLastUsed` is final and false in all instances of the `ChooserListAdapter` subclass (i.e., any `ChooserActivity` configuration): go/chooser-mfilterlastused-false. In some cases (for unknown reason, b/335196436), the call to `getLastChosen()` crashes in Chooser; this CL should safely workaround that problem. Even if it wasn't failing, we could expect some performance boost by omitting the unnecessary system call. Note that Chooser configurations will still call `setLastChosen()` (via the base `ResolverActivity::onTargetSelected()`) to *write* this setting in the system, so it'll still be reflected in subsequent *ResolverActivity* sessions -- it's just never *read* in Chooser. Writing from Chooser probably has only "marginal" user value, but there's no need to change that legacy behavior at this time. Test: existing `IntentForwarder` & CTS tests. Bug: 335196436 Flag: EXEMPT bugfix Change-Id: Ieaf4bc713d51494a6a3ada89810f232b8875108f
2024-11-15Merge "Fix Shareousel not always centering initial selection" into main Treehugger Robot
2024-11-14ChooserActivity refreshes creator token Nan Wu
ChooserActivity has to refresh creator tokens for the intent it launches. Bug: 369856138 Test: Manual test Flag: android.security.prevent_intent_redirect Change-Id: I1874c2197577939ee60c4c058366ba8c7aac23ca
2024-11-12Merge "Remove deduplication from Shareousel" into main Treehugger Robot
2024-11-12Merge "Send content URI from sharesheet" into main Miranda Kephart
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-07Apply window inset specing for new adapters Andrey Yepin
Fix: 377897948 Test: manual Shareousel testing with 3-button system naviagation Flag: EXEMPT bug fix Change-Id: I74f20d91113bcc9ad038fa157e807f2354dc8b15
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-30Set a11y role description for the edit, modify share, and action buttons Andrey Yepin
Use Button instead of TextView for the action button and the modify share widgets. Set a11y role description for the edit chip with a custom a11y delegate. Fix: 374035886 Test: manual testing Flag: EXEMPT bugfix Change-Id: I69dd97cb8cb6a847849a1a7b272f0877745e62a0
2024-10-29Make DefaultTargetDataLoader assist-injectable Andrey Yepin
A preparation step for an alternative implementation. Bug: 349847176 Test: atest IntentResolver-tests-activity Flag: EXEMPT refactoring Change-Id: I2b23a27edb6d2d9711af79f06643413861403add
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-16Save Shareousel state. Andrey Yepin
Fix: 362347212 Test: manual testing with injected debug logging Flag: com.android.intentresolver.save_shareousel_state Change-Id: Ibe393e84c0d7884fb1b7611e72df0c7779afce34
2024-10-14Add keboard focus outline for Chooser targets Andrey Yepin
This change applies the same focus outline as Launcher but the end result still needs more polishing. Some noticeable issues are: * the outline may overlap with a long label; * targets with a one-line labels look adjusted to the top and not centered; * with the light system ui theme, the outer online frame is barely visible compare to the inner outline (this is also true for Launcher). Bug: 295175912 Test: visual effect testing Flag: com.android.intentresolver.target_hover_and_keyboard_focus_states Change-Id: I1d22b187e0cc4b95c385d4f5b956effa31fd4505