Merge "Legacy VPN calls to require a userID" into mnc-dev
This commit is contained in:
@@ -112,7 +112,7 @@ interface IConnectivityManager
|
|||||||
|
|
||||||
void startLegacyVpn(in VpnProfile profile);
|
void startLegacyVpn(in VpnProfile profile);
|
||||||
|
|
||||||
LegacyVpnInfo getLegacyVpnInfo();
|
LegacyVpnInfo getLegacyVpnInfo(int userId);
|
||||||
|
|
||||||
VpnInfo[] getAllVpnInfo();
|
VpnInfo[] getAllVpnInfo();
|
||||||
|
|
||||||
|
|||||||
@@ -3031,11 +3031,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
* are checked in Vpn class.
|
* are checked in Vpn class.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public LegacyVpnInfo getLegacyVpnInfo() {
|
public LegacyVpnInfo getLegacyVpnInfo(int userId) {
|
||||||
|
enforceCrossUserPermission(userId);
|
||||||
throwIfLockdownEnabled();
|
throwIfLockdownEnabled();
|
||||||
int user = UserHandle.getUserId(Binder.getCallingUid());
|
|
||||||
synchronized(mVpns) {
|
synchronized(mVpns) {
|
||||||
return mVpns.get(user).getLegacyVpnInfo();
|
return mVpns.get(userId).getLegacyVpnInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user