Merge "Restrict adding the implicit READ_URI grant flag." into udc-dev

This commit is contained in:
Treehugger Robot
2023-04-18 04:34:14 +00:00
committed by Android (Google) Code Review

View File

@@ -12349,7 +12349,9 @@ public class Intent implements Parcelable, Cloneable {
null, new String[] { getType() },
new ClipData.Item(text, htmlText, null, stream));
setClipData(clipData);
addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (stream != null) {
addFlags(FLAG_GRANT_READ_URI_PERMISSION);
}
return true;
}
} catch (ClassCastException e) {
@@ -12388,7 +12390,9 @@ public class Intent implements Parcelable, Cloneable {
}
setClipData(clipData);
addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (streams != null) {
addFlags(FLAG_GRANT_READ_URI_PERMISSION);
}
return true;
}
} catch (ClassCastException e) {