DO NOT MERGE: Cherry-pick 2ed524966d 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
This commit is contained in:
Vairavan Srinivasan
2012-05-22 00:06:15 -07:00
committed by Dianne Hackborn
parent a7e3a1e0e7
commit ac5f998396

View File

@@ -59,11 +59,11 @@ class UriPermission {
if ((modeFlagsToClear&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
globalModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
if (readOwners.size() > 0) {
if (writeOwners.size() > 0) {
for (UriPermissionOwner r : writeOwners) {
r.removeWritePermission(this);
}
readOwners.clear();
writeOwners.clear();
}
}
}