Commit a381cbf5 by tonihei Committed by Oliver Woodman

Make reset on network change the default.

PiperOrigin-RevId: 262886490
parent 4656196d
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
`DefaultTrackSelector` to allow adaptive selections of audio tracks with `DefaultTrackSelector` to allow adaptive selections of audio tracks with
different channel counts different channel counts
([#6257](https://github.com/google/ExoPlayer/issues/6257)). ([#6257](https://github.com/google/ExoPlayer/issues/6257)).
* Reset `DefaultBandwidthMeter` to initial values on network change.
### 2.10.4 ### ### 2.10.4 ###
......
...@@ -100,6 +100,7 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList ...@@ -100,6 +100,7 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList
initialBitrateEstimates = getInitialBitrateEstimatesForCountry(Util.getCountryCode(context)); initialBitrateEstimates = getInitialBitrateEstimatesForCountry(Util.getCountryCode(context));
slidingWindowMaxWeight = DEFAULT_SLIDING_WINDOW_MAX_WEIGHT; slidingWindowMaxWeight = DEFAULT_SLIDING_WINDOW_MAX_WEIGHT;
clock = Clock.DEFAULT; clock = Clock.DEFAULT;
resetOnNetworkTypeChange = true;
} }
/** /**
...@@ -168,14 +169,12 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList ...@@ -168,14 +169,12 @@ public final class DefaultBandwidthMeter implements BandwidthMeter, TransferList
} }
/** /**
* Sets whether to reset if the network type changes. * Sets whether to reset if the network type changes. The default value is {@code true}.
*
* <p>This method is experimental, and will be renamed or removed in a future release.
* *
* @param resetOnNetworkTypeChange Whether to reset if the network type changes. * @param resetOnNetworkTypeChange Whether to reset if the network type changes.
* @return This builder. * @return This builder.
*/ */
public Builder experimental_resetOnNetworkTypeChange(boolean resetOnNetworkTypeChange) { public Builder setResetOnNetworkTypeChange(boolean resetOnNetworkTypeChange) {
this.resetOnNetworkTypeChange = resetOnNetworkTypeChange; this.resetOnNetworkTypeChange = resetOnNetworkTypeChange;
return this; return this;
} }
......
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