Loading core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -25711,7 +25711,7 @@ package android.net.vcn { method @NonNull public int[] getExposedCapabilities(); method @NonNull public String getGatewayConnectionName(); method @IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) public int getMaxMtu(); method @NonNull public long[] getRetryInterval(); method @NonNull public long[] getRetryIntervalsMs(); } public static final class VcnGatewayConnectionConfig.Builder { Loading @@ -25720,7 +25720,7 @@ package android.net.vcn { method @NonNull public android.net.vcn.VcnGatewayConnectionConfig build(); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder removeExposedCapability(int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setMaxMtu(@IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryInterval(@NonNull long[]); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryIntervalsMs(@NonNull long[]); } public class VcnManager { core/java/android/net/vcn/VcnGatewayConnectionConfig.java +4 −18 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ public final class VcnGatewayConnectionConfig { * <p>To ensure the device is not constantly being woken up, this retry interval MUST be greater * than this value. * * @see {@link Builder#setRetryInterval()} * @see {@link Builder#setRetryIntervalsMs()} */ private static final long MINIMUM_REPEATING_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(15); Loading Loading @@ -333,25 +333,11 @@ public final class VcnGatewayConnectionConfig { /** * Retrieves the configured retry intervals. * * @see Builder#setRetryInterval(long[]) * @see Builder#setRetryIntervalsMs(long[]) */ @NonNull public long[] getRetryInterval() { return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length); } /** * Retrieves the configured retry intervals. * * <p>Left to prevent the need to make major changes while changes are actively in flight. * * @deprecated use getRetryInterval() instead * @hide */ @Deprecated @NonNull public long[] getRetryIntervalsMs() { return getRetryInterval(); return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length); } /** Loading Loading @@ -559,7 +545,7 @@ public final class VcnGatewayConnectionConfig { * @see VcnManager for additional discussion on fail-safe mode */ @NonNull public Builder setRetryInterval(@NonNull long[] retryIntervalsMs) { public Builder setRetryIntervalsMs(@NonNull long[] retryIntervalsMs) { validateRetryInterval(retryIntervalsMs); mRetryIntervalsMs = retryIntervalsMs; Loading tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public class VcnGatewayConnectionConfigTest { // Public for use in VcnGatewayConnectionTest public static VcnGatewayConnectionConfig buildTestConfigWithExposedCaps(int... exposedCaps) { final VcnGatewayConnectionConfig.Builder builder = newBuilder().setRetryInterval(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU); newBuilder().setRetryIntervalsMs(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU); for (int caps : exposedCaps) { builder.addExposedCapability(caps); Loading Loading @@ -133,7 +133,7 @@ public class VcnGatewayConnectionConfigTest { @Test public void testBuilderRequiresNonNullRetryInterval() { try { newBuilder().setRetryInterval(null); newBuilder().setRetryIntervalsMs(null); fail("Expected exception due to invalid retryIntervalMs"); } catch (IllegalArgumentException e) { } Loading @@ -142,7 +142,7 @@ public class VcnGatewayConnectionConfigTest { @Test public void testBuilderRequiresNonEmptyRetryInterval() { try { newBuilder().setRetryInterval(new long[0]); newBuilder().setRetryIntervalsMs(new long[0]); fail("Expected exception due to invalid retryIntervalMs"); } catch (IllegalArgumentException e) { } Loading tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ public class VcnGatewayConnectionRetryTimeoutStateTest extends VcnGatewayConnect public void setUp() throws Exception { super.setUp(); mFirstRetryInterval = mConfig.getRetryInterval()[0]; mFirstRetryInterval = mConfig.getRetryIntervalsMs()[0]; mGatewayConnection.setUnderlyingNetwork(TEST_UNDERLYING_NETWORK_RECORD_1); mGatewayConnection.transitionTo(mGatewayConnection.mRetryTimeoutState); Loading Loading
core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -25711,7 +25711,7 @@ package android.net.vcn { method @NonNull public int[] getExposedCapabilities(); method @NonNull public String getGatewayConnectionName(); method @IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) public int getMaxMtu(); method @NonNull public long[] getRetryInterval(); method @NonNull public long[] getRetryIntervalsMs(); } public static final class VcnGatewayConnectionConfig.Builder { Loading @@ -25720,7 +25720,7 @@ package android.net.vcn { method @NonNull public android.net.vcn.VcnGatewayConnectionConfig build(); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder removeExposedCapability(int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setMaxMtu(@IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryInterval(@NonNull long[]); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryIntervalsMs(@NonNull long[]); } public class VcnManager {
core/java/android/net/vcn/VcnGatewayConnectionConfig.java +4 −18 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ public final class VcnGatewayConnectionConfig { * <p>To ensure the device is not constantly being woken up, this retry interval MUST be greater * than this value. * * @see {@link Builder#setRetryInterval()} * @see {@link Builder#setRetryIntervalsMs()} */ private static final long MINIMUM_REPEATING_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(15); Loading Loading @@ -333,25 +333,11 @@ public final class VcnGatewayConnectionConfig { /** * Retrieves the configured retry intervals. * * @see Builder#setRetryInterval(long[]) * @see Builder#setRetryIntervalsMs(long[]) */ @NonNull public long[] getRetryInterval() { return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length); } /** * Retrieves the configured retry intervals. * * <p>Left to prevent the need to make major changes while changes are actively in flight. * * @deprecated use getRetryInterval() instead * @hide */ @Deprecated @NonNull public long[] getRetryIntervalsMs() { return getRetryInterval(); return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length); } /** Loading Loading @@ -559,7 +545,7 @@ public final class VcnGatewayConnectionConfig { * @see VcnManager for additional discussion on fail-safe mode */ @NonNull public Builder setRetryInterval(@NonNull long[] retryIntervalsMs) { public Builder setRetryIntervalsMs(@NonNull long[] retryIntervalsMs) { validateRetryInterval(retryIntervalsMs); mRetryIntervalsMs = retryIntervalsMs; Loading
tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public class VcnGatewayConnectionConfigTest { // Public for use in VcnGatewayConnectionTest public static VcnGatewayConnectionConfig buildTestConfigWithExposedCaps(int... exposedCaps) { final VcnGatewayConnectionConfig.Builder builder = newBuilder().setRetryInterval(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU); newBuilder().setRetryIntervalsMs(RETRY_INTERVALS_MS).setMaxMtu(MAX_MTU); for (int caps : exposedCaps) { builder.addExposedCapability(caps); Loading Loading @@ -133,7 +133,7 @@ public class VcnGatewayConnectionConfigTest { @Test public void testBuilderRequiresNonNullRetryInterval() { try { newBuilder().setRetryInterval(null); newBuilder().setRetryIntervalsMs(null); fail("Expected exception due to invalid retryIntervalMs"); } catch (IllegalArgumentException e) { } Loading @@ -142,7 +142,7 @@ public class VcnGatewayConnectionConfigTest { @Test public void testBuilderRequiresNonEmptyRetryInterval() { try { newBuilder().setRetryInterval(new long[0]); newBuilder().setRetryIntervalsMs(new long[0]); fail("Expected exception due to invalid retryIntervalMs"); } catch (IllegalArgumentException e) { } Loading
tests/vcn/java/com/android/server/vcn/VcnGatewayConnectionRetryTimeoutStateTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ public class VcnGatewayConnectionRetryTimeoutStateTest extends VcnGatewayConnect public void setUp() throws Exception { super.setUp(); mFirstRetryInterval = mConfig.getRetryInterval()[0]; mFirstRetryInterval = mConfig.getRetryIntervalsMs()[0]; mGatewayConnection.setUnderlyingNetwork(TEST_UNDERLYING_NETWORK_RECORD_1); mGatewayConnection.transitionTo(mGatewayConnection.mRetryTimeoutState); Loading