diff options
author | Robin Lee <rgl@google.com> | 2015-07-07 12:28:13 -0700 |
---|---|---|
committer | Robin Lee <rgl@google.com> | 2015-07-07 19:37:21 +0000 |
commit | 3eed5eca80f317d574d4468244a37fd5b60721a0 (patch) | |
tree | 5c5f1a27585be8df42720f7e6517ec3c3b61063d /services/core/java/com/android/server/ConnectivityService.java | |
parent | 13c25290099a570fdd903511e7ec605119af3ce3 (diff) | |
download | frameworks_base-3eed5eca80f317d574d4468244a37fd5b60721a0.zip frameworks_base-3eed5eca80f317d574d4468244a37fd5b60721a0.tar.gz frameworks_base-3eed5eca80f317d574d4468244a37fd5b60721a0.tar.bz2 |
Legacy VPN calls to require a userID
This way, system applications with INTERACT_ACROSS_USERS permission will
be able to fetch the information they need.
Pre-requisite for bug 21499103
Change-Id: I7e759d5039ae6e85abc6435049016b1dcaabc834
Diffstat (limited to 'services/core/java/com/android/server/ConnectivityService.java')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 7f124dc..5044ba9 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -3112,11 +3112,11 @@ public class ConnectivityService extends IConnectivityManager.Stub * are checked in Vpn class. */ @Override - public LegacyVpnInfo getLegacyVpnInfo() { + public LegacyVpnInfo getLegacyVpnInfo(int userId) { + enforceCrossUserPermission(userId); throwIfLockdownEnabled(); - int user = UserHandle.getUserId(Binder.getCallingUid()); synchronized(mVpns) { - return mVpns.get(user).getLegacyVpnInfo(); + return mVpns.get(userId).getLegacyVpnInfo(); } } |