Merge "Fix edit button in screenshot share activity" am: d7013fb94e am: c6158cc84d

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

Change-Id: I2e4e50e79a97eaea2871cc6a743417c4b4aab588
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
mrenouf
2022-04-01 12:50:50 +00:00
committed by Automerger Merge Worker

View File

@@ -237,7 +237,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
String subjectDate = DateFormat.getDateTimeInstance().format(new Date(mImageTime)); String subjectDate = DateFormat.getDateTimeInstance().format(new Date(mImageTime));
String subject = String.format(SCREENSHOT_SHARE_SUBJECT_TEMPLATE, subjectDate); String subject = String.format(SCREENSHOT_SHARE_SUBJECT_TEMPLATE, subjectDate);
Intent sharingIntent = new Intent(Intent.ACTION_SEND); Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/png"); sharingIntent.setDataAndType(uri, "image/png");
sharingIntent.putExtra(Intent.EXTRA_STREAM, uri); sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);
// Include URI in ClipData also, so that grantPermission picks it up. // Include URI in ClipData also, so that grantPermission picks it up.
// We don't use setData here because some apps interpret this as "to:". // We don't use setData here because some apps interpret this as "to:".