Reset vpn provision status

The vpn status of cts app is updated to be consented in this
tests which will impact the following test related to vpn.
Thus, reset the status after finishing the test.

Bug: 153760253
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I4856cfc7ddfd70125c513a4201132256704d1a66
This commit is contained in:
Chiachang Wang
2020-06-04 12:52:31 +08:00
parent 43fbab7444
commit abf0c1d1e6

View File

@@ -54,6 +54,7 @@ import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.HexDump;
import com.android.org.bouncycastle.x509.X509V1CertificateGenerator;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -172,6 +173,12 @@ public class Ikev2VpnTest {
mUserCertKey = generateRandomCertAndKeyPair();
}
@After
public void tearDown() {
setAppop(AppOpsManager.OP_ACTIVATE_VPN, false);
setAppop(AppOpsManager.OP_ACTIVATE_PLATFORM_VPN, false);
}
/**
* Sets the given appop using shell commands
*