Merge "Use 'gatewayConnectionName' for VcnGatewayConnection IDs." am: e13e0ee2ee am: 15a0354831 am: 816b3e7eda
Original change: https://android-review.googlesource.com/c/platform/cts/+/1653488
Change-Id: I6a5e01306cde47e35c59b9c7a6d5044319a40721
diff --git a/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java b/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
index 71d6835..107ae44 100644
--- a/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
+++ b/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
@@ -69,6 +69,8 @@
private static final Executor INLINE_EXECUTOR = Runnable::run;
+ private static final String VCN_GATEWAY_CONNECTION_NAME = "test-vcn-gateway-connection";
+
private final Context mContext;
private final VcnManager mVcnManager;
private final SubscriptionManager mSubscriptionManager;
@@ -125,7 +127,7 @@
new VcnControlPlaneIkeConfig(ikeParams, childParams);
final VcnGatewayConnectionConfig gatewayConnConfig =
- new VcnGatewayConnectionConfig.Builder(controlConfig)
+ new VcnGatewayConnectionConfig.Builder(VCN_GATEWAY_CONNECTION_NAME, controlConfig)
.addExposedCapability(NET_CAPABILITY_INTERNET)
.addRequiredUnderlyingCapability(NET_CAPABILITY_INTERNET)
.setRetryInterval(
@@ -244,9 +246,9 @@
@Override
public void onGatewayConnectionError(
- @NonNull int[] networkCapabilities, int errorCode, @Nullable Throwable detail) {
+ @NonNull String gatewayConnectionName, int errorCode, @Nullable Throwable detail) {
mFutureOnGatewayConnectionError.complete(
- new GatewayConnectionError(networkCapabilities, errorCode, detail));
+ new GatewayConnectionError(gatewayConnectionName, errorCode, detail));
}
public int awaitOnStatusChanged() throws Exception {
@@ -260,13 +262,13 @@
/** Info class for organizing VcnStatusCallback#onGatewayConnectionError response data. */
private static class GatewayConnectionError {
- @NonNull public final int[] networkCapabilities;
+ @NonNull public final String gatewayConnectionName;
public final int errorCode;
@Nullable public final Throwable detail;
public GatewayConnectionError(
- @NonNull int[] networkCapabilities, int errorCode, @Nullable Throwable detail) {
- this.networkCapabilities = networkCapabilities.clone();
+ @NonNull String gatewayConnectionName, int errorCode, @Nullable Throwable detail) {
+ this.gatewayConnectionName = gatewayConnectionName;
this.errorCode = errorCode;
this.detail = detail;
}