Skip to content
Snippets Groups Projects
Commit 2a473a4d authored by Varun Shah's avatar Varun Shah
Browse files

Fix NPE in UriPermission.

Also, fix read/write typo.

Change-Id: I54e00a4af061a5e5c4c46bb8c432a05df3803574
Fixes: 344613486
Test: builds/flashes
parent becad340
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,9 @@ final class UriPermission {
if (mWriteOwners != null && includingOwners) {
ownedModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
for (UriPermissionOwner r : mWriteOwners) {
r.removeWritePermission(this);
if (r != null) {
r.removeWritePermission(this);
}
}
mWriteOwners = null;
}
......@@ -348,7 +350,7 @@ final class UriPermission {
if (mWriteOwners != null) {
pw.print(prefix);
pw.println("writeOwners:");
for (UriPermissionOwner owner : mReadOwners) {
for (UriPermissionOwner owner : mWriteOwners) {
pw.print(prefix);
pw.println(" * " + owner);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment