Commit 02b989f5 by ibaker Committed by Tofunmi Adigun-Hameed

Delete deprecated zero-arg `DefaultBandwidthMeter` constructor

Use `DefaultBandwidthMeter.Builder` instead.

#minor-release

PiperOrigin-RevId: 532069549
(cherry picked from commit 8a9ac8a9de8a62f33f61257ace98440f4ab22bfc)
parent 31a9680a
...@@ -292,19 +292,6 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList ...@@ -292,19 +292,6 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList
private boolean networkTypeOverrideSet; private boolean networkTypeOverrideSet;
private @C.NetworkType int networkTypeOverride; private @C.NetworkType int networkTypeOverride;
/**
* @deprecated Use {@link Builder} instead.
*/
@Deprecated
public DefaultBandwidthMeter() {
this(
/* context= */ null,
/* initialBitrateEstimates= */ ImmutableMap.of(),
DEFAULT_SLIDING_WINDOW_MAX_WEIGHT,
Clock.DEFAULT,
/* resetOnNetworkTypeChange= */ false);
}
private DefaultBandwidthMeter( private DefaultBandwidthMeter(
@Nullable Context context, @Nullable Context context,
Map<Integer, Long> initialBitrateEstimates, Map<Integer, Long> initialBitrateEstimates,
......
...@@ -686,19 +686,13 @@ public final class DefaultBandwidthMeterTest { ...@@ -686,19 +686,13 @@ public final class DefaultBandwidthMeterTest {
} }
@Test @Test
@SuppressWarnings("deprecation")
public void defaultInitialBitrateEstimate_withoutContext_isReasonable() { public void defaultInitialBitrateEstimate_withoutContext_isReasonable() {
DefaultBandwidthMeter bandwidthMeterWithBuilder = DefaultBandwidthMeter bandwidthMeter =
new DefaultBandwidthMeter.Builder(/* context= */ null).build(); new DefaultBandwidthMeter.Builder(/* context= */ null).build();
long initialEstimateWithBuilder = bandwidthMeterWithBuilder.getBitrateEstimate(); long initialEstimate = bandwidthMeter.getBitrateEstimate();
DefaultBandwidthMeter bandwidthMeterWithoutBuilder = new DefaultBandwidthMeter();
long initialEstimateWithoutBuilder = bandwidthMeterWithoutBuilder.getBitrateEstimate();
assertThat(initialEstimateWithBuilder).isGreaterThan(100_000L); assertThat(initialEstimate).isGreaterThan(100_000L);
assertThat(initialEstimateWithBuilder).isLessThan(50_000_000L); assertThat(initialEstimate).isLessThan(50_000_000L);
assertThat(initialEstimateWithoutBuilder).isGreaterThan(100_000L);
assertThat(initialEstimateWithoutBuilder).isLessThan(50_000_000L);
} }
private void setActiveNetworkInfo(NetworkInfo networkInfo) { private void setActiveNetworkInfo(NetworkInfo networkInfo) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment