- 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
85 lines
2.9 KiB
Java
85 lines
2.9 KiB
Java
package com.fyber.inneractive.sdk.network;
|
|
|
|
import android.util.Base64;
|
|
import com.fyber.inneractive.sdk.flow.m;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.InputStream;
|
|
import java.nio.ByteBuffer;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class m0 extends f0<String> {
|
|
public final String p;
|
|
|
|
public m0(m.c cVar, String str) {
|
|
super(cVar, x.a().b(), null);
|
|
this.p = str;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r7v5, types: [T, java.lang.String] */
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final b0 a(j jVar, Map<String, List<String>> map, int i) throws Exception {
|
|
b0 b0Var = new b0();
|
|
try {
|
|
InputStream inputStream = jVar.c;
|
|
List<String> list = map != null ? map.get("Content-Type") : null;
|
|
String str = list != null ? list.get(0) : null;
|
|
ByteBuffer byteBuffer = (ByteBuffer) com.fyber.inneractive.sdk.util.g.b.a.poll();
|
|
if (byteBuffer == null) {
|
|
byteBuffer = ByteBuffer.allocateDirect(16384);
|
|
}
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
byte[] array = (byteBuffer == null || !byteBuffer.hasArray()) ? new byte[8192] : byteBuffer.array();
|
|
while (true) {
|
|
int read = inputStream.read(array, 0, array.length);
|
|
if (read == -1) {
|
|
break;
|
|
}
|
|
byteArrayOutputStream.write(array, 0, read);
|
|
}
|
|
byteArrayOutputStream.flush();
|
|
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
|
com.fyber.inneractive.sdk.util.t.b(byteArrayOutputStream);
|
|
com.fyber.inneractive.sdk.util.g.b.a.offer(byteBuffer);
|
|
String encodeToString = Base64.encodeToString(byteArray, 0);
|
|
Object[] objArr = new Object[2];
|
|
if (str == null) {
|
|
str = "image/png";
|
|
}
|
|
objArr[0] = str;
|
|
objArr[1] = encodeToString;
|
|
b0Var.a = String.format("data:%s;base64, %s", objArr);
|
|
} catch (Exception unused) {
|
|
IAlog.a("failed to fetch and encode the image.", new Object[0]);
|
|
}
|
|
return b0Var;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final p0 d() {
|
|
return p0.LOW;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final boolean g() {
|
|
return false;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final z getMethod() {
|
|
return z.GET;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final String getUrl() {
|
|
return this.p;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.network.c0
|
|
public final int s() {
|
|
return 0;
|
|
}
|
|
}
|