mirror of
https://github.com/androidx/media.git
synced 2025-05-12 01:59:50 +08:00
Tweak verifyApplicationThread to compare Threads, not Loopers
#minor-release PiperOrigin-RevId: 371306241
This commit is contained in:
parent
f7c4fd491b
commit
0a54360f99
@ -2016,7 +2016,7 @@ public class SimpleExoPlayer extends BasePlayer
|
||||
// The constructor may be executed on a background thread. Wait with accessing the player from
|
||||
// the app thread until the constructor finished executing.
|
||||
constructorFinished.blockUninterruptible();
|
||||
if (Looper.myLooper() != getApplicationLooper()) {
|
||||
if (Thread.currentThread() != getApplicationLooper().getThread()) {
|
||||
String message =
|
||||
Util.formatInvariant(
|
||||
"Player is accessed on the wrong thread.\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user