diff options
author | Chris Tate <ctate@android.com> | 2015-08-17 18:01:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-17 18:01:15 +0000 |
commit | a3fd27adcc655dd9566d72f290ac343704e8e4db (patch) | |
tree | e342fcad6e21cabf38bdc6e1163b8dd33346724c | |
parent | a03567bfe0b2f71263e5facd0edc908bf43965cc (diff) | |
parent | ff7add011a3742bc5ba609de2abd9b7bf35c71e1 (diff) | |
download | frameworks_base-a3fd27adcc655dd9566d72f290ac343704e8e4db.zip frameworks_base-a3fd27adcc655dd9566d72f290ac343704e8e4db.tar.gz frameworks_base-a3fd27adcc655dd9566d72f290ac343704e8e4db.tar.bz2 |
Merge "Check component permissions like 'exported' before assigned permissions" into mnc-dev
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStackSupervisor.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 7c79661..6d91309 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -1687,16 +1687,16 @@ public final class ActivityStackSupervisor implements DisplayListener { private int getComponentRestrictionForCallingPackage(ActivityInfo activityInfo, String callingPackage, int callingPid, int callingUid, boolean ignoreTargetSecurity) { - if (activityInfo.permission == null) { - return ACTIVITY_RESTRICTION_NONE; - } - if (!ignoreTargetSecurity && mService.checkComponentPermission(activityInfo.permission, callingPid, callingUid, activityInfo.applicationInfo.uid, activityInfo.exported) == PackageManager.PERMISSION_DENIED) { return ACTIVITY_RESTRICTION_PERMISSION; } + if (activityInfo.permission == null) { + return ACTIVITY_RESTRICTION_NONE; + } + final int opCode = AppOpsManager.permissionToOpCode(activityInfo.permission); if (opCode == AppOpsManager.OP_NONE) { return ACTIVITY_RESTRICTION_NONE; |