Commit b04f4ece authored by Gayane Petrosyan's avatar Gayane Petrosyan Committed by Commit Bot

[Sh-Clank] Add quotes to the shared text

Bug: 1102382
Change-Id: Idd1d928eb8c2885f3610d68a771798fd3b22e00e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432807Reviewed-by: default avatarKyle Milka <kmilka@chromium.org>
Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810846}
parent 3f02b338
......@@ -22,6 +22,7 @@ import org.chromium.ui.widget.Toast;
* Handles the Link To Text action in the Sharing Hub.
*/
public class LinkToTextCoordinator extends EmptyTabObserver {
private static final String SHARE_TEXT_TEMPLATE = "\"%s\"\n";
private static final String TEXT_FRAGMENT_PREFIX = ":~:text=";
private static final String INVALID_SELECTOR = "";
private final Context mContext;
......@@ -53,7 +54,7 @@ public class LinkToTextCoordinator extends EmptyTabObserver {
ShareParams params =
new ShareParams
.Builder(mTab.getWindowAndroid(), /*title=*/"", getUrlToShare(selector))
.setText(mSelectedText)
.setText(String.format(SHARE_TEXT_TEMPLATE, mSelectedText))
.build();
mChromeOptionShareCallback.showThirdPartyShareSheet(
params, new ChromeShareExtras.Builder().build(), System.currentTimeMillis());
......
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