Driving Zone: Germany v1.22.4版本的 MD5 值为:2b6e2d8e8733a3104dcc306c5770286c
以下内容为反编译后的 AFa1eSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.content.Context;
import com.adjust.sdk.Constants;
import com.applovin.sdk.AppLovinEventParameters;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.attribution.AppsFlyerRequestListener;
import com.appsflyer.attribution.RequestError;
import com.appsflyer.internal.AFc1mSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.unity3d.ads.metadata.InAppPurchaseMetaData;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public final class AFa1eSDK implements Runnable {
private static String AFKeystoreWrapper = "https://%ssdk-services.%s/validate-android-signature";
private static String valueOf;
private String AFInAppEventParameterName;
private String AFInAppEventType;
private Map<String, String> AFLogger;
private String afDebugLog;
private String afErrorLog;
private String afInfoLog;
private String afRDLog;
private WeakReference<Context> values;
static {
StringBuilder sb = new StringBuilder("https://%svalidate.%s/api/v");
sb.append(AFb1xSDK.values);
sb.append("/androidevent?buildnumber=6.9.2&app_id=");
valueOf = sb.toString();
}
public AFa1eSDK(Context context, String str, String str2, String str3, String str4, String str5, String str6, Map<String, String> map) {
this.values = new WeakReference<>(context);
this.AFInAppEventType = str;
this.AFInAppEventParameterName = str2;
this.afErrorLog = str4;
this.afRDLog = str5;
this.afInfoLog = str6;
this.AFLogger = map;
this.afDebugLog = str3;
}
@Override
public final void run() {
String str = this.AFInAppEventType;
if (str == null || str.length() == 0 || AppsFlyerLib.getInstance().isStopped()) {
return;
}
try {
Context context = this.values.get();
if (context == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("public-key", this.AFInAppEventParameterName);
hashMap.put("sig-data", this.afErrorLog);
hashMap.put(InAppPurchaseMetaData.KEY_SIGNATURE, this.afDebugLog);
Object hashMap2 = new HashMap(hashMap);
Object obj = this.AFLogger;
StringBuilder sb = new StringBuilder();
sb.append(String.format(valueOf, AppsFlyerLib.getInstance().getHostPrefix(), AFb1xSDK.AFKeystoreWrapper().getHostName()));
sb.append(context.getPackageName());
String obj2 = sb.toString();
String string = AFb1xSDK.valueOf(context).getString(Constants.REFERRER, "");
AFa1tSDK aFe1nSDK = new AFe1nSDK(context);
aFe1nSDK.afRDLog = string;
AFa1tSDK aFa1tSDK = (AFe1nSDK) aFe1nSDK;
AFb1xSDK AFKeystoreWrapper2 = AFb1xSDK.AFKeystoreWrapper();
Map<String, Object> values = AFKeystoreWrapper2.values(aFa1tSDK);
values.put("price", this.afRDLog);
values.put("currency", this.afInfoLog);
values.put(AppLovinEventParameters.IN_APP_PURCHASE_DATA, hashMap2);
if (obj != null) {
values.put("extra_prms", obj);
}
values.putAll(AFKeystoreWrapper2.values().AFVersionDeclaration().AFInAppEventType());
AFInAppEventType(context, (AFe1nSDK) aFa1tSDK.AFInAppEventType((Map<String, ?>) values).AFKeystoreWrapper(obj2));
hashMap.put("dev_key", this.AFInAppEventType);
hashMap.put("app_id", context.getPackageName());
hashMap.put("uid", AppsFlyerLib.getInstance().getAppsFlyerUID(context));
String string2 = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string2 != null) {
hashMap.put("advertiserId", string2);
}
AFe1rSDK aFe1rSDK = (AFe1rSDK) new AFe1rSDK().AFInAppEventType(hashMap).AFKeystoreWrapper(String.format(AFKeystoreWrapper, AppsFlyerLib.getInstance().getHostPrefix(), AFb1xSDK.AFKeystoreWrapper().getHostName()));
final AFd1uSDK AFInAppEventType = AFInAppEventType(context, aFe1rSDK);
aFe1rSDK.AFInAppEventType = new AppsFlyerRequestListener() {
@Override
public final void onSuccess() {
try {
JSONObject jSONObject = new JSONObject((String) AFInAppEventType.afDebugLog.getBody());
AFLogger.afInfoLog("Validate response ok: ".concat(String.valueOf(jSONObject)));
AFa1eSDK.values(jSONObject.optBoolean(IronSourceConstants.EVENTS_RESULT), AFa1eSDK.this.afErrorLog, AFa1eSDK.this.afRDLog, AFa1eSDK.this.afInfoLog, jSONObject.toString());
} catch (Exception e) {
AFLogger.afErrorLog("Failed Validate request: ".concat(String.valueOf(e)), e);
AFa1eSDK.values(false, AFa1eSDK.this.afErrorLog, AFa1eSDK.this.afRDLog, AFa1eSDK.this.afInfoLog, e.getMessage());
}
}
@Override
public final void onError(int i, String str2) {
ResponseNetwork responseNetwork;
if (i == RequestError.RESPONSE_CODE_FAILURE && (responseNetwork = AFInAppEventType.afDebugLog) != null) {
str2 = responseNetwork.toString();
}
AFa1eSDK.values(false, AFa1eSDK.this.afErrorLog, AFa1eSDK.this.afRDLog, AFa1eSDK.this.afInfoLog, str2);
}
};
} catch (Throwable th) {
if (AFb1xSDK.valueOf != null) {
AFLogger.afErrorLog("Failed Validate request + ex", th);
values(false, this.afErrorLog, this.afRDLog, this.afInfoLog, th.getMessage());
}
AFLogger.afErrorLog(th.getMessage(), th);
}
}
private static AFd1uSDK AFInAppEventType(Context context, AFe1qSDK aFe1qSDK) {
AFb1xSDK.AFKeystoreWrapper().AFKeystoreWrapper(context);
AFc1zSDK values = AFb1xSDK.AFKeystoreWrapper().values();
aFe1qSDK.AFInAppEventType(values.AFInAppEventParameterName().values.valueOf("appsFlyerCount"));
AFd1uSDK aFd1uSDK = new AFd1uSDK(aFe1qSDK, values);
AFc1mSDK afErrorLog = values.afErrorLog();
afErrorLog.AFInAppEventParameterName.execute(new AFc1mSDK.AnonymousClass3(aFd1uSDK));
return aFd1uSDK;
}
public static void values(boolean z, String str, String str2, String str3, String str4) {
if (AFb1xSDK.valueOf != null) {
StringBuilder sb = new StringBuilder("Validate callback parameters: ");
sb.append(str);
sb.append(" ");
sb.append(str2);
sb.append(" ");
sb.append(str3);
AFLogger.afDebugLog(sb.toString());
if (z) {
AFLogger.afDebugLog("Validate in app purchase success: ".concat(String.valueOf(str4)));
AFb1xSDK.valueOf.onValidateInApp();
return;
}
AFLogger.afDebugLog("Validate in app purchase failed: ".concat(String.valueOf(str4)));
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFb1xSDK.valueOf;
if (str4 == null) {
str4 = "Failed validating";
}
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure(str4);
}
}
}