Loading services/core/java/com/android/server/vcn/Vcn.java +12 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,15 @@ public class Vcn extends Handler { continue; } // This should never happen, by virtue of checking for the above check for // pre-existing VcnGatewayConnections that satisfy a given request, but if state // that affects the satsifying of requests changes, this is theoretically possible. if (mVcnGatewayConnections.containsKey(gatewayConnectionConfig)) { Slog.wtf(getLogTag(), "Attempted to bring up VcnGatewayConnection for config " + "with existing VcnGatewayConnection"); return; } final VcnGatewayConnection vcnGatewayConnection = mDeps.newVcnGatewayConnection( mVcnContext, Loading Loading @@ -467,6 +476,9 @@ public class Vcn extends Handler { } } } // Trigger re-evaluation of all requests; mobile data state impacts supported caps. mVcnContext.getVcnNetworkProvider().resendAllRequests(mRequestListener); } } Loading tests/vcn/java/com/android/server/vcn/VcnTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -388,8 +388,9 @@ public class VcnTest { final ContentObserver contentObserver = captor.getValue(); // Start VcnGatewayConnections final NetworkRequestListener requestListener = verifyAndGetRequestListener(); mVcn.setMobileDataEnabled(startingToggleState); triggerVcnRequestListeners(verifyAndGetRequestListener()); triggerVcnRequestListeners(requestListener); final Map<VcnGatewayConnectionConfig, VcnGatewayConnection> gateways = mVcn.getVcnGatewayConnectionConfigMap(); Loading @@ -411,6 +412,9 @@ public class VcnTest { } } if (startingToggleState != endingToggleState) { verify(mVcnNetworkProvider).resendAllRequests(requestListener); } assertEquals(endingToggleState, mVcn.isMobileDataEnabled()); } Loading Loading
services/core/java/com/android/server/vcn/Vcn.java +12 −0 Original line number Diff line number Diff line Loading @@ -396,6 +396,15 @@ public class Vcn extends Handler { continue; } // This should never happen, by virtue of checking for the above check for // pre-existing VcnGatewayConnections that satisfy a given request, but if state // that affects the satsifying of requests changes, this is theoretically possible. if (mVcnGatewayConnections.containsKey(gatewayConnectionConfig)) { Slog.wtf(getLogTag(), "Attempted to bring up VcnGatewayConnection for config " + "with existing VcnGatewayConnection"); return; } final VcnGatewayConnection vcnGatewayConnection = mDeps.newVcnGatewayConnection( mVcnContext, Loading Loading @@ -467,6 +476,9 @@ public class Vcn extends Handler { } } } // Trigger re-evaluation of all requests; mobile data state impacts supported caps. mVcnContext.getVcnNetworkProvider().resendAllRequests(mRequestListener); } } Loading
tests/vcn/java/com/android/server/vcn/VcnTest.java +5 −1 Original line number Diff line number Diff line Loading @@ -388,8 +388,9 @@ public class VcnTest { final ContentObserver contentObserver = captor.getValue(); // Start VcnGatewayConnections final NetworkRequestListener requestListener = verifyAndGetRequestListener(); mVcn.setMobileDataEnabled(startingToggleState); triggerVcnRequestListeners(verifyAndGetRequestListener()); triggerVcnRequestListeners(requestListener); final Map<VcnGatewayConnectionConfig, VcnGatewayConnection> gateways = mVcn.getVcnGatewayConnectionConfigMap(); Loading @@ -411,6 +412,9 @@ public class VcnTest { } } if (startingToggleState != endingToggleState) { verify(mVcnNetworkProvider).resendAllRequests(requestListener); } assertEquals(endingToggleState, mVcn.isMobileDataEnabled()); } Loading