Commit 25e43a11 authored by jaekyun's avatar jaekyun Committed by Commit bot

Use "share_screenshot_as_stream" instead of Intent.EXTRA_STREAM

When both a URL as Intent.EXTRA_TEXT and a screenshot as Intent.EXTRA_STREAM
present, most apps favor the latter.
So we need to use a new extra name for a screenshot so that a URL could be
prioritized as it is.

BUG=455996

Review URL: https://codereview.chromium.org/1060243002

Cr-Commit-Position: refs/heads/master@{#324121}
parent c7323229
......@@ -49,6 +49,7 @@ public class ShareHelper {
private static final String PACKAGE_NAME_KEY = "last_shared_package_name";
private static final String CLASS_NAME_KEY = "last_shared_class_name";
private static final String EXTRA_SHARE_SCREENSHOT_AS_STREAM = "share_screenshot_as_stream";
/**
* Directory name for screenshots.
......@@ -252,7 +253,7 @@ public class ShareHelper {
intent.putExtra(Intent.EXTRA_TEXT, url);
if (screenshotUri != null) {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(Intent.EXTRA_STREAM, screenshotUri);
intent.putExtra(EXTRA_SHARE_SCREENSHOT_AS_STREAM, screenshotUri);
}
return intent;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment