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
43713abe
authored
Nov 26, 2020
by
sungsoo
Committed by
Andrew Lewis
Nov 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add MediaUtilsTest
PiperOrigin-RevId: 344384426
parent
4602e3a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
library/common/src/main/java/com/google/android/exoplayer2/util/Util.java
View file @
43713abe
...
@@ -508,6 +508,10 @@ public final class Util {
...
@@ -508,6 +508,10 @@ public final class Util {
* run. {@code false} otherwise.
* run. {@code false} otherwise.
*/
*/
public
static
boolean
postOrRun
(
Handler
handler
,
Runnable
runnable
)
{
public
static
boolean
postOrRun
(
Handler
handler
,
Runnable
runnable
)
{
Looper
looper
=
handler
.
getLooper
();
if
(!
looper
.
getThread
().
isAlive
())
{
return
false
;
}
if
(
handler
.
getLooper
()
==
Looper
.
myLooper
())
{
if
(
handler
.
getLooper
()
==
Looper
.
myLooper
())
{
runnable
.
run
();
runnable
.
run
();
return
true
;
return
true
;
...
...
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