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
0f64ace5
authored
Dec 03, 2020
by
olly
Committed by
Ian Baker
Dec 14, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Only set experimentalSetForegroundModeTimeoutMs value when it's > 0
PiperOrigin-RevId: 345489364
parent
29803545
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java
View file @
0f64ace5
...
...
@@ -239,7 +239,7 @@ public interface ExoPlayer extends Player {
*
* <p>This method is experimental, and will be renamed or removed in a future release.
*
* @param timeoutMs The time limit in milliseconds
, or 0 for no limit
.
* @param timeoutMs The time limit in milliseconds.
*/
public
Builder
experimentalSetForegroundModeTimeoutMs
(
long
timeoutMs
)
{
setForegroundModeTimeoutMs
=
timeoutMs
;
...
...
@@ -457,7 +457,9 @@ public interface ExoPlayer extends Player {
looper
,
/* wrappingPlayer= */
null
);
player
.
experimentalSetForegroundModeTimeoutMs
(
setForegroundModeTimeoutMs
);
if
(
setForegroundModeTimeoutMs
>
0
)
{
player
.
experimentalSetForegroundModeTimeoutMs
(
setForegroundModeTimeoutMs
);
}
if
(!
throwWhenStuckBuffering
)
{
player
.
experimentalDisableThrowWhenStuckBuffering
();
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
View file @
0f64ace5
...
...
@@ -204,7 +204,7 @@ import java.util.concurrent.TimeoutException;
* <p>This method is experimental, and will be renamed or removed in a future release. It should
* only be called before the player is used.
*
* @param timeoutMs The time limit in milliseconds
, or 0 for no limit
.
* @param timeoutMs The time limit in milliseconds.
*/
public
void
experimentalSetForegroundModeTimeoutMs
(
long
timeoutMs
)
{
internalPlayer
.
experimentalSetForegroundModeTimeoutMs
(
timeoutMs
);
...
...
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