Commit 92253e1a by ibaker Committed by bachinger

Tweak verifyApplicationThread to compare Threads, not Loopers

#minor-release

PiperOrigin-RevId: 371306241
parent ce8259e2
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment