Commit 4b794e57 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.

#minor-release

PiperOrigin-RevId: 427947028
parent 9f586d2b
...@@ -982,7 +982,9 @@ public interface ExoPlayer extends Player { ...@@ -982,7 +982,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