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
This commit is contained in:
Lorenzo Colitti
2021-03-18 12:54:37 +09:00
parent 3f64a338e5
commit caa5a17f3d

View File

@@ -42,7 +42,13 @@ public class VpnTransportInfoTest {
VpnTransportInfo v1 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM);
VpnTransportInfo v2 = new VpnTransportInfo(VpnManager.TYPE_VPN_SERVICE);
VpnTransportInfo v3 = new VpnTransportInfo(VpnManager.TYPE_VPN_PLATFORM);
VpnTransportInfo v4 = new VpnTransportInfo(VpnManager.TYPE_VPN_LEGACY);
VpnTransportInfo v5 = new VpnTransportInfo(VpnManager.TYPE_VPN_OEM);
assertNotEquals(v1, v2);
assertNotEquals(v3, v4);
assertNotEquals(v4, v5);
assertEquals(v1, v3);
assertEquals(v1.hashCode(), v3.hashCode());
}