Commit 66dfb736 by tonihei Committed by Ian Baker

Make ExoPlayerImpl an ExoPlayer implementation

All the functionality of SimpleExoPlayer has moved to ExoPlayerImpl.
Hence, ExoPlayerImpl can fulfil its own name and become an ExoPlayer
implementation. As a result, ExoPlayer.Builder can return ExoPlayerImpl
directly without using SimpleExoPlayer at all.

PiperOrigin-RevId: 427947028
parent b271469f
...@@ -958,7 +958,9 @@ public interface ExoPlayer extends Player { ...@@ -958,7 +958,9 @@ public interface ExoPlayer extends Player {
* @throws IllegalStateException If this method has already been called. * @throws IllegalStateException If this method has already been called.
*/ */
public ExoPlayer build() { public ExoPlayer build() {
return buildSimpleExoPlayer(); checkState(!buildCalled);
buildCalled = true;
return new ExoPlayerImpl(/* builder= */ this, /* wrappingPlayer= */ null);
} }
/* package */ SimpleExoPlayer buildSimpleExoPlayer() { /* package */ SimpleExoPlayer buildSimpleExoPlayer() {
......
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