summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@android.com>2011-01-22 11:50:41 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-22 11:50:41 -0800
commit6d92cde287b6399d5c90f3eaccb73602d6d51313 (patch)
treee9caedc187102f216b51296f2f5dac30298e37e4 /services
parentf643974954c47c95cd84c774db7f1e3997ee9c96 (diff)
parent35f4d32dc2f0c383323e780ecc7e2764704c5d2c (diff)
downloadframeworks_base-6d92cde287b6399d5c90f3eaccb73602d6d51313.zip
frameworks_base-6d92cde287b6399d5c90f3eaccb73602d6d51313.tar.gz
frameworks_base-6d92cde287b6399d5c90f3eaccb73602d6d51313.tar.bz2
am 35f4d32d: Merge "frameworks/base: Track owner in appropriate owners list of Uri"
* commit '35f4d32dc2f0c383323e780ecc7e2764704c5d2c': frameworks/base: Track owner in appropriate owners list of Uri
Diffstat (limited to 'services')
-rwxr-xr-xservices/java/com/android/server/am/ActivityManagerService.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 1089ce0..0e38e10 100755
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -4385,12 +4385,15 @@ public final class ActivityManagerService extends ActivityManagerNative
perm.modeFlags |= modeFlags;
if (owner == null) {
perm.globalModeFlags |= modeFlags;
- } else if ((modeFlags&Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
- perm.readOwners.add(owner);
- owner.addReadPermission(perm);
- } else if ((modeFlags&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
- perm.writeOwners.add(owner);
- owner.addWritePermission(perm);
+ } else {
+ if ((modeFlags&Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0) {
+ perm.readOwners.add(owner);
+ owner.addReadPermission(perm);
+ }
+ if ((modeFlags&Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0) {
+ perm.writeOwners.add(owner);
+ owner.addWritePermission(perm);
+ }
}
}