if ((modeFlags&Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
globalModeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
modeFlags &= ~Intent.FLAG_GRANT_READ_URI_PERMISSION;
if (readActivities.size() > 0) {
for (HistoryRecord r : readActivities) {
r.readUriPermissions.remove(this);
if (r.readUriPermissions.size() == 0) {
r.readUriPermissions = null;
}
}
readActivities.clear();
}
}
if ((modeFlags&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
globalModeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
modeFlags &= ~Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
if (readActivities.size() > 0) {
for (HistoryRecord r : readActivities) {
r.writeUriPermissions.remove(this);
if (r.writeUriPermissions.size() == 0) {
r.writeUriPermissions = null;
}
}
readActivities.clear();
}
}