summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2023-06-26 19:55:52 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-06-26 19:55:52 +0000
commitc8c684bcdee3b5648c4a528235e224b7734b41bd (patch)
treec06ba28ee8836c2ca16f2e322a57d674487cf03c /java
parent6a6ee3d3bf623eaf4f3314b04c71325ad109430c (diff)
parentc37ca403453da310151917a93a598cf2d4f310e6 (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: I7bf643dc904fe104ce660efa56ca096fa713931e 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.java6
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) {