Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85a0c72c authored by Chiachang Wang's avatar Chiachang Wang
Browse files

Remove unused variables

This is a cleanup commit to address unused variables found
by ERROR_PRONE.

Test: atest FrameworksVpnTests
Change-Id: I40241276a2700a38e769737e0ea8aace4cc3cae9
parent e014e318
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import static org.junit.Assert.fail;

import android.net.ipsec.ike.IkeKeyIdIdentification;
import android.net.ipsec.ike.IkeTunnelConnectionParams;
import android.test.mock.MockContext;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
@@ -67,13 +66,6 @@ public class Ikev2VpnProfileTest {
    private static final byte[] PSK_BYTES = "preSharedKey".getBytes();
    private static final int TEST_MTU = 1300;

    private final MockContext mMockContext =
            new MockContext() {
                @Override
                public String getOpPackageName() {
                    return "fooPackage";
                }
            };
    private final ProxyInfo mProxy = ProxyInfo.buildDirectProxy(
            SERVER_ADDR_STRING, -1, ProxyUtils.exclusionStringAsList(EXCL_LIST));

@@ -218,7 +210,6 @@ public class Ikev2VpnProfileTest {
    @Test
    public void testSetAllowedAlgorithmsInvalidList() throws Exception {
        final Ikev2VpnProfile.Builder builder = getBuilderWithDefaultOptions();
        List<String> allowedAlgorithms = new ArrayList<>();

        try {
            builder.setAllowedAlgorithms(Arrays.asList(IpSecAlgorithm.AUTH_HMAC_SHA256));
@@ -236,7 +227,6 @@ public class Ikev2VpnProfileTest {
    @Test
    public void testSetAllowedAlgorithmsInsecureAlgorithm() throws Exception {
        final Ikev2VpnProfile.Builder builder = getBuilderWithDefaultOptions();
        List<String> allowedAlgorithms = new ArrayList<>();

        try {
            builder.setAllowedAlgorithms(Arrays.asList(IpSecAlgorithm.AUTH_HMAC_MD5));
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ public class VpnManagerTest {

    private static final String PKG_NAME = "fooPackage";

    private static final String SESSION_NAME_STRING = "testSession";
    private static final String SERVER_ADDR_STRING = "1.2.3.4";
    private static final String IDENTITY_STRING = "Identity";
    private static final byte[] PSK_BYTES = "preSharedKey".getBytes();