91 lines
2.3 KiB
Java
91 lines
2.3 KiB
Java
package c.i.a.c;
|
|
|
|
import android.os.Looper;
|
|
import android.util.Log;
|
|
import androidx.annotation.Nullable;
|
|
import c.i.a.c.i2.g;
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
|
import java.util.concurrent.TimeoutException;
|
|
/* compiled from: PlayerMessage */
|
|
public final class h1 {
|
|
public final b a;
|
|
public final a b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final g f879c;
|
|
public final r1 d;
|
|
public int e;
|
|
@Nullable
|
|
public Object f;
|
|
public Looper g;
|
|
public int h;
|
|
public boolean i;
|
|
public boolean j;
|
|
public boolean k;
|
|
|
|
/* compiled from: PlayerMessage */
|
|
public interface a {
|
|
}
|
|
|
|
/* compiled from: PlayerMessage */
|
|
public interface b {
|
|
void r(int i, @Nullable Object obj) throws ExoPlaybackException;
|
|
}
|
|
|
|
public h1(a aVar, b bVar, r1 r1Var, int i, g gVar, Looper looper) {
|
|
this.b = aVar;
|
|
this.a = bVar;
|
|
this.d = r1Var;
|
|
this.g = looper;
|
|
this.f879c = gVar;
|
|
this.h = i;
|
|
}
|
|
|
|
public synchronized boolean a(long j) throws InterruptedException, TimeoutException {
|
|
boolean z2;
|
|
AnimatableValueParser.D(this.i);
|
|
AnimatableValueParser.D(this.g.getThread() != Thread.currentThread());
|
|
long c2 = this.f879c.c() + j;
|
|
while (true) {
|
|
z2 = this.k;
|
|
if (z2 || j <= 0) {
|
|
break;
|
|
}
|
|
wait(j);
|
|
j = c2 - this.f879c.c();
|
|
}
|
|
if (!z2) {
|
|
throw new TimeoutException("Message delivery timed out.");
|
|
}
|
|
return this.j;
|
|
}
|
|
|
|
public synchronized boolean b() {
|
|
return false;
|
|
}
|
|
|
|
public synchronized void c(boolean z2) {
|
|
this.j = z2 | this.j;
|
|
this.k = true;
|
|
notifyAll();
|
|
}
|
|
|
|
public h1 d() {
|
|
AnimatableValueParser.D(!this.i);
|
|
AnimatableValueParser.k(true);
|
|
this.i = true;
|
|
q0 q0Var = (q0) this.b;
|
|
synchronized (q0Var) {
|
|
if (!q0Var.G) {
|
|
if (q0Var.p.isAlive()) {
|
|
q0Var.o.c(14, this).sendToTarget();
|
|
}
|
|
}
|
|
Log.w("ExoPlayerImplInternal", "Ignoring messages sent after release.");
|
|
c(false);
|
|
}
|
|
return this;
|
|
}
|
|
}
|