Specify exposed capabilities for VCN gateway connection errors.
This CL updates VCN error callbacks to return the exposed capabilities for a gateway connection for identification purposes. Previously, the required underlying capabilities were returned (which are not meaningful to the caller for identification purposes). Bug: 182281888 Test: atest FrameworksVcnTests Change-Id: Ic62bd0b524f24f2577d9abc7635112a6419d35ed
This commit is contained in:
@@ -979,7 +979,7 @@ public class VcnGatewayConnection extends StateMachine {
|
||||
// IkeSessionCallback.onClosedExceptionally(), which calls sessionClosed()
|
||||
if (exception != null) {
|
||||
mGatewayStatusCallback.onGatewayConnectionError(
|
||||
mConnectionConfig.getRequiredUnderlyingCapabilities(),
|
||||
mConnectionConfig.getExposedCapabilities(),
|
||||
VCN_ERROR_CODE_INTERNAL_ERROR,
|
||||
RuntimeException.class.getName(),
|
||||
"Received "
|
||||
@@ -1016,7 +1016,7 @@ public class VcnGatewayConnection extends StateMachine {
|
||||
}
|
||||
|
||||
mGatewayStatusCallback.onGatewayConnectionError(
|
||||
mConnectionConfig.getRequiredUnderlyingCapabilities(),
|
||||
mConnectionConfig.getExposedCapabilities(),
|
||||
errorCode,
|
||||
exceptionClass,
|
||||
exceptionMessage);
|
||||
|
||||
@@ -241,7 +241,7 @@ public class VcnGatewayConnectionConnectedStateTest extends VcnGatewayConnection
|
||||
|
||||
verify(mGatewayStatusCallback)
|
||||
.onGatewayConnectionError(
|
||||
eq(mConfig.getRequiredUnderlyingCapabilities()),
|
||||
eq(mConfig.getExposedCapabilities()),
|
||||
eq(VCN_ERROR_CODE_INTERNAL_ERROR),
|
||||
any(),
|
||||
any());
|
||||
@@ -275,10 +275,7 @@ public class VcnGatewayConnectionConnectedStateTest extends VcnGatewayConnection
|
||||
|
||||
verify(mGatewayStatusCallback)
|
||||
.onGatewayConnectionError(
|
||||
eq(mConfig.getRequiredUnderlyingCapabilities()),
|
||||
eq(expectedErrorType),
|
||||
any(),
|
||||
any());
|
||||
eq(mConfig.getExposedCapabilities()), eq(expectedErrorType), any(), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user