Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
915f6673
authored
Feb 25, 2020
by
tonihei
Committed by
Oliver Woodman
Feb 25, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Simplify using the Builder in SimpleExoPlayer subclasses.
PiperOrigin-RevId: 297111999
parent
a9eb0866
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
915f6673
...
@@ -293,16 +293,7 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -293,16 +293,7 @@ public class SimpleExoPlayer extends BasePlayer
public
SimpleExoPlayer
build
()
{
public
SimpleExoPlayer
build
()
{
Assertions
.
checkState
(!
buildCalled
);
Assertions
.
checkState
(!
buildCalled
);
buildCalled
=
true
;
buildCalled
=
true
;
return
new
SimpleExoPlayer
(
return
new
SimpleExoPlayer
(
/* builder= */
this
);
context
,
renderersFactory
,
trackSelector
,
loadControl
,
bandwidthMeter
,
analyticsCollector
,
useLazyPreparation
,
clock
,
looper
);
}
}
}
}
...
@@ -351,6 +342,20 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -351,6 +342,20 @@ public class SimpleExoPlayer extends BasePlayer
private
boolean
isPriorityTaskManagerRegistered
;
private
boolean
isPriorityTaskManagerRegistered
;
private
boolean
playerReleased
;
private
boolean
playerReleased
;
/** @param builder The {@link Builder} to obtain all construction parameters. */
protected
SimpleExoPlayer
(
Builder
builder
)
{
this
(
builder
.
context
,
builder
.
renderersFactory
,
builder
.
trackSelector
,
builder
.
loadControl
,
builder
.
bandwidthMeter
,
builder
.
analyticsCollector
,
builder
.
useLazyPreparation
,
builder
.
clock
,
builder
.
looper
);
}
/**
/**
* @param context A {@link Context}.
* @param context A {@link Context}.
* @param renderersFactory A factory for creating {@link Renderer}s to be used by the instance.
* @param renderersFactory A factory for creating {@link Renderer}s to be used by the instance.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment