- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
181 lines
4.3 KiB
Java
181 lines
4.3 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import android.os.Message;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
import java.nio.ByteBuffer;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class gf extends e2 implements Handler.Callback {
|
|
private final df n;
|
|
private final ff o;
|
|
private final Handler p;
|
|
private final ef q;
|
|
private cf r;
|
|
private boolean s;
|
|
private boolean t;
|
|
private long u;
|
|
private long v;
|
|
private bf w;
|
|
|
|
@Override // com.applovin.impl.e2
|
|
public void a(long j, boolean z) {
|
|
this.w = null;
|
|
this.v = C.TIME_UNSET;
|
|
this.s = false;
|
|
this.t = false;
|
|
}
|
|
|
|
@Override // com.applovin.impl.qi
|
|
public boolean c() {
|
|
return this.t;
|
|
}
|
|
|
|
@Override // com.applovin.impl.qi
|
|
public boolean d() {
|
|
return true;
|
|
}
|
|
|
|
@Override // com.applovin.impl.qi, com.applovin.impl.ri
|
|
public String getName() {
|
|
return "MetadataRenderer";
|
|
}
|
|
|
|
@Override // com.applovin.impl.e2
|
|
public void v() {
|
|
this.w = null;
|
|
this.v = C.TIME_UNSET;
|
|
this.r = null;
|
|
}
|
|
|
|
public gf(ff ffVar, Looper looper) {
|
|
this(ffVar, looper, df.a);
|
|
}
|
|
|
|
private void a(bf bfVar, List list) {
|
|
for (int i = 0; i < bfVar.c(); i++) {
|
|
f9 b = bfVar.a(i).b();
|
|
if (b != null && this.n.a(b)) {
|
|
cf b2 = this.n.b(b);
|
|
byte[] bArr = (byte[]) b1.a(bfVar.a(i).a());
|
|
this.q.b();
|
|
this.q.g(bArr.length);
|
|
((ByteBuffer) xp.a(this.q.c)).put(bArr);
|
|
this.q.g();
|
|
bf a = b2.a(this.q);
|
|
if (a != null) {
|
|
a(a, list);
|
|
}
|
|
} else {
|
|
list.add(bfVar.a(i));
|
|
}
|
|
}
|
|
}
|
|
|
|
public gf(ff ffVar, Looper looper, df dfVar) {
|
|
super(5);
|
|
this.o = (ff) b1.a(ffVar);
|
|
this.p = looper == null ? null : xp.a(looper, (Handler.Callback) this);
|
|
this.n = (df) b1.a(dfVar);
|
|
this.q = new ef();
|
|
this.v = C.TIME_UNSET;
|
|
}
|
|
|
|
@Override // android.os.Handler.Callback
|
|
public boolean handleMessage(Message message) {
|
|
if (message.what == 0) {
|
|
b((bf) message.obj);
|
|
return true;
|
|
}
|
|
throw new IllegalStateException();
|
|
}
|
|
|
|
private void z() {
|
|
if (this.s || this.w != null) {
|
|
return;
|
|
}
|
|
this.q.b();
|
|
g9 r = r();
|
|
int a = a(r, this.q, 0);
|
|
if (a != -4) {
|
|
if (a == -5) {
|
|
this.u = ((f9) b1.a(r.b)).q;
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (this.q.e()) {
|
|
this.s = true;
|
|
return;
|
|
}
|
|
ef efVar = this.q;
|
|
efVar.j = this.u;
|
|
efVar.g();
|
|
bf a2 = ((cf) xp.a(this.r)).a(this.q);
|
|
if (a2 != null) {
|
|
ArrayList arrayList = new ArrayList(a2.c());
|
|
a(a2, arrayList);
|
|
if (arrayList.isEmpty()) {
|
|
return;
|
|
}
|
|
this.w = new bf(arrayList);
|
|
this.v = this.q.f;
|
|
}
|
|
}
|
|
|
|
private void b(bf bfVar) {
|
|
this.o.a(bfVar);
|
|
}
|
|
|
|
private void a(bf bfVar) {
|
|
Handler handler = this.p;
|
|
if (handler != null) {
|
|
handler.obtainMessage(0, bfVar).sendToTarget();
|
|
} else {
|
|
b(bfVar);
|
|
}
|
|
}
|
|
|
|
private boolean c(long j) {
|
|
boolean z;
|
|
bf bfVar = this.w;
|
|
if (bfVar == null || this.v > j) {
|
|
z = false;
|
|
} else {
|
|
a(bfVar);
|
|
this.w = null;
|
|
this.v = C.TIME_UNSET;
|
|
z = true;
|
|
}
|
|
if (this.s && this.w == null) {
|
|
this.t = true;
|
|
}
|
|
return z;
|
|
}
|
|
|
|
@Override // com.applovin.impl.e2
|
|
public void a(f9[] f9VarArr, long j, long j2) {
|
|
this.r = this.n.b(f9VarArr[0]);
|
|
}
|
|
|
|
@Override // com.applovin.impl.qi
|
|
public void a(long j, long j2) {
|
|
boolean z = true;
|
|
while (z) {
|
|
z();
|
|
z = c(j);
|
|
}
|
|
}
|
|
|
|
@Override // com.applovin.impl.ri
|
|
public int a(f9 f9Var) {
|
|
if (this.n.a(f9Var)) {
|
|
return ri.a(f9Var.F == 0 ? 4 : 2);
|
|
}
|
|
return ri.a(0);
|
|
}
|
|
}
|