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
91b3aad0
authored
Aug 27, 2020
by
aquilescanta
Committed by
tonihei
Aug 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make ExoPlayer.getPlaybackLooper never return null
Issue: #7807 PiperOrigin-RevId: 328726966
parent
237cb9df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
91b3aad0
...
...
@@ -163,6 +163,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
private
final
BandwidthMeter
bandwidthMeter
;
private
final
HandlerWrapper
handler
;
private
final
HandlerThread
internalPlaybackThread
;
private
final
Looper
playbackLooper
;
private
final
Timeline
.
Window
window
;
private
final
Timeline
.
Period
period
;
private
final
long
backBufferDurationUs
;
...
...
@@ -252,7 +253,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
// not normally change to this priority" is incorrect.
internalPlaybackThread
=
new
HandlerThread
(
"ExoPlayer:Playback"
,
Process
.
THREAD_PRIORITY_AUDIO
);
internalPlaybackThread
.
start
();
handler
=
clock
.
createHandler
(
internalPlaybackThread
.
getLooper
(),
this
);
playbackLooper
=
internalPlaybackThread
.
getLooper
();
handler
=
clock
.
createHandler
(
playbackLooper
,
this
);
}
public
void
experimentalSetReleaseTimeoutMs
(
long
releaseTimeoutMs
)
{
...
...
@@ -403,7 +405,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
}
public
Looper
getPlaybackLooper
()
{
return
internalPlaybackThread
.
getLooper
()
;
return
playbackLooper
;
}
// Playlist.PlaylistInfoRefreshListener implementation.
...
...
@@ -1365,7 +1367,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
}
private
void
sendMessageToTarget
(
PlayerMessage
message
)
throws
ExoPlaybackException
{
if
(
message
.
getHandler
().
getLooper
()
==
handler
.
getLooper
()
)
{
if
(
message
.
getHandler
().
getLooper
()
==
playbackLooper
)
{
deliverMessage
(
message
);
if
(
playbackInfo
.
playbackState
==
Player
.
STATE_READY
||
playbackInfo
.
playbackState
==
Player
.
STATE_BUFFERING
)
{
...
...
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