- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
168 lines
6.6 KiB
Java
168 lines
6.6 KiB
Java
package com.fyber.inneractive.sdk.network;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import java.io.FileOutputStream;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class v<ResultData> {
|
|
public final Context a;
|
|
public final com.fyber.inneractive.sdk.cache.a<ResultData> b;
|
|
public SharedPreferences c;
|
|
|
|
public static class a extends Exception {
|
|
}
|
|
|
|
public v(Context context, com.fyber.inneractive.sdk.cache.a<ResultData> aVar) {
|
|
this.a = context;
|
|
this.b = aVar;
|
|
}
|
|
|
|
public final com.fyber.inneractive.sdk.cache.k<ResultData> a() {
|
|
try {
|
|
if (!this.b.c()) {
|
|
new a();
|
|
return new com.fyber.inneractive.sdk.cache.k<>();
|
|
}
|
|
ResultData a2 = this.b.a(a(this.b.b()));
|
|
if (this.c == null) {
|
|
this.c = this.a.getSharedPreferences("IAConfigurationPreferences", 0);
|
|
}
|
|
return new com.fyber.inneractive.sdk.cache.k<>(a2, this.c.getString(this.b.a(), null));
|
|
} catch (Exception unused) {
|
|
if (this.c == null) {
|
|
this.c = this.a.getSharedPreferences("IAConfigurationPreferences", 0);
|
|
}
|
|
this.c.edit().remove(this.b.a()).apply();
|
|
return new com.fyber.inneractive.sdk.cache.k<>();
|
|
}
|
|
}
|
|
|
|
public final boolean a(String str, String str2) {
|
|
boolean z;
|
|
IAlog.a("caching file %s", str);
|
|
boolean z2 = true;
|
|
FileOutputStream fileOutputStream = null;
|
|
try {
|
|
try {
|
|
fileOutputStream = this.a.openFileOutput(str, 0);
|
|
fileOutputStream.write(str2.getBytes());
|
|
} finally {
|
|
if (fileOutputStream != null) {
|
|
try {
|
|
fileOutputStream.close();
|
|
} catch (Exception e) {
|
|
IAlog.f("Failed closing cache file: %s", e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
} catch (Exception e2) {
|
|
e = e2;
|
|
z = false;
|
|
}
|
|
try {
|
|
IAlog.a("File cached successfully", new Object[0]);
|
|
try {
|
|
fileOutputStream.close();
|
|
} catch (Exception e3) {
|
|
IAlog.f("Failed closing cache file: %s", e3.getMessage());
|
|
}
|
|
} catch (Exception e4) {
|
|
e = e4;
|
|
z = true;
|
|
IAlog.f("Failed caching file: %s", e.getMessage());
|
|
z2 = z;
|
|
return z2;
|
|
}
|
|
return z2;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:33:0x0074 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.String a(java.lang.String r8) throws java.io.FileNotFoundException {
|
|
/*
|
|
r7 = this;
|
|
java.lang.String r0 = "Failed closing local file: %s"
|
|
java.lang.Object[] r1 = new java.lang.Object[]{r8}
|
|
java.lang.String r2 = "reading local file: %s"
|
|
com.fyber.inneractive.sdk.util.IAlog.a(r2, r1)
|
|
r1 = 0
|
|
android.content.Context r2 = r7.a // Catch: java.lang.Throwable -> L39 java.lang.Exception -> L3b
|
|
java.io.FileInputStream r2 = r2.openFileInput(r8) // Catch: java.lang.Throwable -> L39 java.lang.Exception -> L3b
|
|
int r3 = r2.available() // Catch: java.lang.Throwable -> L34 java.lang.Exception -> L37
|
|
byte[] r3 = new byte[r3] // Catch: java.lang.Throwable -> L34 java.lang.Exception -> L37
|
|
r2.read(r3) // Catch: java.lang.Throwable -> L34 java.lang.Exception -> L37
|
|
java.lang.String r4 = new java.lang.String // Catch: java.lang.Throwable -> L34 java.lang.Exception -> L37
|
|
java.lang.String r5 = "UTF-8"
|
|
r4.<init>(r3, r5) // Catch: java.lang.Throwable -> L34 java.lang.Exception -> L37
|
|
r2.close() // Catch: java.lang.Exception -> L26
|
|
goto L32
|
|
L26:
|
|
r1 = move-exception
|
|
java.lang.String r1 = r1.getMessage()
|
|
java.lang.Object[] r1 = new java.lang.Object[]{r1}
|
|
com.fyber.inneractive.sdk.util.IAlog.f(r0, r1)
|
|
L32:
|
|
r1 = r4
|
|
goto L62
|
|
L34:
|
|
r8 = move-exception
|
|
r1 = r2
|
|
goto L72
|
|
L37:
|
|
r3 = move-exception
|
|
goto L3d
|
|
L39:
|
|
r8 = move-exception
|
|
goto L72
|
|
L3b:
|
|
r3 = move-exception
|
|
r2 = r1
|
|
L3d:
|
|
boolean r4 = r3 instanceof java.io.FileNotFoundException // Catch: java.lang.Throwable -> L34
|
|
if (r4 != 0) goto L6c
|
|
java.lang.String r4 = "Failed reading local file: %s"
|
|
r5 = 1
|
|
java.lang.Object[] r5 = new java.lang.Object[r5] // Catch: java.lang.Throwable -> L34
|
|
java.lang.String r3 = r3.getMessage() // Catch: java.lang.Throwable -> L34
|
|
r6 = 0
|
|
r5[r6] = r3 // Catch: java.lang.Throwable -> L34
|
|
com.fyber.inneractive.sdk.util.IAlog.a(r4, r5) // Catch: java.lang.Throwable -> L34
|
|
if (r2 == 0) goto L62
|
|
r2.close() // Catch: java.lang.Exception -> L56
|
|
goto L62
|
|
L56:
|
|
r2 = move-exception
|
|
java.lang.String r2 = r2.getMessage()
|
|
java.lang.Object[] r2 = new java.lang.Object[]{r2}
|
|
com.fyber.inneractive.sdk.util.IAlog.f(r0, r2)
|
|
L62:
|
|
java.lang.Object[] r8 = new java.lang.Object[]{r8}
|
|
java.lang.String r0 = "local file %s read successfully"
|
|
com.fyber.inneractive.sdk.util.IAlog.a(r0, r8)
|
|
return r1
|
|
L6c:
|
|
java.io.FileNotFoundException r8 = new java.io.FileNotFoundException // Catch: java.lang.Throwable -> L34
|
|
r8.<init>() // Catch: java.lang.Throwable -> L34
|
|
throw r8 // Catch: java.lang.Throwable -> L34
|
|
L72:
|
|
if (r1 == 0) goto L84
|
|
r1.close() // Catch: java.lang.Exception -> L78
|
|
goto L84
|
|
L78:
|
|
r1 = move-exception
|
|
java.lang.String r1 = r1.getMessage()
|
|
java.lang.Object[] r1 = new java.lang.Object[]{r1}
|
|
com.fyber.inneractive.sdk.util.IAlog.f(r0, r1)
|
|
L84:
|
|
throw r8
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.network.v.a(java.lang.String):java.lang.String");
|
|
}
|
|
}
|