summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-03-08 15:55:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-03-08 15:55:53 +0000
commitdf416df062b2fb65c1186f3115171da65fc8cb7f (patch)
tree31b8c2450622fe7486c0a06a1c65141a3b688978
parenta7640f473cf17e908b959035c3f9ad68fa38e927 (diff)
parent209ac0b8d859255559129a64606bd07730377f05 (diff)
Merge "Give Telephony the permissions to access the network stack."
-rw-r--r--src/com/android/server/util/PermissionUtil.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/server/util/PermissionUtil.java b/src/com/android/server/util/PermissionUtil.java
index f6eb900..6fbeead 100644
--- a/src/com/android/server/util/PermissionUtil.java
+++ b/src/com/android/server/util/PermissionUtil.java
@@ -33,7 +33,9 @@ public final class PermissionUtil {
public static void checkNetworkStackCallingPermission() {
// TODO: check that the calling PID is the system server.
final int caller = getCallingUid();
- if (caller != Process.SYSTEM_UID && UserHandle.getAppId(caller) != Process.BLUETOOTH_UID) {
+ if (caller != Process.SYSTEM_UID
+ && UserHandle.getAppId(caller) != Process.BLUETOOTH_UID
+ && UserHandle.getAppId(caller) != Process.PHONE_UID) {
throw new SecurityException("Invalid caller: " + caller);
}
}