Add a VpnTransportInfo object.
This currently stores the VPN type and a session name, but can be extended in the future. Bug: 173331190 Test: added coverage in VpnTest Test: added coverage in ConnectivityServiceTest Test: added coverage in NetworkAgentTest Change-Id: I450858a9fa332c8d896dbdb4c14337d5ec23677f
This commit is contained in:
@@ -55,13 +55,29 @@ import java.security.GeneralSecurityException;
|
||||
public class VpnManager {
|
||||
/** Type representing a lack of VPN @hide */
|
||||
public static final int TYPE_VPN_NONE = -1;
|
||||
/** VPN service type code @hide */
|
||||
|
||||
/**
|
||||
* A VPN created by an app using the {@link VpnService} API.
|
||||
* @hide
|
||||
*/
|
||||
public static final int TYPE_VPN_SERVICE = 1;
|
||||
/** Platform VPN type code @hide */
|
||||
|
||||
/**
|
||||
* A VPN created using a {@link VpnManager} API such as {@link #startProvisionedVpnProfile}.
|
||||
* @hide
|
||||
*/
|
||||
public static final int TYPE_VPN_PLATFORM = 2;
|
||||
|
||||
/**
|
||||
* An IPsec VPN created by the built-in LegacyVpnRunner.
|
||||
* @deprecated new Android devices should use VPN_TYPE_PLATFORM instead.
|
||||
* @hide
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int TYPE_VPN_LEGACY = 3;
|
||||
|
||||
/** @hide */
|
||||
@IntDef(value = {TYPE_VPN_NONE, TYPE_VPN_SERVICE, TYPE_VPN_PLATFORM})
|
||||
@IntDef(value = {TYPE_VPN_NONE, TYPE_VPN_SERVICE, TYPE_VPN_PLATFORM, TYPE_VPN_LEGACY})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface VpnType {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user