Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 AFc1tSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.internal.AFc1uSDK;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.inappstory.sdk.network.NetworkHandler;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import p029do.c0;
@Metadata(d1 = {"\u0000H\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0012\n\u0002\b\u0006\n\u0002\u0010$\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\b\b\b\u0000\u0018\u00002\u00020\u0001:\u0001'B/\u0012\u0006\u0010\u0013\u001a\u00020\u0012\u0012\u0014\u0010\u001a\u001a\u0010\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u000e\u0018\u00010\u0019\u0012\b\b\u0002\u0010!\u001a\u00020 ¢\u0006\u0004\b%\u0010&J\b\u0010\u0003\u001a\u00020\u0002H\u0007J\"\u0010\u000b\u001a\u00020\n2\b\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\t\u001a\u00020\bH\u0002J\u0010\u0010\r\u001a\u00020\n2\u0006\u0010\f\u001a\u00020\u0004H\u0002J \u0010\u0010\u001a\u00020\n2\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\t\u001a\u00020\bH\u0002J\u0010\u0010\u0011\u001a\u00020\u000e2\u0006\u0010\u0005\u001a\u00020\u0004H\u0002R\"\u0010\u0013\u001a\u00020\u00128\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0013\u0010\u0014\u001a\u0004\b\u0015\u0010\u0016\"\u0004\b\u0017\u0010\u0018R0\u0010\u001a\u001a\u0010\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\u000e\u0018\u00010\u00198\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001a\u0010\u001b\u001a\u0004\b\u001c\u0010\u001d\"\u0004\b\u001e\u0010\u001fR\u0017\u0010!\u001a\u00020 8\u0006¢\u0006\f\n\u0004\b!\u0010\"\u001a\u0004\b#\u0010$¨\u0006("}, d2 = {"Lcom/appsflyer/internal/components/exmanager/SendExceptionsRequest;", "", "", "executeRequest", "Ljava/net/HttpURLConnection;", "connection", "", "exception", "", "httpLatency", "Lco/g0;", "logError", "request", "logRequestStart", "", "response", "logResponse", "readServerResponse", "", "body", "[B", "getBody", "()[B", "setBody", "([B)V", "", "headers", "Ljava/util/Map;", "getHeaders", "()Ljava/util/Map;", "setHeaders", "(Ljava/util/Map;)V", "", "timeout", "I", "getTimeout", "()I", "<init>", "([BLjava/util/Map;I)V", "Companion", "SDK_prodRelease"}, k = 1, mv = {1, 6, 0})
public final class AFc1tSDK {
@NotNull
private static String valueOf;
@NotNull
private byte[] AFInAppEventParameterName;
private Map<String, String> AFKeystoreWrapper;
private final int values;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R$\u0010\u0003\u001a\u00020\u00048\u0006@\u0006X\u0087\u000e¢\u0006\u0014\n\u0000\u0012\u0004\b\u0005\u0010\u0002\u001a\u0004\b\u0006\u0010\u0007\"\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/appsflyer/internal/components/exmanager/SendExceptionsRequest$Companion;", "", "()V", "EX_MANAGER_URL", "", "getEX_MANAGER_URL$annotations", "getEX_MANAGER_URL", "()Ljava/lang/String;", "setEX_MANAGER_URL", "(Ljava/lang/String;)V", "SDK_prodRelease"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class AFa1wSDK {
private AFa1wSDK() {
}
public AFa1wSDK(byte b15) {
this();
}
}
static {
new AFa1wSDK((byte) 0);
valueOf = "https://%smonitorsdk.%s/remote-debug/exception-manager";
}
public AFc1tSDK(@NotNull byte[] bArr, Map<String, String> map, int i15) {
this.AFInAppEventParameterName = bArr;
this.AFKeystoreWrapper = map;
this.values = i15;
}
public final boolean AFInAppEventParameterName() {
int i15;
URLConnection uRLConnection;
BufferedOutputStream bufferedOutputStream;
InputStream errorStream;
String str;
long currentTimeMillis = System.currentTimeMillis();
boolean z15 = false;
HttpURLConnection httpURLConnection = null;
try {
uRLConnection = (URLConnection) FirebasePerfUrlConnection.instrument(new URL(String.format(valueOf, AppsFlyerLib.getInstance().getHostPrefix(), AFa1eSDK.valueOf().getHostName())).openConnection());
} catch (Throwable th4) {
th = th4;
}
if (uRLConnection != null) {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) uRLConnection;
try {
httpURLConnection2.setRequestMethod(NetworkHandler.POST);
StringBuilder sb5 = new StringBuilder();
sb5.append(httpURLConnection2.getRequestMethod());
sb5.append(':');
sb5.append(httpURLConnection2.getURL());
StringBuilder sb6 = new StringBuilder(sb5.toString());
sb6.append("\n length: ");
sb6.append(new String(this.AFInAppEventParameterName, kotlin.text.b.UTF_8).length());
Map<String, String> map = this.AFKeystoreWrapper;
if (map != null) {
for (Map.Entry<String, String> entry : map.entrySet()) {
sb6.append("\n ");
sb6.append(entry.getKey());
sb6.append(": ");
sb6.append(entry.getValue());
}
}
StringBuilder sb7 = new StringBuilder("HTTP: [");
sb7.append(httpURLConnection2.hashCode());
sb7.append("] ");
sb7.append((Object) sb6);
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(sb7.toString())));
httpURLConnection2.setInstanceFollowRedirects(false);
httpURLConnection2.setUseCaches(false);
httpURLConnection2.setReadTimeout(this.values);
httpURLConnection2.setConnectTimeout(this.values);
httpURLConnection2.addRequestProperty("Content-Type", "application/json");
Map<String, String> map2 = this.AFKeystoreWrapper;
if (map2 != null) {
for (Map.Entry<String, String> entry2 : map2.entrySet()) {
httpURLConnection2.addRequestProperty(entry2.getKey(), entry2.getValue());
}
}
httpURLConnection2.setDoOutput(true);
httpURLConnection2.setRequestProperty("Content-Length", String.valueOf(this.AFInAppEventParameterName.length));
try {
OutputStream outputStream = httpURLConnection2.getOutputStream();
if (outputStream instanceof BufferedOutputStream) {
bufferedOutputStream = (BufferedOutputStream) outputStream;
} else {
bufferedOutputStream = new BufferedOutputStream(outputStream, 8192);
}
bufferedOutputStream.write(this.AFInAppEventParameterName);
bufferedOutputStream.close();
if (AFc1uSDK.AFa1wSDK.values(httpURLConnection2)) {
errorStream = httpURLConnection2.getInputStream();
} else {
errorStream = httpURLConnection2.getErrorStream();
}
if (errorStream != null) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(errorStream, kotlin.text.b.UTF_8), 8192);
str = c0.x0(no.m.e(bufferedReader), null, null, null, 0, null, null, 63, null);
bufferedReader.close();
}
str = "";
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
StringBuilder sb8 = new StringBuilder("response code:");
sb8.append(httpURLConnection2.getResponseCode());
sb8.append(' ');
sb8.append(httpURLConnection2.getResponseMessage());
sb8.append("\n\tbody:");
sb8.append(str);
sb8.append("\n\ttook ");
sb8.append(currentTimeMillis2);
sb8.append("ms");
String obj = sb8.toString();
StringBuilder sb9 = new StringBuilder("HTTP: [");
sb9.append(httpURLConnection2.hashCode());
sb9.append("] ");
sb9.append(obj);
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(sb9.toString())));
z15 = AFc1uSDK.AFa1wSDK.values(httpURLConnection2);
httpURLConnection2.disconnect();
} finally {
}
} catch (Throwable th5) {
th = th5;
httpURLConnection = httpURLConnection2;
try {
long currentTimeMillis3 = System.currentTimeMillis() - currentTimeMillis;
StringBuilder sb10 = new StringBuilder("error: ");
sb10.append(th);
sb10.append("\n\ttook ");
sb10.append(currentTimeMillis3);
sb10.append("ms\n\t");
sb10.append(th.getMessage());
String obj2 = sb10.toString();
StringBuilder sb11 = new StringBuilder("HTTP: [");
if (httpURLConnection != null) {
i15 = httpURLConnection.hashCode();
} else {
i15 = 0;
}
sb11.append(i15);
sb11.append("] ");
sb11.append(obj2);
AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(sb11.toString())));
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
return z15;
} finally {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
}
return z15;
}
throw new NullPointerException("null cannot be cast to non-null type java.net.HttpURLConnection");
}
}