Only set experimentalSetForegroundModeTimeoutMs value when it's > 0
PiperOrigin-RevId: 345489364
This commit is contained in:
parent
2980354510
commit
0f64ace515
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user