Grant Uri permissions for new screenshots.
The receiving app may not have the needed permissions to see the screenshot when launched. Test: builds, boots, no longer logs Bug: 33275110 Change-Id: I8b9b4fea2f78f37af543a90309cb34994366850b
This commit is contained in:
@@ -323,7 +323,8 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
|
||||
// Create the intent to show the screenshot in gallery
|
||||
Intent launchIntent = new Intent(Intent.ACTION_VIEW);
|
||||
launchIntent.setDataAndType(mParams.imageUri, "image/png");
|
||||
launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
launchIntent.setFlags(
|
||||
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
|
||||
final long now = System.currentTimeMillis();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user