Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56ceba43 authored by Varun Shah's avatar Varun Shah
Browse files

Restrict adding the implicit READ_URI grant flag.

Only implicitly add FLAG_GRANT_READ_URI_PERMISSION if the stream is not null.

Bug: 223589582
Change-Id: Ie6c52ca52c4d006bdc650a3ad51183e4dbafa842
Test: manual
parent cb05df15
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -12348,7 +12348,9 @@ public class Intent implements Parcelable, Cloneable {
                            null, new String[] { getType() },
                            new ClipData.Item(text, htmlText, null, stream));
                    setClipData(clipData);
                    if (stream != null) {
                        addFlags(FLAG_GRANT_READ_URI_PERMISSION);
                    }
                    return true;
                }
            } catch (ClassCastException e) {
@@ -12387,7 +12389,9 @@ public class Intent implements Parcelable, Cloneable {
                    }
                    setClipData(clipData);
                    if (streams != null) {
                        addFlags(FLAG_GRANT_READ_URI_PERMISSION);
                    }
                    return true;
                }
            } catch (ClassCastException e) {