diff options
| author | 2023-06-26 19:56:13 +0000 | |
|---|---|---|
| committer | 2023-06-26 19:56:13 +0000 | |
| commit | ab04cd8f31c3d40a278d1539a975f40009341dad (patch) | |
| tree | ad733a68ecb12578e2a98071ef106c9193fa5c16 /java | |
| parent | ea413ee2e40e29c6b777ee7027b28b8ff8d47d8e (diff) | |
| parent | c37ca403453da310151917a93a598cf2d4f310e6 (diff) | |
Merge "Add an extra to sharesheet's image edit intent" into udc-dev am: c37ca40345
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/IntentResolver/+/23725969
Change-Id: I57151a14c76e0c129f7ae9ba14efa3bb58a20f2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java')
| -rw-r--r-- | java/src/com/android/intentresolver/ChooserActionFactory.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/intentresolver/ChooserActionFactory.java b/java/src/com/android/intentresolver/ChooserActionFactory.java index 6ec62753..4e595c96 100644 --- a/java/src/com/android/intentresolver/ChooserActionFactory.java +++ b/java/src/com/android/intentresolver/ChooserActionFactory.java @@ -78,6 +78,11 @@ public final class ChooserActionFactory implements ChooserContentPreviewUi.Actio | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION; + // Boolean extra used to inform the editor that it may want to customize the editing experience + // for the sharesheet editing flow. + private static final String EDIT_SOURCE = "edit_source"; + private static final String EDIT_SOURCE_SHARESHEET = "sharesheet"; + private static final String CHIP_LABEL_METADATA_KEY = "android.service.chooser.chip_label"; private static final String CHIP_ICON_METADATA_KEY = "android.service.chooser.chip_icon"; @@ -284,6 +289,7 @@ public final class ChooserActionFactory implements ChooserContentPreviewUi.Actio resolveIntent.setFlags(originalIntent.getFlags() & URI_PERMISSION_INTENT_FLAGS); resolveIntent.setComponent(editorComponent); resolveIntent.setAction(Intent.ACTION_EDIT); + resolveIntent.putExtra(EDIT_SOURCE, EDIT_SOURCE_SHARESHEET); String originalAction = originalIntent.getAction(); if (Intent.ACTION_SEND.equals(originalAction)) { if (resolveIntent.getData() == null) { |