Add missing checks to ExoPlayer Builders

PiperOrigin-RevId: 368851903
This commit is contained in:
kimvde 2021-04-16 16:30:52 +01:00 committed by Oliver Woodman
parent 19c267b15b
commit 62eb54532b
2 changed files with 2 additions and 0 deletions

View file

@ -436,6 +436,7 @@ public interface ExoPlayer extends Player {
* @param timeoutMs The time limit in milliseconds.
*/
public Builder experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
Assertions.checkState(!buildCalled);
setForegroundModeTimeoutMs = timeoutMs;
return this;
}

View file

@ -263,6 +263,7 @@ public class SimpleExoPlayer extends BasePlayer
* @param timeoutMs The time limit in milliseconds.
*/
public Builder experimentalSetForegroundModeTimeoutMs(long timeoutMs) {
Assertions.checkState(!buildCalled);
foregroundModeTimeoutMs = timeoutMs;
return this;
}