Merge "Support multiple Vpn ManageDialogs" am: 12e55c99af

Original change: undetermined

Change-Id: I738035a6c3407c7a97f2b700c1f5f1b248ddf477
This commit is contained in:
Geremy Condra
2021-05-31 06:24:19 +00:00
committed by Automerger Merge Worker
2 changed files with 16 additions and 0 deletions

View File

@@ -124,6 +124,8 @@ interface IConnectivityManager
ParcelFileDescriptor establishVpn(in VpnConfig config);
VpnConfig getVpnConfig();
void startLegacyVpn(in VpnProfile profile);
LegacyVpnInfo getLegacyVpnInfo();

View File

@@ -3446,6 +3446,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
}
/**
* Returns the information of the ongoing VPN. This method is used by VpnDialogs and
* not available in ConnectivityManager.
* Permissions are checked in Vpn class.
* @hide
*/
@Override
public VpnConfig getVpnConfig() {
int user = UserHandle.getUserId(Binder.getCallingUid());
synchronized(mVpns) {
return mVpns.get(user).getVpnConfig();
}
}
/**
* Callback for VPN subsystem. Currently VPN is not adapted to the service
* through NetworkStateTracker since it works differently. For example, it