Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
/* loaded from: classes2.dex */
public final class a {
public final byte[] a;
public final int b;
public a(byte[] bArr, int i) {
this.a = bArr;
this.b = i;
}
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
/* loaded from: classes2.dex */
public interface b {
}

View File

@@ -0,0 +1,143 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.content.Context;
import android.content.res.AssetManager;
import android.net.Uri;
import android.os.SystemClock;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
/* loaded from: classes2.dex */
public final class c implements f {
public final AssetManager a;
public final y<? super c> b;
public Uri c;
public InputStream d;
public long e;
public boolean f;
public static final class a extends IOException {
public a(IOException iOException) {
super(iOException);
}
}
public c(Context context, y<? super c> yVar) {
this.a = context.getAssets();
this.b = yVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(i iVar) throws a {
try {
Uri uri = iVar.a;
this.c = uri;
String path = uri.getPath();
if (path.startsWith("/android_asset/")) {
path = path.substring(15);
} else if (path.startsWith("/")) {
path = path.substring(1);
}
InputStream open = this.a.open(path, 1);
this.d = open;
if (open.skip(iVar.d) < iVar.d) {
throw new EOFException();
}
long j = iVar.e;
if (j != -1) {
this.e = j;
} else {
long available = this.d.available();
this.e = available;
if (available == 2147483647L) {
this.e = -1L;
}
}
this.f = true;
y<? super c> yVar = this.b;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
try {
if (kVar.b == 0) {
kVar.c = SystemClock.elapsedRealtime();
}
kVar.b++;
} catch (Throwable th) {
throw th;
}
}
}
return this.e;
} catch (IOException e) {
throw new a(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws a {
this.c = null;
try {
try {
InputStream inputStream = this.d;
if (inputStream != null) {
inputStream.close();
}
} catch (IOException e) {
throw new a(e);
}
} finally {
this.d = null;
if (this.f) {
this.f = false;
y<? super c> yVar = this.b;
if (yVar != null) {
((k) yVar).a();
}
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws a {
if (i2 == 0) {
return 0;
}
long j = this.e;
if (j == 0) {
return -1;
}
if (j != -1) {
try {
i2 = (int) Math.min(j, i2);
} catch (IOException e) {
throw new a(e);
}
}
int read = this.d.read(bArr, i, i2);
if (read == -1) {
if (this.e == -1) {
return -1;
}
throw new a(new EOFException());
}
long j2 = this.e;
if (j2 != -1) {
this.e = j2 - read;
}
y<? super c> yVar = this.b;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
kVar.d += read;
}
}
return read;
}
}

View File

@@ -0,0 +1,43 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import java.io.File;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface a {
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a$a, reason: collision with other inner class name */
public static class C0100a extends IOException {
public C0100a(String str) {
super(str);
}
public C0100a(IOException iOException) {
super(iOException);
}
}
public interface b {
void a(a aVar, g gVar);
void a(a aVar, m mVar, m mVar2);
void a(g gVar);
}
long a(String str);
m a(long j, String str) throws InterruptedException, C0100a;
File a(String str, long j, long j2) throws C0100a;
void a(g gVar) throws C0100a;
void a(File file) throws C0100a;
void b(long j, String str) throws C0100a;
void b(g gVar);
m c(long j, String str) throws C0100a;
}

View File

@@ -0,0 +1,139 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/* loaded from: classes2.dex */
public final class b implements com.fyber.inneractive.sdk.player.exoplayer2.upstream.e {
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a a;
public final long b;
public final int c;
public com.fyber.inneractive.sdk.player.exoplayer2.upstream.i d;
public File e;
public OutputStream f;
public FileOutputStream g;
public long h;
public long i;
public com.fyber.inneractive.sdk.player.exoplayer2.util.m j;
public static class a extends a.C0100a {
public a(IOException iOException) {
super(iOException);
}
}
public b(com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a aVar, long j, int i) {
this.a = (com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(aVar);
this.b = j;
this.c = i;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.e
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar) throws a {
if (iVar.e == -1 && (iVar.g & 2) != 2) {
this.d = null;
return;
}
this.d = iVar;
this.i = 0L;
try {
a();
} catch (IOException e) {
throw new a(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.e
public final void close() throws a {
if (this.d == null) {
return;
}
try {
OutputStream outputStream = this.f;
if (outputStream == null) {
return;
}
try {
outputStream.flush();
this.g.getFD().sync();
s.a(this.f);
this.f = null;
File file = this.e;
this.e = null;
this.a.a(file);
} catch (Throwable th) {
s.a(this.f);
this.f = null;
File file2 = this.e;
this.e = null;
file2.delete();
throw th;
}
} catch (IOException e) {
throw new a(e);
}
}
public final void a() throws IOException {
long j = this.d.e;
long min = j == -1 ? this.b : Math.min(j - this.i, this.b);
com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a aVar = this.a;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar = this.d;
this.e = aVar.a(iVar.f, this.i + iVar.c, min);
FileOutputStream fileOutputStream = new FileOutputStream(this.e);
this.g = fileOutputStream;
if (this.c > 0) {
com.fyber.inneractive.sdk.player.exoplayer2.util.m mVar = this.j;
if (mVar == null) {
this.j = new com.fyber.inneractive.sdk.player.exoplayer2.util.m(this.g, this.c);
} else {
mVar.a(fileOutputStream);
}
this.f = this.j;
} else {
this.f = fileOutputStream;
}
this.h = 0L;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.e
public final void write(byte[] bArr, int i, int i2) throws a {
if (this.d == null) {
return;
}
int i3 = 0;
while (i3 < i2) {
try {
if (this.h == this.b) {
OutputStream outputStream = this.f;
if (outputStream != null) {
try {
outputStream.flush();
this.g.getFD().sync();
s.a(this.f);
this.f = null;
File file = this.e;
this.e = null;
this.a.a(file);
} finally {
}
}
a();
}
int min = (int) Math.min(i2 - i3, this.b - this.h);
this.f.write(bArr, i + i3, min);
i3 += min;
long j = min;
this.h += j;
this.i += j;
} catch (IOException e) {
throw new a(e);
}
}
}
}

View File

@@ -0,0 +1,13 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.e;
/* loaded from: classes2.dex */
public final class c implements e.a {
public final a a;
public final long b = 10485760;
public c(l lVar, int i) {
this.a = lVar;
}
}

View File

@@ -0,0 +1,291 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import android.net.Uri;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.x;
import java.io.IOException;
import java.io.InterruptedIOException;
/* loaded from: classes2.dex */
public final class d implements com.fyber.inneractive.sdk.player.exoplayer2.upstream.f {
public final a a;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f b;
public final x c;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f d;
public final boolean e;
public final boolean f;
public final boolean g;
public com.fyber.inneractive.sdk.player.exoplayer2.upstream.f h;
public boolean i;
public Uri j;
public int k;
public String l;
public long m;
public long n;
public g o;
public boolean p;
public boolean q;
public d(a aVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar2, b bVar, int i) {
this.a = aVar;
this.b = fVar2;
this.e = (i & 1) != 0;
this.f = (i & 2) != 0;
this.g = (i & 4) != 0;
this.d = fVar;
if (bVar != null) {
this.c = new x(fVar, bVar);
} else {
this.c = null;
}
}
/* JADX WARN: Removed duplicated region for block: B:14:0x003a A[ADDED_TO_REGION] */
/* JADX WARN: Removed duplicated region for block: B:18:0x0049 A[Catch: IOException -> 0x0023, TryCatch #0 {IOException -> 0x0023, blocks: (B:3:0x0001, B:6:0x0012, B:8:0x001e, B:12:0x0032, B:16:0x003d, B:18:0x0049, B:21:0x0055, B:22:0x005a, B:24:0x005d, B:26:0x005b, B:27:0x0025, B:29:0x002b, B:32:0x000e), top: B:2:0x0001 }] */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i r9) throws java.io.IOException {
/*
r8 = this;
r0 = 1
android.net.Uri r1 = r9.a // Catch: java.io.IOException -> L23
r8.j = r1 // Catch: java.io.IOException -> L23
int r2 = r9.g // Catch: java.io.IOException -> L23
r8.k = r2 // Catch: java.io.IOException -> L23
java.lang.String r2 = r9.f // Catch: java.io.IOException -> L23
if (r2 == 0) goto Le
goto L12
Le:
java.lang.String r2 = r1.toString() // Catch: java.io.IOException -> L23
L12:
r8.l = r2 // Catch: java.io.IOException -> L23
long r3 = r9.d // Catch: java.io.IOException -> L23
r8.m = r3 // Catch: java.io.IOException -> L23
boolean r1 = r8.f // Catch: java.io.IOException -> L23
r3 = -1
if (r1 == 0) goto L25
boolean r1 = r8.p // Catch: java.io.IOException -> L23
if (r1 != 0) goto L2f
goto L25
L23:
r9 = move-exception
goto L63
L25:
long r5 = r9.e // Catch: java.io.IOException -> L23
int r1 = (r5 > r3 ? 1 : (r5 == r3 ? 0 : -1))
if (r1 != 0) goto L31
boolean r1 = r8.g // Catch: java.io.IOException -> L23
if (r1 == 0) goto L31
L2f:
r1 = r0
goto L32
L31:
r1 = 0
L32:
r8.q = r1 // Catch: java.io.IOException -> L23
long r5 = r9.e // Catch: java.io.IOException -> L23
int r7 = (r5 > r3 ? 1 : (r5 == r3 ? 0 : -1))
if (r7 != 0) goto L5b
if (r1 == 0) goto L3d
goto L5b
L3d:
com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a r1 = r8.a // Catch: java.io.IOException -> L23
long r1 = r1.a(r2) // Catch: java.io.IOException -> L23
r8.n = r1 // Catch: java.io.IOException -> L23
int r3 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))
if (r3 == 0) goto L5d
long r3 = r9.d // Catch: java.io.IOException -> L23
long r1 = r1 - r3
r8.n = r1 // Catch: java.io.IOException -> L23
r3 = 0
int r9 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))
if (r9 <= 0) goto L55
goto L5d
L55:
com.fyber.inneractive.sdk.player.exoplayer2.upstream.g r9 = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.g // Catch: java.io.IOException -> L23
r9.<init>() // Catch: java.io.IOException -> L23
throw r9 // Catch: java.io.IOException -> L23
L5b:
r8.n = r5 // Catch: java.io.IOException -> L23
L5d:
r8.a(r0) // Catch: java.io.IOException -> L23
long r0 = r8.n // Catch: java.io.IOException -> L23
return r0
L63:
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f r1 = r8.h
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f r2 = r8.b
if (r1 == r2) goto L6d
boolean r1 = r9 instanceof com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a.C0100a
if (r1 == 0) goto L6f
L6d:
r8.p = r0
L6f:
throw r9
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.d.a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i):long");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws IOException {
this.j = null;
try {
b();
} catch (IOException e) {
if (this.h == this.b || (e instanceof a.C0100a)) {
this.p = true;
}
throw e;
}
}
public final void b() throws IOException {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar = this.h;
if (fVar == null) {
return;
}
try {
fVar.close();
this.h = null;
this.i = false;
} finally {
g gVar = this.o;
if (gVar != null) {
this.a.b(gVar);
this.o = null;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws IOException {
if (i2 == 0) {
return 0;
}
if (this.n == 0) {
return -1;
}
try {
int read = this.h.read(bArr, i, i2);
if (read >= 0) {
long j = read;
this.m += j;
long j2 = this.n;
if (j2 != -1) {
this.n = j2 - j;
}
} else {
if (this.i) {
long j3 = this.m;
if (this.h == this.c) {
this.a.b(j3, this.l);
}
this.n = 0L;
}
b();
long j4 = this.n;
if ((j4 > 0 || j4 == -1) && a(false)) {
return read(bArr, i, i2);
}
}
return read;
} catch (IOException e) {
if (this.h == this.b || (e instanceof a.C0100a)) {
this.p = true;
}
throw e;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar = this.h;
return fVar == this.d ? fVar.a() : this.j;
}
public final boolean a(boolean z) throws IOException {
m a;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar;
long j;
IOException iOException = null;
if (this.q) {
a = null;
} else if (this.e) {
try {
a = this.a.a(this.m, this.l);
} catch (InterruptedException unused) {
throw new InterruptedIOException();
}
} else {
a = this.a.c(this.m, this.l);
}
if (a == null) {
this.h = this.d;
Uri uri = this.j;
long j2 = this.m;
iVar = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.i(uri, j2, j2, this.n, this.l, this.k, 0);
} else if (a.d) {
Uri fromFile = Uri.fromFile(a.e);
long j3 = this.m - a.b;
long j4 = a.c - j3;
long j5 = this.n;
if (j5 != -1) {
j4 = Math.min(j4, j5);
}
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar2 = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.i(fromFile, this.m, j3, j4, this.l, this.k, 0);
this.h = this.b;
iVar = iVar2;
} else {
long j6 = a.c;
if (j6 == -1) {
j6 = this.n;
} else {
long j7 = this.n;
if (j7 != -1) {
j6 = Math.min(j6, j7);
}
}
long j8 = j6;
Uri uri2 = this.j;
long j9 = this.m;
iVar = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.i(uri2, j9, j9, j8, this.l, this.k, 0);
x xVar = this.c;
if (xVar != null) {
this.h = xVar;
this.o = a;
} else {
this.h = this.d;
this.a.b(a);
}
}
boolean z2 = false;
this.i = iVar.e == -1;
try {
j = this.h.a(iVar);
z2 = true;
} catch (IOException e) {
if (!z && this.i) {
for (Throwable th = e; th != null; th = th.getCause()) {
if ((th instanceof com.fyber.inneractive.sdk.player.exoplayer2.upstream.g) && ((com.fyber.inneractive.sdk.player.exoplayer2.upstream.g) th).a == 0) {
break;
}
}
}
iOException = e;
if (iOException != null) {
throw iOException;
}
j = 0;
}
if (this.i && j != -1) {
this.n = j;
long j10 = iVar.d + j;
if (this.h == this.c) {
this.a.b(j10, this.l);
}
}
return z2;
}
}

View File

@@ -0,0 +1,37 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.e;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.q;
import com.mbridge.msdk.playercommon.exoplayer2.upstream.cache.CacheDataSink;
/* loaded from: classes2.dex */
public final class e implements f.a {
public final a a;
public final f.a b;
public final f.a c;
public final e.a d;
public e(l lVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.m mVar, q qVar, c cVar) {
this.a = lVar;
this.b = mVar;
this.c = qVar;
this.d = cVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f.a
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a() {
b bVar;
a aVar = this.a;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a = this.b.a();
com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a2 = this.c.a();
e.a aVar2 = this.d;
if (aVar2 != null) {
c cVar = (c) aVar2;
bVar = new b(cVar.a, cVar.b, CacheDataSink.DEFAULT_BUFFER_SIZE);
} else {
bVar = null;
}
return new d(aVar, a, a2, bVar, 2);
}
}

View File

@@ -0,0 +1,7 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
/* loaded from: classes2.dex */
public interface f extends a.b {
}

View File

@@ -0,0 +1,36 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import androidx.annotation.NonNull;
import java.io.File;
/* loaded from: classes2.dex */
public class g implements Comparable<g> {
public final String a;
public final long b;
public final long c;
public final boolean d;
public final File e;
public final long f;
public g(String str, long j, long j2, long j3, File file) {
this.a = str;
this.b = j;
this.c = j2;
this.d = file != null;
this.e = file;
this.f = j3;
}
@Override // java.lang.Comparable
public final int compareTo(@NonNull g gVar) {
g gVar2 = gVar;
if (!this.a.equals(gVar2.a)) {
return this.a.compareTo(gVar2.a);
}
long j = this.b - gVar2.b;
if (j == 0) {
return 0;
}
return j < 0 ? -1 : 1;
}
}

View File

@@ -0,0 +1,28 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.TreeSet;
/* loaded from: classes2.dex */
public final class h {
public final int a;
public final String b;
public final TreeSet<m> c = new TreeSet<>();
public long d;
public h(int i, String str, long j) {
this.a = i;
this.b = str;
this.d = j;
}
public final m a(long j) {
m mVar = new m(this.b, j, -1L, C.TIME_UNSET, null);
m floor = this.c.floor(mVar);
if (floor != null && floor.b + floor.c > j) {
return floor;
}
m ceiling = this.c.ceiling(mVar);
return ceiling == null ? new m(this.b, j, -1L, C.TIME_UNSET, null) : new m(this.b, j, ceiling.b - j, C.TIME_UNSET, null);
}
}

View File

@@ -0,0 +1,457 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import android.util.Log;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.upstream.cache.CachedContentIndex;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.util.HashMap;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/* loaded from: classes2.dex */
public final class i {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.b c;
public boolean f;
public com.fyber.inneractive.sdk.player.exoplayer2.util.m g;
public final Cipher d = null;
public final SecretKeySpec e = null;
public final HashMap<String, h> a = new HashMap<>();
public final SparseArray<String> b = new SparseArray<>();
public i(File file) {
this.c = new com.fyber.inneractive.sdk.player.exoplayer2.util.b(new File(file, CachedContentIndex.FILE_NAME));
}
public final boolean a() {
DataInputStream dataInputStream;
BufferedInputStream bufferedInputStream;
DataInputStream dataInputStream2 = null;
try {
try {
bufferedInputStream = new BufferedInputStream(this.c.a());
dataInputStream = new DataInputStream(bufferedInputStream);
} catch (Throwable th) {
th = th;
dataInputStream = null;
}
} catch (FileNotFoundException unused) {
dataInputStream = dataInputStream2;
} catch (IOException e) {
e = e;
}
try {
if (dataInputStream.readInt() != 1) {
s.a(dataInputStream);
return false;
}
if ((dataInputStream.readInt() & 1) == 0) {
if (this.d != null) {
this.f = true;
}
dataInputStream2 = dataInputStream;
} else {
if (this.d == null) {
s.a(dataInputStream);
return false;
}
byte[] bArr = new byte[16];
dataInputStream.readFully(bArr);
try {
this.d.init(2, this.e, new IvParameterSpec(bArr));
dataInputStream2 = new DataInputStream(new CipherInputStream(bufferedInputStream, this.d));
} catch (InvalidAlgorithmParameterException e2) {
e = e2;
throw new IllegalStateException(e);
} catch (InvalidKeyException e3) {
e = e3;
throw new IllegalStateException(e);
}
}
int readInt = dataInputStream2.readInt();
int i = 0;
for (int i2 = 0; i2 < readInt; i2++) {
int readInt2 = dataInputStream2.readInt();
String readUTF = dataInputStream2.readUTF();
h hVar = new h(readInt2, readUTF, dataInputStream2.readLong());
this.a.put(readUTF, hVar);
this.b.put(readInt2, readUTF);
int hashCode = readUTF.hashCode();
long j = hVar.d;
i += ((hashCode + (readInt2 * 31)) * 31) + ((int) (j ^ (j >>> 32)));
}
if (dataInputStream2.readInt() != i) {
s.a(dataInputStream2);
return false;
}
s.a(dataInputStream2);
return true;
} catch (FileNotFoundException unused2) {
if (dataInputStream != null) {
s.a(dataInputStream);
}
return false;
} catch (IOException e4) {
e = e4;
dataInputStream2 = dataInputStream;
Log.e("CachedContentIndex", "Error reading cache content index file.", e);
if (dataInputStream2 != null) {
s.a(dataInputStream2);
}
return false;
} catch (Throwable th2) {
th = th2;
if (dataInputStream != null) {
s.a(dataInputStream);
}
throw th;
}
}
/* JADX ERROR: Types fix failed
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryPossibleTypes(FixTypesVisitor.java:183)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.deduceType(FixTypesVisitor.java:242)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryDeduceTypes(FixTypesVisitor.java:221)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:91)
*/
/* JADX WARN: Failed to calculate best type for var: r0v1 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.calculateFromBounds(FixTypesVisitor.java:156)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.setBestType(FixTypesVisitor.java:133)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.deduceType(FixTypesVisitor.java:238)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryDeduceTypes(FixTypesVisitor.java:221)
at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:91)
*/
/* JADX WARN: Failed to calculate best type for var: r0v1 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Failed to calculate best type for var: r0v11 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Failed to calculate best type for var: r0v12 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Failed to calculate best type for var: r0v17 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Failed to calculate best type for var: r0v7 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Failed to calculate best type for var: r1v8 ??
java.lang.NullPointerException: Cannot invoke "jadx.core.dex.instructions.args.InsnArg.getType()" because "changeArg" is null
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:439)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:473)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:183)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.allSameListener(TypeUpdate.java:466)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.moveListener(TypeUpdate.java:447)
at jadx.core.dex.visitors.typeinference.TypeUpdate.runListeners(TypeUpdate.java:232)
at jadx.core.dex.visitors.typeinference.TypeUpdate.requestUpdate(TypeUpdate.java:212)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeForSsaVar(TypeUpdate.java:188)
at jadx.core.dex.visitors.typeinference.TypeUpdate.updateTypeChecked(TypeUpdate.java:112)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:83)
at jadx.core.dex.visitors.typeinference.TypeUpdate.apply(TypeUpdate.java:56)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.calculateFromBounds(TypeInferenceVisitor.java:145)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.setBestType(TypeInferenceVisitor.java:123)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.lambda$runTypePropagation$2(TypeInferenceVisitor.java:101)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runTypePropagation(TypeInferenceVisitor.java:101)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:75)
*/
/* JADX WARN: Not initialized variable reg: 1, insn: 0x00d1: MOVE (r9 I:??[OBJECT, ARRAY]) = (r1 I:??[OBJECT, ARRAY]), block:B:45:0x00d1 */
public final void b() throws com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a.C0100a {
/*
Method dump skipped, instructions count: 228
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.i.b():void");
}
}

View File

@@ -0,0 +1,86 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
import java.util.Comparator;
import java.util.TreeSet;
/* loaded from: classes2.dex */
public final class j implements f, Comparator<g> {
public final TreeSet<g> a = new TreeSet<>(this);
public long b;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a.b
public final void a(a aVar, g gVar) {
this.a.add(gVar);
this.b += gVar.c;
while (this.b > 10485760) {
try {
aVar.a(this.a.first());
} catch (a.C0100a unused) {
}
}
}
/* JADX WARN: Removed duplicated region for block: B:12:0x0037 A[ORIG_RETURN, RETURN] */
/* JADX WARN: Removed duplicated region for block: B:13:0x0035 A[RETURN, SYNTHETIC] */
@Override // java.util.Comparator
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final int compare(com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g r9, com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g r10) {
/*
r8 = this;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g r9 = (com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g) r9
com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g r10 = (com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.g) r10
long r0 = r9.f
long r2 = r10.f
long r4 = r0 - r2
r6 = 0
int r4 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))
if (r4 != 0) goto L31
java.lang.String r0 = r9.a
java.lang.String r1 = r10.a
boolean r0 = r0.equals(r1)
if (r0 != 0) goto L23
java.lang.String r9 = r9.a
java.lang.String r10 = r10.a
int r9 = r9.compareTo(r10)
goto L38
L23:
long r0 = r9.b
long r9 = r10.b
long r0 = r0 - r9
int r9 = (r0 > r6 ? 1 : (r0 == r6 ? 0 : -1))
if (r9 != 0) goto L2e
r9 = 0
goto L38
L2e:
if (r9 >= 0) goto L37
goto L35
L31:
int r9 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
if (r9 >= 0) goto L37
L35:
r9 = -1
goto L38
L37:
r9 = 1
L38:
return r9
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.j.compare(java.lang.Object, java.lang.Object):int");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a.b
public final void a(g gVar) {
this.a.remove(gVar);
this.b -= gVar.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a.b
public final void a(a aVar, m mVar, m mVar2) {
a(mVar);
a(aVar, mVar2);
}
}

View File

@@ -0,0 +1,30 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import android.os.ConditionVariable;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
/* loaded from: classes2.dex */
public final class k extends Thread {
public final /* synthetic */ ConditionVariable a;
public final /* synthetic */ l b;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public k(l lVar, ConditionVariable conditionVariable) {
super("SimpleCache.initialize()");
this.b = lVar;
this.a = conditionVariable;
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
synchronized (this.b) {
this.a.open();
try {
l.a(this.b);
} catch (a.C0100a e) {
this.b.f = e;
}
this.b.b.getClass();
}
}
}

View File

@@ -0,0 +1,379 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import android.os.ConditionVariable;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.upstream.cache.CachedContentIndex;
import csdk.gluads.Consts;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.regex.Pattern;
/* loaded from: classes2.dex */
public final class l implements a {
public final File a;
public final f b;
public final i d;
public a.C0100a f;
public final HashMap<String, g> c = new HashMap<>();
public final HashMap<String, ArrayList<a.b>> e = new HashMap<>();
public l(File file, j jVar) {
this.a = file;
this.b = jVar;
this.d = new i(file);
ConditionVariable conditionVariable = new ConditionVariable();
new k(this, conditionVariable).start();
conditionVariable.block();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final m a(long j, String str) throws InterruptedException, a.C0100a {
m c;
synchronized (this) {
while (true) {
c = c(j, str);
if (c == null) {
wait();
}
}
}
return c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized void b(g gVar) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(gVar == this.c.remove(gVar.a));
notifyAll();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
/* renamed from: d, reason: merged with bridge method [inline-methods] */
public final synchronized m c(long j, String str) throws a.C0100a {
m a;
m mVar;
try {
a.C0100a c0100a = this.f;
if (c0100a == null) {
h hVar = this.d.a.get(str);
if (hVar == null) {
mVar = new m(str, j, -1L, C.TIME_UNSET, null);
} else {
while (true) {
a = hVar.a(j);
if (!a.d || a.e.length() == a.c) {
break;
}
a();
}
mVar = a;
}
if (mVar.d) {
h hVar2 = this.d.a.get(str);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(hVar2.c.remove(mVar));
int i = hVar2.a;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(mVar.d);
long currentTimeMillis = System.currentTimeMillis();
File parentFile = mVar.e.getParentFile();
long j2 = mVar.b;
Pattern pattern = m.g;
File file = new File(parentFile, i + Consts.STRING_PERIOD + j2 + Consts.STRING_PERIOD + currentTimeMillis + ".v3.exo");
m mVar2 = new m(mVar.a, mVar.b, mVar.c, currentTimeMillis, file);
if (mVar.e.renameTo(file)) {
hVar2.c.add(mVar2);
ArrayList<a.b> arrayList = this.e.get(mVar.a);
if (arrayList != null) {
for (int size = arrayList.size() - 1; size >= 0; size--) {
arrayList.get(size).a(this, mVar, mVar2);
}
}
j jVar = (j) this.b;
jVar.a(mVar);
jVar.a(this, mVar2);
return mVar2;
}
throw new a.C0100a("Renaming of " + mVar.e + " to " + file + " failed.");
}
if (this.c.containsKey(str)) {
return null;
}
this.c.put(str, mVar);
return mVar;
}
throw c0100a;
} catch (Throwable th) {
throw th;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized void b(long j, String str) throws a.C0100a {
try {
i iVar = this.d;
h hVar = iVar.a.get(str);
if (hVar == null) {
SparseArray<String> sparseArray = iVar.b;
int size = sparseArray.size();
int i = 0;
int keyAt = size == 0 ? 0 : sparseArray.keyAt(size - 1) + 1;
if (keyAt < 0) {
while (i < size && i == sparseArray.keyAt(i)) {
i++;
}
keyAt = i;
}
iVar.a.put(str, new h(keyAt, str, j));
iVar.b.put(keyAt, str);
iVar.f = true;
} else if (hVar.d != j) {
hVar.d = j;
iVar.f = true;
}
this.d.b();
} catch (Throwable th) {
throw th;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized File a(String str, long j, long j2) throws a.C0100a {
File file;
int i;
long currentTimeMillis;
try {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c.containsKey(str));
if (!this.a.exists()) {
a();
this.a.mkdirs();
}
j jVar = (j) this.b;
while (jVar.b + j2 > 10485760) {
try {
a(jVar.a.first());
} catch (a.C0100a unused) {
}
}
file = this.a;
i iVar = this.d;
h hVar = iVar.a.get(str);
if (hVar == null) {
SparseArray<String> sparseArray = iVar.b;
int size = sparseArray.size();
int i2 = 0;
int keyAt = size == 0 ? 0 : sparseArray.keyAt(size - 1) + 1;
if (keyAt < 0) {
while (i2 < size && i2 == sparseArray.keyAt(i2)) {
i2++;
}
keyAt = i2;
}
hVar = new h(keyAt, str, -1L);
iVar.a.put(str, hVar);
iVar.b.put(keyAt, str);
iVar.f = true;
}
i = hVar.a;
currentTimeMillis = System.currentTimeMillis();
Pattern pattern = m.g;
} catch (Throwable th) {
throw th;
}
return new File(file, i + Consts.STRING_PERIOD + j + Consts.STRING_PERIOD + currentTimeMillis + ".v3.exo");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized void a(File file) throws a.C0100a {
m a = m.a(file, this.d);
int i = 0;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(a != null);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c.containsKey(a.a));
if (file.exists()) {
if (file.length() == 0) {
file.delete();
return;
}
Long valueOf = Long.valueOf(a(a.a));
if (valueOf.longValue() != -1) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(a.b + a.c <= valueOf.longValue());
}
i iVar = this.d;
String str = a.a;
h hVar = iVar.a.get(str);
if (hVar == null) {
SparseArray<String> sparseArray = iVar.b;
int size = sparseArray.size();
int keyAt = size == 0 ? 0 : sparseArray.keyAt(size - 1) + 1;
if (keyAt < 0) {
while (i < size && i == sparseArray.keyAt(i)) {
i++;
}
keyAt = i;
}
hVar = new h(keyAt, str, -1L);
iVar.a.put(str, hVar);
iVar.b.put(keyAt, str);
iVar.f = true;
}
hVar.c.add(a);
ArrayList<a.b> arrayList = this.e.get(a.a);
if (arrayList != null) {
for (int size2 = arrayList.size() - 1; size2 >= 0; size2--) {
arrayList.get(size2).a(this, a);
}
}
((j) this.b).a(this, a);
this.d.b();
notifyAll();
}
}
public static void a(l lVar) throws a.C0100a {
if (!lVar.a.exists()) {
lVar.a.mkdirs();
return;
}
i iVar = lVar.d;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(!iVar.f);
if (!iVar.a()) {
com.fyber.inneractive.sdk.player.exoplayer2.util.b bVar = iVar.c;
bVar.a.delete();
bVar.b.delete();
iVar.a.clear();
iVar.b.clear();
}
File[] listFiles = lVar.a.listFiles();
if (listFiles == null) {
return;
}
for (File file : listFiles) {
if (!file.getName().equals(CachedContentIndex.FILE_NAME)) {
m a = file.length() > 0 ? m.a(file, lVar.d) : null;
if (a != null) {
i iVar2 = lVar.d;
String str = a.a;
h hVar = iVar2.a.get(str);
if (hVar == null) {
SparseArray<String> sparseArray = iVar2.b;
int size = sparseArray.size();
int keyAt = size == 0 ? 0 : sparseArray.keyAt(size - 1) + 1;
if (keyAt < 0) {
keyAt = 0;
while (keyAt < size && keyAt == sparseArray.keyAt(keyAt)) {
keyAt++;
}
}
hVar = new h(keyAt, str, -1L);
iVar2.a.put(str, hVar);
iVar2.b.put(keyAt, str);
iVar2.f = true;
}
hVar.c.add(a);
ArrayList<a.b> arrayList = lVar.e.get(a.a);
if (arrayList != null) {
for (int size2 = arrayList.size() - 1; size2 >= 0; size2--) {
arrayList.get(size2).a(lVar, a);
}
}
((j) lVar.b).a(lVar, a);
} else {
file.delete();
}
}
}
i iVar3 = lVar.d;
iVar3.getClass();
LinkedList linkedList = new LinkedList();
for (h hVar2 : iVar3.a.values()) {
if (hVar2.c.isEmpty()) {
linkedList.add(hVar2.b);
}
}
Iterator it = linkedList.iterator();
while (it.hasNext()) {
h remove = iVar3.a.remove((String) it.next());
if (remove != null) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(remove.c.isEmpty());
iVar3.b.remove(remove.a);
iVar3.f = true;
}
}
lVar.d.b();
}
public final void a(g gVar, boolean z) throws a.C0100a {
h hVar = this.d.a.get(gVar.a);
if (hVar == null || !hVar.c.remove(gVar)) {
return;
}
gVar.e.delete();
if (z && hVar.c.isEmpty()) {
i iVar = this.d;
h remove = iVar.a.remove(hVar.b);
if (remove != null) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(remove.c.isEmpty());
iVar.b.remove(remove.a);
iVar.f = true;
}
this.d.b();
}
ArrayList<a.b> arrayList = this.e.get(gVar.a);
if (arrayList != null) {
for (int size = arrayList.size() - 1; size >= 0; size--) {
arrayList.get(size).a(gVar);
}
}
((j) this.b).a(gVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized void a(g gVar) throws a.C0100a {
a(gVar, true);
}
public final void a() throws a.C0100a {
LinkedList linkedList = new LinkedList();
Iterator<h> it = this.d.a.values().iterator();
while (it.hasNext()) {
Iterator<m> it2 = it.next().c.iterator();
while (it2.hasNext()) {
m next = it2.next();
if (next.e.length() != next.c) {
linkedList.add(next);
}
}
}
Iterator it3 = linkedList.iterator();
while (it3.hasNext()) {
a((g) it3.next(), false);
}
i iVar = this.d;
iVar.getClass();
LinkedList linkedList2 = new LinkedList();
for (h hVar : iVar.a.values()) {
if (hVar.c.isEmpty()) {
linkedList2.add(hVar.b);
}
}
Iterator it4 = linkedList2.iterator();
while (it4.hasNext()) {
h remove = iVar.a.remove((String) it4.next());
if (remove != null) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(remove.c.isEmpty());
iVar.b.remove(remove.a);
iVar.f = true;
}
}
this.d.b();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.a
public final synchronized long a(String str) {
h hVar;
hVar = this.d.a.get(str);
return hVar == null ? -1L : hVar.d;
}
}

View File

@@ -0,0 +1,35 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache;
import java.io.File;
import java.util.regex.Pattern;
/* loaded from: classes2.dex */
public final class m extends g {
public static final Pattern g = Pattern.compile("^(.+)\\.(\\d+)\\.(\\d+)\\.v1\\.exo$", 32);
public static final Pattern h = Pattern.compile("^(.+)\\.(\\d+)\\.(\\d+)\\.v2\\.exo$", 32);
public static final Pattern i = Pattern.compile("^(\\d+)\\.(\\d+)\\.(\\d+)\\.v3\\.exo$", 32);
public m(String str, long j, long j2, long j3, File file) {
super(str, j, j2, j3, file);
}
/* JADX WARN: Code restructure failed: missing block: B:28:0x0085, code lost:
if (r1 == null) goto L47;
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x0116, code lost:
if (r17.renameTo(r3) == false) goto L47;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.m a(java.io.File r17, com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.i r18) {
/*
Method dump skipped, instructions count: 355
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.m.a(java.io.File, com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.i):com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.m");
}
}

View File

@@ -0,0 +1,190 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.content.ContentResolver;
import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.net.Uri;
import android.os.SystemClock;
import java.io.EOFException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class d implements f {
public final ContentResolver a;
public final y<? super d> b;
public Uri c;
public AssetFileDescriptor d;
public FileInputStream e;
public long f;
public boolean g;
public static class a extends IOException {
public a(IOException iOException) {
super(iOException);
}
}
public d(Context context, y<? super d> yVar) {
this.a = context.getContentResolver();
this.b = yVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(i iVar) throws a {
try {
Uri uri = iVar.a;
this.c = uri;
AssetFileDescriptor openAssetFileDescriptor = this.a.openAssetFileDescriptor(uri, "r");
this.d = openAssetFileDescriptor;
if (openAssetFileDescriptor == null) {
throw new FileNotFoundException("Could not open file descriptor for: " + this.c);
}
this.e = new FileInputStream(this.d.getFileDescriptor());
long startOffset = this.d.getStartOffset();
if (this.e.skip(iVar.d + startOffset) - startOffset != iVar.d) {
throw new EOFException();
}
long j = iVar.e;
if (j != -1) {
this.f = j;
} else {
long length = this.d.getLength();
this.f = length;
if (length == -1) {
long available = this.e.available();
this.f = available;
if (available == 0) {
this.f = -1L;
}
}
}
this.g = true;
y<? super d> yVar = this.b;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
try {
if (kVar.b == 0) {
kVar.c = SystemClock.elapsedRealtime();
}
kVar.b++;
} catch (Throwable th) {
throw th;
}
}
}
return this.f;
} catch (IOException e) {
throw new a(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws a {
this.c = null;
try {
try {
FileInputStream fileInputStream = this.e;
if (fileInputStream != null) {
fileInputStream.close();
}
this.e = null;
try {
try {
AssetFileDescriptor assetFileDescriptor = this.d;
if (assetFileDescriptor != null) {
assetFileDescriptor.close();
}
} catch (IOException e) {
throw new a(e);
}
} finally {
this.d = null;
if (this.g) {
this.g = false;
y<? super d> yVar = this.b;
if (yVar != null) {
((k) yVar).a();
}
}
}
} catch (IOException e2) {
throw new a(e2);
}
} catch (Throwable th) {
this.e = null;
try {
try {
AssetFileDescriptor assetFileDescriptor2 = this.d;
if (assetFileDescriptor2 != null) {
assetFileDescriptor2.close();
}
this.d = null;
if (this.g) {
this.g = false;
y<? super d> yVar2 = this.b;
if (yVar2 != null) {
((k) yVar2).a();
}
}
throw th;
} catch (IOException e3) {
throw new a(e3);
}
} finally {
this.d = null;
if (this.g) {
this.g = false;
y<? super d> yVar3 = this.b;
if (yVar3 != null) {
((k) yVar3).a();
}
}
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws a {
if (i2 == 0) {
return 0;
}
long j = this.f;
if (j == 0) {
return -1;
}
if (j != -1) {
try {
i2 = (int) Math.min(j, i2);
} catch (IOException e) {
throw new a(e);
}
}
int read = this.e.read(bArr, i, i2);
if (read == -1) {
if (this.f == -1) {
return -1;
}
throw new a(new EOFException());
}
long j2 = this.f;
if (j2 != -1) {
this.f = j2 - read;
}
y<? super d> yVar = this.b;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
kVar.d += read;
}
}
return read;
}
}

View File

@@ -0,0 +1,16 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface e {
public interface a {
}
void a(i iVar) throws IOException;
void close() throws IOException;
void write(byte[] bArr, int i, int i2) throws IOException;
}

View File

@@ -0,0 +1,20 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface f {
public interface a {
f a();
}
long a(i iVar) throws IOException;
Uri a();
void close() throws IOException;
int read(byte[] bArr, int i, int i2) throws IOException;
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class g extends IOException {
public final int a = 0;
}

View File

@@ -0,0 +1,57 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import androidx.annotation.NonNull;
import java.io.IOException;
import java.io.InputStream;
/* loaded from: classes2.dex */
public final class h extends InputStream {
public final f a;
public final i b;
public long f;
public boolean d = false;
public boolean e = false;
public final byte[] c = new byte[1];
public h(f fVar, i iVar) {
this.a = fVar;
this.b = iVar;
}
@Override // java.io.InputStream
public final int read() throws IOException {
if (read(this.c) == -1) {
return -1;
}
return this.c[0] & 255;
}
@Override // java.io.InputStream, java.io.Closeable, java.lang.AutoCloseable
public final void close() throws IOException {
if (this.e) {
return;
}
this.a.close();
this.e = true;
}
@Override // java.io.InputStream
public final int read(@NonNull byte[] bArr) throws IOException {
return read(bArr, 0, bArr.length);
}
@Override // java.io.InputStream
public final int read(@NonNull byte[] bArr, int i, int i2) throws IOException {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(!this.e);
if (!this.d) {
this.a.a(this.b);
this.d = true;
}
int read = this.a.read(bArr, i, i2);
if (read == -1) {
return -1;
}
this.f += read;
return read;
}
}

View File

@@ -0,0 +1,53 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import com.ironsource.v8;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class i {
public final Uri a;
public final byte[] b;
public final long c;
public final long d;
public final long e;
public final String f;
public final int g;
public i() {
throw null;
}
public i(Uri uri) {
this(uri, 0);
}
public final String toString() {
return "DataSpec[" + this.a + ", " + Arrays.toString(this.b) + ", " + this.c + ", " + this.d + ", " + this.e + ", " + this.f + ", " + this.g + v8.i.e;
}
public i(Uri uri, int i) {
this(uri, 0L, 0L, -1L, null, 1);
}
public i(Uri uri, long j, long j2, long j3, String str, int i) {
this(uri, j, j2, j3, str, i, 0);
}
public i(Uri uri, long j, long j2, long j3, String str, int i, int i2) {
boolean z = true;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(j >= 0);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(j2 >= 0);
if (j3 <= 0 && j3 != -1) {
z = false;
}
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(z);
this.a = uri;
this.b = null;
this.c = j;
this.d = j2;
this.e = j3;
this.f = str;
this.g = i;
}
}

View File

@@ -0,0 +1,104 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class j implements b {
public int e;
public int f;
public final boolean a = true;
public final int b = 65536;
public int g = 0;
public a[] h = new a[100];
public final byte[] c = null;
public final a[] d = new a[1];
public j(int i) {
}
public final int a() {
return this.b;
}
public final synchronized void b() {
try {
int i = 0;
int max = Math.max(0, com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(this.e, this.b) - this.f);
int i2 = this.g;
if (max >= i2) {
return;
}
if (this.c != null) {
int i3 = i2 - 1;
while (i <= i3) {
a[] aVarArr = this.h;
a aVar = aVarArr[i];
byte[] bArr = aVar.a;
byte[] bArr2 = this.c;
if (bArr == bArr2) {
i++;
} else {
a aVar2 = aVarArr[i3];
if (aVar2.a != bArr2) {
i3--;
} else {
aVarArr[i] = aVar2;
aVarArr[i3] = aVar;
i3--;
i++;
}
}
}
max = Math.max(max, i);
if (max >= this.g) {
return;
}
}
Arrays.fill(this.h, max, this.g, (Object) null);
this.g = max;
} catch (Throwable th) {
throw th;
}
}
public final synchronized void a(int i) {
boolean z = i < this.e;
this.e = i;
if (z) {
b();
}
}
public final synchronized void a(a[] aVarArr) {
boolean z;
try {
int i = this.g;
int length = aVarArr.length + i;
a[] aVarArr2 = this.h;
if (length >= aVarArr2.length) {
this.h = (a[]) Arrays.copyOf(aVarArr2, Math.max(aVarArr2.length * 2, i + aVarArr.length));
}
for (a aVar : aVarArr) {
byte[] bArr = aVar.a;
if (bArr != this.c && bArr.length != this.b) {
z = false;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(z);
a[] aVarArr3 = this.h;
int i2 = this.g;
this.g = i2 + 1;
aVarArr3[i2] = aVar;
}
z = true;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(z);
a[] aVarArr32 = this.h;
int i22 = this.g;
this.g = i22 + 1;
aVarArr32[i22] = aVar;
}
this.f -= aVarArr.length;
notifyAll();
} catch (Throwable th) {
throw th;
}
}
}

View File

@@ -0,0 +1,113 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.os.SystemClock;
import android.support.v4.media.session.PlaybackStateCompat;
import com.fyber.inneractive.sdk.player.exoplayer2.util.n;
import java.util.ArrayList;
import java.util.Collections;
/* loaded from: classes2.dex */
public final class k implements y<Object> {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.n a = new com.fyber.inneractive.sdk.player.exoplayer2.util.n();
public int b;
public long c;
public long d;
public long e;
public long f;
public k(int i) {
}
public final synchronized void a() {
n.c cVar;
try {
int i = 0;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.b > 0);
long elapsedRealtime = SystemClock.elapsedRealtime();
int i2 = (int) (elapsedRealtime - this.c);
long j = i2;
this.e += j;
long j2 = this.f;
long j3 = this.d;
this.f = j2 + j3;
if (i2 > 0) {
float f = (8000 * j3) / j;
com.fyber.inneractive.sdk.player.exoplayer2.util.n nVar = this.a;
int sqrt = (int) Math.sqrt(j3);
if (nVar.d != 1) {
Collections.sort(nVar.b, com.fyber.inneractive.sdk.player.exoplayer2.util.n.h);
nVar.d = 1;
}
int i3 = nVar.g;
if (i3 > 0) {
n.c[] cVarArr = nVar.c;
int i4 = i3 - 1;
nVar.g = i4;
cVar = cVarArr[i4];
} else {
cVar = new n.c();
}
int i5 = nVar.e;
nVar.e = i5 + 1;
cVar.a = i5;
cVar.b = sqrt;
cVar.c = f;
nVar.b.add(cVar);
nVar.f += sqrt;
while (true) {
int i6 = nVar.f;
int i7 = nVar.a;
if (i6 <= i7) {
break;
}
int i8 = i6 - i7;
n.c cVar2 = nVar.b.get(0);
int i9 = cVar2.b;
if (i9 <= i8) {
nVar.f -= i9;
nVar.b.remove(0);
int i10 = nVar.g;
if (i10 < 5) {
n.c[] cVarArr2 = nVar.c;
nVar.g = i10 + 1;
cVarArr2[i10] = cVar2;
}
} else {
cVar2.b = i9 - i8;
nVar.f -= i8;
}
}
if (this.e >= 2000 || this.f >= PlaybackStateCompat.ACTION_SET_SHUFFLE_MODE_ENABLED) {
com.fyber.inneractive.sdk.player.exoplayer2.util.n nVar2 = this.a;
if (nVar2.d != 0) {
Collections.sort(nVar2.b, com.fyber.inneractive.sdk.player.exoplayer2.util.n.i);
nVar2.d = 0;
}
float f2 = 0.5f * nVar2.f;
int i11 = 0;
while (true) {
if (i < nVar2.b.size()) {
i11 += nVar2.b.get(i).b;
if (i11 >= f2) {
break;
} else {
i++;
}
} else if (!nVar2.b.isEmpty()) {
ArrayList<n.c> arrayList = nVar2.b;
float f3 = arrayList.get(arrayList.size() - 1).c;
}
}
}
}
int i12 = this.b - 1;
this.b = i12;
if (i12 > 0) {
this.c = elapsedRealtime;
}
this.d = 0L;
} catch (Throwable th) {
throw th;
}
}
}

View File

@@ -0,0 +1,71 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class l implements f {
public final f a;
public final p b;
public final c c;
public final d d;
public f e;
public l(Context context, y<? super f> yVar, f fVar) {
this.a = (f) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(fVar);
this.b = new p(yVar);
this.c = new c(context, yVar);
this.d = new d(context, yVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(i iVar) throws IOException {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.e == null);
String scheme = iVar.a.getScheme();
Uri uri = iVar.a;
int i = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a;
String scheme2 = uri.getScheme();
if (TextUtils.isEmpty(scheme2) || scheme2.equals("file")) {
if (iVar.a.getPath().startsWith("/android_asset/")) {
this.e = this.c;
} else {
this.e = this.b;
}
} else if ("asset".equals(scheme)) {
this.e = this.c;
} else if ("content".equals(scheme)) {
this.e = this.d;
} else {
this.e = this.a;
}
return this.e.a(iVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws IOException {
return this.e.read(bArr, i, i2);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws IOException {
f fVar = this.e;
if (fVar != null) {
try {
fVar.close();
} finally {
this.e = null;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
f fVar = this.e;
if (fVar == null) {
return null;
}
return fVar.a();
}
}

View File

@@ -0,0 +1,22 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.content.Context;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
/* loaded from: classes2.dex */
public final class m implements f.a {
public final Context a;
public final y<? super f> b;
public final f.a c;
public m(Context context, k kVar, o oVar) {
this.a = context.getApplicationContext();
this.b = kVar;
this.c = oVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f.a
public final f a() {
return new l(this.a, this.b, this.c.a());
}
}

View File

@@ -0,0 +1,307 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import android.support.v4.media.session.PlaybackStateCompat;
import android.util.Log;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.mbridge.msdk.foundation.download.Command;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InterruptedIOException;
import java.io.OutputStream;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.net.NoRouteToHostException;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Pattern;
import org.apache.http.protocol.HTTP;
/* loaded from: classes2.dex */
public final class n implements f {
public static final Pattern o = Pattern.compile("^bytes (\\d+)-(\\d+)/(\\d+)$");
public static final AtomicReference<byte[]> p = new AtomicReference<>();
public final boolean a;
public final int b;
public final int c;
public final String d;
public final u e;
public final u f = new u();
public final y<? super n> g;
public HttpURLConnection h;
public InputStream i;
public boolean j;
public long k;
public long l;
public long m;
public long n;
public n(String str, y yVar, int i, int i2, boolean z, u uVar) {
this.d = com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(str);
this.g = yVar;
this.b = i;
this.c = i2;
this.a = z;
this.e = uVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
HttpURLConnection httpURLConnection = this.h;
if (httpURLConnection == null) {
return null;
}
return Uri.parse(httpURLConnection.getURL().toString());
}
public final HttpURLConnection b(i iVar) throws IOException {
HttpURLConnection a;
URL url = new URL(iVar.a.toString());
byte[] bArr = iVar.b;
long j = iVar.d;
long j2 = iVar.e;
int i = 0;
boolean z = (iVar.g & 1) == 1;
if (!this.a) {
return a(url, bArr, j, j2, z, true);
}
while (true) {
int i2 = i + 1;
if (i > 20) {
throw new NoRouteToHostException(com.fyber.inneractive.sdk.player.exoplayer2.i.a("Too many redirects: ", i2));
}
a = a(url, bArr, j, j2, z, false);
int responseCode = a.getResponseCode();
if (responseCode == 300 || responseCode == 301 || responseCode == 302 || responseCode == 303 || (bArr == null && (responseCode == 307 || responseCode == 308))) {
String headerField = a.getHeaderField("Location");
a.disconnect();
if (headerField == null) {
throw new ProtocolException("Null location redirect");
}
URL url2 = new URL(url, headerField);
String protocol = url2.getProtocol();
if (!"https".equals(protocol) && !"http".equals(protocol)) {
throw new ProtocolException("Unsupported protocol redirect: " + protocol);
}
bArr = null;
i = i2;
url = url2;
}
}
return a;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws s {
try {
b();
if (i2 == 0) {
return 0;
}
long j = this.l;
if (j != -1) {
long j2 = j - this.n;
if (j2 == 0) {
return -1;
}
i2 = (int) Math.min(i2, j2);
}
int read = this.i.read(bArr, i, i2);
if (read == -1) {
if (this.l != -1) {
throw new EOFException();
}
return -1;
}
long j3 = read;
this.n += j3;
y<? super n> yVar = this.g;
if (yVar == null) {
return read;
}
k kVar = (k) yVar;
synchronized (kVar) {
kVar.d += j3;
}
return read;
} catch (IOException e) {
throw new s(e);
}
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws s {
try {
if (this.i != null) {
HttpURLConnection httpURLConnection = this.h;
long j = this.l;
if (j != -1) {
j -= this.n;
}
a(httpURLConnection, j);
try {
this.i.close();
} catch (IOException e) {
throw new s(e);
}
}
this.i = null;
HttpURLConnection httpURLConnection2 = this.h;
if (httpURLConnection2 != null) {
try {
httpURLConnection2.disconnect();
} catch (Exception e2) {
Log.e("DefaultHttpDataSource", "Unexpected error while disconnecting", e2);
}
this.h = null;
}
if (this.j) {
this.j = false;
y<? super n> yVar = this.g;
if (yVar != null) {
((k) yVar).a();
}
}
} finally {
}
}
/* JADX WARN: Code restructure failed: missing block: B:14:0x002a, code lost:
if (r6 != 0) goto L17;
*/
/* JADX WARN: Removed duplicated region for block: B:57:0x0082 */
/* JADX WARN: Removed duplicated region for block: B:71:0x00ec */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i r18) throws com.fyber.inneractive.sdk.player.exoplayer2.upstream.s {
/*
Method dump skipped, instructions count: 428
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.upstream.n.a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i):long");
}
public final void b() throws IOException {
if (this.m == this.k) {
return;
}
byte[] andSet = p.getAndSet(null);
if (andSet == null) {
andSet = new byte[4096];
}
while (true) {
long j = this.m;
long j2 = this.k;
if (j != j2) {
int read = this.i.read(andSet, 0, (int) Math.min(j2 - j, andSet.length));
if (Thread.interrupted()) {
throw new InterruptedIOException();
}
if (read == -1) {
throw new EOFException();
}
long j3 = read;
this.m += j3;
y<? super n> yVar = this.g;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
kVar.d += j3;
}
}
} else {
p.set(andSet);
return;
}
}
}
public final HttpURLConnection a(URL url, byte[] bArr, long j, long j2, boolean z, boolean z2) throws IOException {
Map<String, String> map;
HttpURLConnection httpURLConnection = (HttpURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection()));
httpURLConnection.setConnectTimeout(this.b);
httpURLConnection.setReadTimeout(this.c);
u uVar = this.e;
if (uVar != null) {
for (Map.Entry<String, String> entry : uVar.a().entrySet()) {
httpURLConnection.setRequestProperty(entry.getKey(), entry.getValue());
}
}
u uVar2 = this.f;
synchronized (uVar2) {
try {
if (uVar2.b == null) {
uVar2.b = Collections.unmodifiableMap(new HashMap(uVar2.a));
}
map = uVar2.b;
} catch (Throwable th) {
throw th;
}
}
for (Map.Entry<String, String> entry2 : map.entrySet()) {
httpURLConnection.setRequestProperty(entry2.getKey(), entry2.getValue());
}
if (j != 0 || j2 != -1) {
String str = "bytes=" + j + "-";
if (j2 != -1) {
str = str + ((j + j2) - 1);
}
httpURLConnection.setRequestProperty(Command.HTTP_HEADER_RANGE, str);
}
httpURLConnection.setRequestProperty("User-Agent", this.d);
if (!z) {
httpURLConnection.setRequestProperty("Accept-Encoding", HTTP.IDENTITY_CODING);
}
httpURLConnection.setInstanceFollowRedirects(z2);
httpURLConnection.setDoOutput(bArr != null);
if (bArr != null) {
httpURLConnection.setRequestMethod("POST");
if (bArr.length == 0) {
httpURLConnection.connect();
} else {
httpURLConnection.setFixedLengthStreamingMode(bArr.length);
httpURLConnection.connect();
OutputStream outputStream = httpURLConnection.getOutputStream();
outputStream.write(bArr);
outputStream.close();
}
} else {
httpURLConnection.connect();
}
return httpURLConnection;
}
public static void a(HttpURLConnection httpURLConnection, long j) {
int i = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a;
if (i == 19 || i == 20) {
try {
InputStream inputStream = httpURLConnection.getInputStream();
if (j == -1) {
if (inputStream.read() == -1) {
return;
}
} else if (j <= PlaybackStateCompat.ACTION_PLAY_FROM_SEARCH) {
return;
}
String name = inputStream.getClass().getName();
if (name.equals("com.android.okhttp.internal.http.HttpTransport$ChunkedInputStream") || name.equals("com.android.okhttp.internal.http.HttpTransport$FixedLengthInputStream")) {
Method declaredMethod = inputStream.getClass().getSuperclass().getDeclaredMethod("unexpectedEndOfInput", new Class[0]);
declaredMethod.setAccessible(true);
declaredMethod.invoke(inputStream, new Object[0]);
}
} catch (Exception unused) {
}
}
}
}

View File

@@ -0,0 +1,15 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
/* loaded from: classes2.dex */
public final class o extends r {
public final String b;
public final y<? super f> c;
public final int d = 2000;
public final int e = 2000;
public final boolean f = true;
public o(String str, k kVar) {
this.b = str;
this.c = kVar;
}
}

View File

@@ -0,0 +1,119 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import android.os.SystemClock;
import java.io.EOFException;
import java.io.IOException;
import java.io.RandomAccessFile;
/* loaded from: classes2.dex */
public final class p implements f {
public final y<? super p> a;
public RandomAccessFile b;
public Uri c;
public long d;
public boolean e;
public static class a extends IOException {
public a(IOException iOException) {
super(iOException);
}
}
public p(y<? super p> yVar) {
this.a = yVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(i iVar) throws a {
try {
this.c = iVar.a;
RandomAccessFile randomAccessFile = new RandomAccessFile(iVar.a.getPath(), "r");
this.b = randomAccessFile;
randomAccessFile.seek(iVar.d);
long j = iVar.e;
if (j == -1) {
j = this.b.length() - iVar.d;
}
this.d = j;
if (j < 0) {
throw new EOFException();
}
this.e = true;
y<? super p> yVar = this.a;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
try {
if (kVar.b == 0) {
kVar.c = SystemClock.elapsedRealtime();
}
kVar.b++;
} catch (Throwable th) {
throw th;
}
}
}
return this.d;
} catch (IOException e) {
throw new a(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws a {
this.c = null;
try {
try {
RandomAccessFile randomAccessFile = this.b;
if (randomAccessFile != null) {
randomAccessFile.close();
}
} catch (IOException e) {
throw new a(e);
}
} finally {
this.b = null;
if (this.e) {
this.e = false;
y<? super p> yVar = this.a;
if (yVar != null) {
((k) yVar).a();
}
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws a {
if (i2 == 0) {
return 0;
}
long j = this.d;
if (j == 0) {
return -1;
}
try {
int read = this.b.read(bArr, i, (int) Math.min(j, i2));
if (read > 0) {
long j2 = read;
this.d -= j2;
y<? super p> yVar = this.a;
if (yVar != null) {
k kVar = (k) yVar;
synchronized (kVar) {
kVar.d += j2;
}
}
}
return read;
} catch (IOException e) {
throw new a(e);
}
}
}

View File

@@ -0,0 +1,14 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
/* loaded from: classes2.dex */
public final class q implements f.a {
public q(int i) {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f.a
public final f a() {
return new p(null);
}
}

View File

@@ -0,0 +1,14 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
/* loaded from: classes2.dex */
public abstract class r implements f.a {
public final u a = new u();
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f.a
public final f a() {
o oVar = (o) this;
return new n(oVar.b, oVar.c, oVar.d, oVar.e, oVar.f, this.a);
}
}

View File

@@ -0,0 +1,18 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import java.io.IOException;
/* loaded from: classes2.dex */
public class s extends IOException {
public s(String str) {
super(str);
}
public s(IOException iOException) {
super(iOException);
}
public s(String str, IOException iOException) {
super(str, iOException);
}
}

View File

@@ -0,0 +1,11 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
/* loaded from: classes2.dex */
public final class t extends s {
public final int a;
public t(int i) {
super(com.fyber.inneractive.sdk.player.exoplayer2.i.a("Response code: ", i));
this.a = i;
}
}

View File

@@ -0,0 +1,22 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes2.dex */
public final class u {
public final HashMap a = new HashMap();
public Map<String, String> b;
public final synchronized Map<String, String> a() {
try {
if (this.b == null) {
this.b = Collections.unmodifiableMap(new HashMap(this.a));
}
} catch (Throwable th) {
throw th;
}
return this.b;
}
}

View File

@@ -0,0 +1,193 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.annotation.SuppressLint;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
import java.io.IOException;
import java.util.concurrent.ExecutorService;
/* loaded from: classes2.dex */
public final class v {
public final ExecutorService a;
public b<? extends c> b;
public IOException c;
public interface a<T extends c> {
int a(T t, long j, long j2, IOException iOException);
void a(T t, long j, long j2);
void a(T t, long j, long j2, boolean z);
}
@SuppressLint({"HandlerLeak"})
public final class b<T extends c> extends Handler implements Runnable {
public final T a;
public final a<T> b;
public final int c;
public final long d;
public IOException e;
public int f;
public volatile Thread g;
public volatile boolean h;
@Override // java.lang.Runnable
public final void run() {
try {
this.g = Thread.currentThread();
if (!this.a.a()) {
com.fyber.inneractive.sdk.player.exoplayer2.util.q.a("load:".concat(this.a.getClass().getSimpleName()));
try {
this.a.load();
com.fyber.inneractive.sdk.player.exoplayer2.util.q.a();
} catch (Throwable th) {
com.fyber.inneractive.sdk.player.exoplayer2.util.q.a();
throw th;
}
}
if (this.h) {
return;
}
sendEmptyMessage(2);
} catch (IOException e) {
if (this.h) {
return;
}
obtainMessage(3, e).sendToTarget();
} catch (Error e2) {
Log.e("LoadTask", "Unexpected error loading stream", e2);
if (!this.h) {
obtainMessage(4, e2).sendToTarget();
}
throw e2;
} catch (InterruptedException unused) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.a.a());
if (this.h) {
return;
}
sendEmptyMessage(2);
} catch (Exception e3) {
Log.e("LoadTask", "Unexpected exception loading stream", e3);
if (this.h) {
return;
}
obtainMessage(3, new d(e3)).sendToTarget();
} catch (OutOfMemoryError e4) {
Log.e("LoadTask", "OutOfMemory error loading stream", e4);
if (this.h) {
return;
}
obtainMessage(3, new d(e4)).sendToTarget();
}
}
public b(Looper looper, T t, a<T> aVar, int i, long j) {
super(looper);
this.a = t;
this.b = aVar;
this.c = i;
this.d = j;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.os.Handler
public final void handleMessage(Message message) {
if (this.h) {
return;
}
int i = message.what;
if (i == 0) {
this.e = null;
v vVar = v.this;
vVar.a.execute(vVar.b);
return;
}
if (i != 4) {
v.this.b = null;
long elapsedRealtime = SystemClock.elapsedRealtime();
long j = elapsedRealtime - this.d;
if (this.a.a()) {
this.b.a((a<T>) this.a, elapsedRealtime, j, false);
return;
}
int i2 = message.what;
if (i2 == 1) {
this.b.a((a<T>) this.a, elapsedRealtime, j, false);
return;
}
if (i2 == 2) {
this.b.a(this.a, elapsedRealtime, j);
return;
}
if (i2 != 3) {
return;
}
IOException iOException = (IOException) message.obj;
this.e = iOException;
int a = this.b.a((a<T>) this.a, elapsedRealtime, j, iOException);
if (a == 3) {
v.this.c = this.e;
return;
}
if (a != 2) {
int i3 = a == 1 ? 1 : this.f + 1;
this.f = i3;
long min = Math.min((i3 - 1) * 1000, 5000);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(v.this.b == null);
v vVar2 = v.this;
vVar2.b = this;
if (min > 0) {
sendEmptyMessageDelayed(0, min);
return;
} else {
this.e = null;
vVar2.a.execute(this);
return;
}
}
return;
}
throw ((Error) message.obj);
}
}
public interface c {
boolean a();
void b();
void load() throws IOException, InterruptedException;
}
public static final class d extends IOException {
public d(Throwable th) {
super("Unexpected " + th.getClass().getSimpleName() + ": " + th.getMessage(), th);
}
}
public v(String str) {
this.a = com.fyber.inneractive.sdk.player.exoplayer2.util.s.c(str);
}
public final boolean a() {
return this.b != null;
}
public final void b() throws IOException {
IOException iOException = this.c;
if (iOException != null) {
throw iOException;
}
b<? extends c> bVar = this.b;
if (bVar != null) {
int i = bVar.c;
IOException iOException2 = bVar.e;
if (iOException2 != null && bVar.f > i) {
throw iOException2;
}
}
}
}

View File

@@ -0,0 +1,52 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class w<T> implements v.c {
public final i a;
public final f b;
public final a<? extends T> c;
public volatile com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c d;
public volatile boolean e;
public volatile long f;
public interface a<T> {
}
public w(f fVar, Uri uri, com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d dVar) {
this.b = fVar;
this.a = new i(uri);
this.c = dVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
public final boolean a() {
return this.e;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
public final void b() {
this.e = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
public final void load() throws IOException, InterruptedException {
h hVar = new h(this.b, this.a);
try {
if (!hVar.d) {
hVar.a.a(hVar.b);
hVar.d = true;
}
this.d = ((com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d) this.c).a(this.b.a(), hVar);
this.f = hVar.f;
com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(hVar);
} catch (Throwable th) {
this.f = hVar.f;
com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(hVar);
throw th;
}
}
}

View File

@@ -0,0 +1,48 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
import android.net.Uri;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class x implements f {
public final f a;
public final e b;
public x(f fVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.cache.b bVar) {
this.a = (f) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(fVar);
this.b = (e) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(bVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(i iVar) throws IOException {
long a = this.a.a(iVar);
if (iVar.e == -1 && a != -1) {
iVar = new i(iVar.a, iVar.c, iVar.d, a, iVar.f, iVar.g, 0);
}
this.b.a(iVar);
return a;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws IOException {
try {
this.a.close();
} finally {
this.b.close();
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws IOException {
int read = this.a.read(bArr, i, i2);
if (read > 0) {
this.b.write(bArr, i, read);
}
return read;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
return this.a.a();
}
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.upstream;
/* loaded from: classes2.dex */
public interface y<S> {
}