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
This commit is contained in:
tonihei 2022-02-11 09:28:34 +00:00 committed by Ian Baker
parent 8d09da4abf
commit 27383068bd
2 changed files with 209 additions and 142 deletions

View File

@ -1018,7 +1018,9 @@ public interface ExoPlayer extends Player {
* @throws IllegalStateException If this method has already been called.
*/
public ExoPlayer build() {
return buildSimpleExoPlayer();
checkState(!buildCalled);
buildCalled = true;
return new ExoPlayerImpl(/* builder= */ this, /* wrappingPlayer= */ null);
}
/* package */ SimpleExoPlayer buildSimpleExoPlayer() {