am 2164cf4f: am 718df19e: Merge "Legacy VPN calls to require a userID" into mnc-dev
* commit '2164cf4f4043b4892db5688ed53624af758fcdaa': Legacy VPN calls to require a userID
This commit is contained in:
@@ -112,7 +112,7 @@ interface IConnectivityManager
|
||||
|
||||
void startLegacyVpn(in VpnProfile profile);
|
||||
|
||||
LegacyVpnInfo getLegacyVpnInfo();
|
||||
LegacyVpnInfo getLegacyVpnInfo(int userId);
|
||||
|
||||
VpnInfo[] getAllVpnInfo();
|
||||
|
||||
|
||||
@@ -3085,11 +3085,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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user