Merge "Cast copied text to string in share intent" into tm-qpr-dev am: 04c1a29386

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19397386

Change-Id: I156bef5ef61b4e576aac2b5cba6867aff7bcd35e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Miranda Kephart
2022-07-25 20:40:01 +00:00
committed by Automerger Merge Worker

View File

@@ -522,7 +522,7 @@ public class ClipboardOverlayController {
private void shareContent(ClipData clip) { private void shareContent(ClipData clip) {
mUiEventLogger.log(CLIPBOARD_OVERLAY_SHARE_TAPPED); mUiEventLogger.log(CLIPBOARD_OVERLAY_SHARE_TAPPED);
Intent shareIntent = new Intent(Intent.ACTION_SEND); Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, clip.getItemAt(0).getText()); shareIntent.putExtra(Intent.EXTRA_TEXT, clip.getItemAt(0).getText().toString());
shareIntent.setDataAndType( shareIntent.setDataAndType(
clip.getItemAt(0).getUri(), clip.getDescription().getMimeType(0)); clip.getItemAt(0).getUri(), clip.getDescription().getMimeType(0));
shareIntent.putExtra(Intent.EXTRA_STREAM, clip.getItemAt(0).getUri()); shareIntent.putExtra(Intent.EXTRA_STREAM, clip.getItemAt(0).getUri());