- 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
249 lines
7.3 KiB
Java
249 lines
7.3 KiB
Java
package com.applovin.impl;
|
|
|
|
import com.applovin.impl.be;
|
|
import com.applovin.impl.eb;
|
|
import com.applovin.impl.h8;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class i0 extends f2 {
|
|
private final y1 h;
|
|
private final long i;
|
|
private final long j;
|
|
private final long k;
|
|
private final float l;
|
|
private final float m;
|
|
private final eb n;
|
|
private final l3 o;
|
|
private float p;
|
|
private int q;
|
|
private int r;
|
|
private long s;
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static eb b(h8.a[] aVarArr) {
|
|
ArrayList arrayList = new ArrayList();
|
|
for (h8.a aVar : aVarArr) {
|
|
if (aVar == null || aVar.b.length <= 1) {
|
|
arrayList.add(null);
|
|
} else {
|
|
eb.a f = eb.f();
|
|
f.b(new a(0L, 0L));
|
|
arrayList.add(f);
|
|
}
|
|
}
|
|
long[][] c = c(aVarArr);
|
|
int[] iArr = new int[c.length];
|
|
long[] jArr = new long[c.length];
|
|
for (int i = 0; i < c.length; i++) {
|
|
long[] jArr2 = c[i];
|
|
jArr[i] = jArr2.length == 0 ? 0L : jArr2[0];
|
|
}
|
|
a(arrayList, jArr);
|
|
eb a2 = a(c);
|
|
for (int i2 = 0; i2 < a2.size(); i2++) {
|
|
int intValue = ((Integer) a2.get(i2)).intValue();
|
|
int i3 = iArr[intValue] + 1;
|
|
iArr[intValue] = i3;
|
|
jArr[intValue] = c[intValue][i3];
|
|
a(arrayList, jArr);
|
|
}
|
|
for (int i4 = 0; i4 < aVarArr.length; i4++) {
|
|
if (arrayList.get(i4) != null) {
|
|
jArr[i4] = jArr[i4] * 2;
|
|
}
|
|
}
|
|
a(arrayList, jArr);
|
|
eb.a f2 = eb.f();
|
|
for (int i5 = 0; i5 < arrayList.size(); i5++) {
|
|
eb.a aVar2 = (eb.a) arrayList.get(i5);
|
|
f2.b(aVar2 == null ? eb.h() : aVar2.a());
|
|
}
|
|
return f2.a();
|
|
}
|
|
|
|
@Override // com.applovin.impl.f2, com.applovin.impl.h8
|
|
public void a(float f) {
|
|
this.p = f;
|
|
}
|
|
|
|
@Override // com.applovin.impl.f2, com.applovin.impl.h8
|
|
public void f() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.h8
|
|
public int h() {
|
|
return this.q;
|
|
}
|
|
|
|
@Override // com.applovin.impl.f2, com.applovin.impl.h8
|
|
public void i() {
|
|
this.s = C.TIME_UNSET;
|
|
}
|
|
|
|
public static class b implements h8.b {
|
|
private final int a;
|
|
private final int b;
|
|
private final int c;
|
|
private final float d;
|
|
private final float e;
|
|
private final l3 f;
|
|
|
|
public b() {
|
|
this(10000, 25000, 25000, 0.7f, 0.75f, l3.a);
|
|
}
|
|
|
|
@Override // com.applovin.impl.h8.b
|
|
public final h8[] a(h8.a[] aVarArr, y1 y1Var, be.a aVar, fo foVar) {
|
|
h8 a;
|
|
eb b = i0.b(aVarArr);
|
|
h8[] h8VarArr = new h8[aVarArr.length];
|
|
for (int i = 0; i < aVarArr.length; i++) {
|
|
h8.a aVar2 = aVarArr[i];
|
|
if (aVar2 != null) {
|
|
int[] iArr = aVar2.b;
|
|
if (iArr.length != 0) {
|
|
if (iArr.length == 1) {
|
|
a = new t8(aVar2.a, iArr[0], aVar2.c);
|
|
} else {
|
|
a = a(aVar2.a, iArr, aVar2.c, y1Var, (eb) b.get(i));
|
|
}
|
|
h8VarArr[i] = a;
|
|
}
|
|
}
|
|
}
|
|
return h8VarArr;
|
|
}
|
|
|
|
public i0 a(oo ooVar, int[] iArr, int i, y1 y1Var, eb ebVar) {
|
|
return new i0(ooVar, iArr, i, y1Var, this.a, this.b, this.c, this.d, this.e, ebVar, this.f);
|
|
}
|
|
|
|
public b(int i, int i2, int i3, float f, float f2, l3 l3Var) {
|
|
this.a = i;
|
|
this.b = i2;
|
|
this.c = i3;
|
|
this.d = f;
|
|
this.e = f2;
|
|
this.f = l3Var;
|
|
}
|
|
}
|
|
|
|
public i0(oo ooVar, int[] iArr, int i, y1 y1Var, long j, long j2, long j3, float f, float f2, List list, l3 l3Var) {
|
|
super(ooVar, iArr, i);
|
|
if (j3 < j) {
|
|
pc.d("AdaptiveTrackSelection", "Adjusting minDurationToRetainAfterDiscardMs to be at least minDurationForQualityIncreaseMs");
|
|
j3 = j;
|
|
}
|
|
this.h = y1Var;
|
|
this.i = j * 1000;
|
|
this.j = j2 * 1000;
|
|
this.k = j3 * 1000;
|
|
this.l = f;
|
|
this.m = f2;
|
|
this.n = eb.a((Collection) list);
|
|
this.o = l3Var;
|
|
this.p = 1.0f;
|
|
this.r = 0;
|
|
this.s = C.TIME_UNSET;
|
|
}
|
|
|
|
private static long[][] c(h8.a[] aVarArr) {
|
|
long[][] jArr = new long[aVarArr.length][];
|
|
for (int i = 0; i < aVarArr.length; i++) {
|
|
h8.a aVar = aVarArr[i];
|
|
if (aVar == null) {
|
|
jArr[i] = new long[0];
|
|
} else {
|
|
jArr[i] = new long[aVar.b.length];
|
|
int i2 = 0;
|
|
while (true) {
|
|
if (i2 >= aVar.b.length) {
|
|
break;
|
|
}
|
|
jArr[i][i2] = aVar.a.a(r5[i2]).i;
|
|
i2++;
|
|
}
|
|
Arrays.sort(jArr[i]);
|
|
}
|
|
}
|
|
return jArr;
|
|
}
|
|
|
|
public static final class a {
|
|
public final long a;
|
|
public final long b;
|
|
|
|
public int hashCode() {
|
|
return (((int) this.a) * 31) + ((int) this.b);
|
|
}
|
|
|
|
public a(long j, long j2) {
|
|
this.a = j;
|
|
this.b = j2;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof a)) {
|
|
return false;
|
|
}
|
|
a aVar = (a) obj;
|
|
return this.a == aVar.a && this.b == aVar.b;
|
|
}
|
|
}
|
|
|
|
private static void a(List list, long[] jArr) {
|
|
long j = 0;
|
|
for (long j2 : jArr) {
|
|
j += j2;
|
|
}
|
|
for (int i = 0; i < list.size(); i++) {
|
|
eb.a aVar = (eb.a) list.get(i);
|
|
if (aVar != null) {
|
|
aVar.b(new a(j, jArr[i]));
|
|
}
|
|
}
|
|
}
|
|
|
|
private static eb a(long[][] jArr) {
|
|
fc b2 = wf.a().a().b();
|
|
for (int i = 0; i < jArr.length; i++) {
|
|
long[] jArr2 = jArr[i];
|
|
if (jArr2.length > 1) {
|
|
int length = jArr2.length;
|
|
double[] dArr = new double[length];
|
|
int i2 = 0;
|
|
while (true) {
|
|
long[] jArr3 = jArr[i];
|
|
double d = 0.0d;
|
|
if (i2 >= jArr3.length) {
|
|
break;
|
|
}
|
|
long j = jArr3[i2];
|
|
if (j != -1) {
|
|
d = Math.log(j);
|
|
}
|
|
dArr[i2] = d;
|
|
i2++;
|
|
}
|
|
int i3 = length - 1;
|
|
double d2 = dArr[i3] - dArr[0];
|
|
int i4 = 0;
|
|
while (i4 < i3) {
|
|
double d3 = dArr[i4];
|
|
i4++;
|
|
b2.put(Double.valueOf(d2 == 0.0d ? 1.0d : (((d3 + dArr[i4]) * 0.5d) - dArr[0]) / d2), Integer.valueOf(i));
|
|
}
|
|
}
|
|
}
|
|
return eb.a(b2.values());
|
|
}
|
|
}
|