Skip to content

Commit ac5f998

Browse files
Ethan1983Dianne Hackborn
authored andcommitted
DO NOT MERGE: Cherry-pick 2ed5249 to JB.
This was contributed from AOSP, a fix to the management of URI write permissions. This is a very blatant bug, and with the new Intent ClipData and other stuff we are making much more use of write permissions in JB, so it is well worth taking. Change-Id: I58c86119b4d5c13fefd090944bea139803df1a48
1 parent a7e3a1e commit ac5f998

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/java/com/android/server/am/UriPermission.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ void clearModes(int modeFlagsToClear) {
5959
if ((modeFlagsToClear&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
6060
globalModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
6161
modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
62-
if (readOwners.size() > 0) {
62+
if (writeOwners.size() > 0) {
6363
for (UriPermissionOwner r : writeOwners) {
6464
r.removeWritePermission(this);
6565
}
66-
readOwners.clear();
66+
writeOwners.clear();
6767
}
6868
}
6969
}

0 commit comments

Comments
 (0)