diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2021-03-18 12:54:37 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2021-03-18 05:54:53 +0000 |
commit | 4763300fab864763e71a4d12fc0768168ebde57f (patch) | |
tree | 39308d9c9afa36dd016a505d9a89da6109e04177 /core | |
parent | 0fcb8d6db42f6c20f6b69d47e02c54e2706f88f9 (diff) |
Add a VpnManager.TYPE_VPN_OEM.
This needed for OEMs that have VPN types not supported by AOSP.
Bug: 171872481
Test: new test coverage in VpnTransportInfoTest
Change-Id: Ic7529bef7f12d2c74a3be5b1a4a2d54fb0d0bfac
Diffstat (limited to 'core')
-rw-r--r-- | core/api/module-lib-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/net/VpnManager.java | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index a21ce7998193..4df72046340b 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -85,6 +85,7 @@ package android.net { public class VpnManager { field @Deprecated public static final int TYPE_VPN_LEGACY = 3; // 0x3 field public static final int TYPE_VPN_NONE = -1; // 0xffffffff + field public static final int TYPE_VPN_OEM = 4; // 0x4 field public static final int TYPE_VPN_PLATFORM = 2; // 0x2 field public static final int TYPE_VPN_SERVICE = 1; // 0x1 } diff --git a/core/java/android/net/VpnManager.java b/core/java/android/net/VpnManager.java index 77754d1256a7..5f65d46f3b1e 100644 --- a/core/java/android/net/VpnManager.java +++ b/core/java/android/net/VpnManager.java @@ -86,13 +86,21 @@ public class VpnManager { public static final int TYPE_VPN_LEGACY = 3; /** + * An VPN created by OEM code through other means than {@link VpnService} or {@link VpnManager}. + * @hide + */ + @SystemApi(client = MODULE_LIBRARIES) + public static final int TYPE_VPN_OEM = 4; + + /** * Channel for VPN notifications. * @hide */ public static final String NOTIFICATION_CHANNEL_VPN = "VPN"; /** @hide */ - @IntDef(value = {TYPE_VPN_NONE, TYPE_VPN_SERVICE, TYPE_VPN_PLATFORM, TYPE_VPN_LEGACY}) + @IntDef(value = {TYPE_VPN_NONE, TYPE_VPN_SERVICE, TYPE_VPN_PLATFORM, TYPE_VPN_LEGACY, + TYPE_VPN_OEM}) @Retention(RetentionPolicy.SOURCE) public @interface VpnType {} |