Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a381cbf5
authored
Aug 12, 2019
by
tonihei
Committed by
Oliver Woodman
Sep 02, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make reset on network change the default.
PiperOrigin-RevId: 262886490
parent
4656196d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java
RELEASENOTES.md
View file @
a381cbf5
...
@@ -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 ###
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java
View file @
a381cbf5
...
@@ -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_r
esetOnNetworkTypeChange
(
boolean
resetOnNetworkTypeChange
)
{
public
Builder
setR
esetOnNetworkTypeChange
(
boolean
resetOnNetworkTypeChange
)
{
this
.
resetOnNetworkTypeChange
=
resetOnNetworkTypeChange
;
this
.
resetOnNetworkTypeChange
=
resetOnNetworkTypeChange
;
return
this
;
return
this
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment