Sketch SG v3.0版本的 MD5 值为:c9b07a41a370e7ad2443807e6792f6ec
以下内容为反编译后的 ak.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Build;
import android.text.AndroidCharacter;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewConfiguration;
import androidx.vectordrawable.graphics.drawable.PathInterpolatorCompat;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerProperties;
import com.facebook.internal.ServerProtocol;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import javax.net.ssl.HttpsURLConnection;
import org.json.JSONException;
public abstract class ak implements Runnable {
protected static String AFInAppEventParameterName = null;
private static int AFLogger$LogLevel = 0;
private static int AFVersionDeclaration = 0;
private static int onAppOpenAttributionNative = 1;
private static short[] onAttributionFailureNative;
private static int onDeepLinkingNative;
private static int onInstallConversionDataLoadedNative;
private static byte[] onInstallConversionFailureNative;
private static String valueOf;
public final String AFInAppEventType;
public String AFKeystoreWrapper;
public final String AppsFlyer2dXConversionCallback = UUID.randomUUID().toString();
public final Map<String, Object> getLevel = valueOf();
private final Context init;
private final ae values;
static void values() {
AFLogger$LogLevel = 91;
AFVersionDeclaration = -784549513;
onDeepLinkingNative = -1400650653;
onInstallConversionFailureNative = new byte[]{-79, -13, -3, 1, 19, -13, 7, -2, 22, 38, -57, 37};
}
protected abstract String AFInAppEventParameterName();
protected abstract void AFInAppEventParameterName(HttpsURLConnection httpsURLConnection) throws JSONException, IOException;
protected abstract void AFInAppEventType();
protected abstract void AFKeystoreWrapper(String str);
static {
values();
valueOf = "v2";
StringBuilder sb = new StringBuilder("https://%sonelink.%s/shortlink-sdk/");
sb.append(valueOf);
AFInAppEventParameterName = sb.toString();
int i = onInstallConversionDataLoadedNative + 43;
onAppOpenAttributionNative = i % 128;
if (i % 2 != 0) {
return;
}
int i2 = 74 / 0;
}
public ak(ae aeVar, Context context, String str) {
this.values = aeVar;
this.init = context;
this.AFInAppEventType = str;
}
public final void values(HttpsURLConnection httpsURLConnection, String... strArr) {
ArrayList arrayList = new ArrayList(Arrays.asList(strArr));
arrayList.add(1, valueOf);
String join = TextUtils.join("\u2063", arrayList.toArray());
StringBuilder sb = new StringBuilder();
sb.append(AppsFlyerProperties.getInstance().getString(AppsFlyerProperties.AF_KEY));
sb.append(this.AppsFlyer2dXConversionCallback);
sb.append(valueOf);
httpsURLConnection.setRequestProperty(valueOf((byte) (ViewConfiguration.getPressedStateDuration() >> 16), 1400650718 - (ViewConfiguration.getWindowTouchSlop() >> 8), (short) View.getDefaultSize(0, 0), Color.rgb(0, 0, 0) + 801326729, (-88) - AndroidCharacter.getEastAsianWidth('0')).intern(), af.values(join, sb.toString()));
int i = onAppOpenAttributionNative + 33;
onInstallConversionDataLoadedNative = i % 128;
int i2 = i % 2;
}
private Map<String, Object> valueOf() {
HashMap hashMap = new HashMap();
hashMap.put("build_number", "6.3.2");
hashMap.put("counter", Integer.valueOf(ae.valueOf(ae.values(this.init), "appsFlyerCount", false)));
hashMap.put("model", Build.MODEL);
hashMap.put("brand", Build.BRAND);
hashMap.put(ServerProtocol.DIALOG_PARAM_SDK_VERSION, Integer.toString(Build.VERSION.SDK_INT));
try {
hashMap.put("app_version_name", this.init.getPackageManager().getPackageInfo(this.init.getPackageName(), 0).versionName);
int i = onAppOpenAttributionNative + 101;
onInstallConversionDataLoadedNative = i % 128;
int i2 = i % 2;
} catch (PackageManager.NameNotFoundException unused) {
}
hashMap.put("app_id", this.init.getPackageName());
hashMap.put("platformextension", new al().AFInAppEventParameterName());
return hashMap;
}
@Override
public void run() {
String str;
Throwable th;
int responseCode;
String str2 = "";
String AFInAppEventParameterName2 = AFInAppEventParameterName();
AFLogger.AFInAppEventParameterName("oneLinkUrl: ".concat(String.valueOf(AFInAppEventParameterName2)));
try {
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) new URL(AFInAppEventParameterName2).openConnection();
httpsURLConnection.setRequestProperty("content-type", "application/json");
httpsURLConnection.setReadTimeout(PathInterpolatorCompat.MAX_NUM_POINTS);
httpsURLConnection.setConnectTimeout(PathInterpolatorCompat.MAX_NUM_POINTS);
httpsURLConnection.setRequestMethod(this.AFInAppEventType);
AFInAppEventParameterName(httpsURLConnection);
responseCode = httpsURLConnection.getResponseCode();
str = ae.AFKeystoreWrapper(httpsURLConnection);
} catch (Throwable th2) {
str = "";
th = th2;
}
try {
if (!(responseCode == 200)) {
StringBuilder sb = new StringBuilder("Response code = ");
sb.append(responseCode);
sb.append(" content = ");
sb.append(str);
str2 = sb.toString();
} else {
int i = onInstallConversionDataLoadedNative + 107;
onAppOpenAttributionNative = i % 128;
int i2 = i % 2;
AFLogger.AFKeystoreWrapper("Status 200 ok");
}
} catch (Throwable th3) {
th = th3;
AFLogger.AFInAppEventType("Error while calling ".concat(String.valueOf(AFInAppEventParameterName2)), th);
StringBuilder sb2 = new StringBuilder("Error while calling ");
sb2.append(AFInAppEventParameterName2);
sb2.append(" stacktrace: ");
sb2.append(th.toString());
str2 = sb2.toString();
if (!(TextUtils.isEmpty(str2))) {
}
}
if (!(TextUtils.isEmpty(str2))) {
AFLogger.AFKeystoreWrapper("Connection call succeeded: ".concat(String.valueOf(str)));
AFKeystoreWrapper(str);
return;
}
AFLogger.init("Connection error: ".concat(String.valueOf(str2)));
AFInAppEventType();
int i3 = onInstallConversionDataLoadedNative + 115;
onAppOpenAttributionNative = i3 % 128;
int i4 = i3 % 2;
}
private static String valueOf(byte b, int i, short s, int i2, int i3) {
int i4;
int i5;
StringBuilder sb = new StringBuilder();
int i6 = AFLogger$LogLevel;
int i7 = i3 + i6;
boolean z = (i7 == -1 ? (char) 17 : ';') == 17;
if (z) {
byte[] bArr = onInstallConversionFailureNative;
if (bArr != null) {
i7 = (byte) (bArr[AFVersionDeclaration + i2] + i6);
} else {
i7 = (short) (onAttributionFailureNative[AFVersionDeclaration + i2] + i6);
}
}
if (i7 > 0) {
int i8 = ((i2 + i7) - 2) + AFVersionDeclaration + (z ? 1 : 0);
char c = (char) (i + onDeepLinkingNative);
sb.append(c);
for (int i9 = 1; i9 < i7; i9++) {
int i10 = onAppOpenAttributionNative;
int i11 = i10 + 45;
onInstallConversionDataLoadedNative = i11 % 128;
int i12 = i11 % 2;
byte[] bArr2 = onInstallConversionFailureNative;
if ((bArr2 != null ? (char) 19 : '.') != 19) {
c = (char) (c + (((short) (onAttributionFailureNative[i8] + s)) ^ b));
int i13 = i10 + 11;
onInstallConversionDataLoadedNative = i13 % 128;
int i14 = i13 % 2;
i8--;
} else {
int i15 = i10 + 17;
onInstallConversionDataLoadedNative = i15 % 128;
if (i15 % 2 != 0) {
i4 = i8 + 119;
i5 = c >> (((byte) (bArr2[i8] >>> s)) | b);
} else {
i4 = i8 - 1;
i5 = c + (((byte) (bArr2[i8] + s)) ^ b);
}
c = (char) i5;
i8 = i4;
}
sb.append(c);
}
}
String obj = sb.toString();
int i16 = onAppOpenAttributionNative + 25;
onInstallConversionDataLoadedNative = i16 % 128;
int i17 = i16 % 2;
return obj;
}
}