正在查看: Pesohere v1.0.5 应用的 AFa1fSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Pesohere v1.0.5 应用的 AFa1fSDK.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appsflyer.internal;
import android.content.Context;
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.AFc1gSDK.AnonymousClass1;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.wang.avi.BuildConfig;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public final class AFa1fSDK implements Runnable {
public static String AFKeystoreWrapper = null;
public static String values = "https://%ssdk-services.%s/validate-android-signature";
public WeakReference<Context> AFInAppEventParameterName;
public String AFInAppEventType;
public String AFLogger;
public String afDebugLog;
public String afErrorLog;
public String afInfoLog;
public Map<String, String> afRDLog;
public String valueOf;
static {
StringBuilder sb = new StringBuilder("https://%svalidate.%s/api/v");
sb.append(AFb1zSDK.values);
sb.append("/androidevent?buildnumber=6.9.4&app_id=");
AFKeystoreWrapper = sb.toString();
}
public AFa1fSDK(Context context, String str, String str2, String str3, String str4, String str5, String str6, Map<String, String> map) {
this.AFInAppEventParameterName = new WeakReference<>(context);
this.valueOf = str;
this.AFInAppEventType = str2;
this.afDebugLog = str4;
this.afInfoLog = str5;
this.afErrorLog = str6;
this.afRDLog = map;
this.AFLogger = str3;
}
public static void valueOf(boolean z, String str, String str2, String str3, String str4) {
if (AFb1zSDK.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)));
AFb1zSDK.valueOf.onValidateInApp();
return;
}
AFLogger.afDebugLog("Validate in app purchase failed: ".concat(String.valueOf(str4)));
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFb1zSDK.valueOf;
if (str4 == null) {
str4 = "Failed validating";
}
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure(str4);
}
}
@Override
public final void run() {
String str = this.valueOf;
if (str == null || str.length() == 0 || AppsFlyerLib.getInstance().isStopped()) {
return;
}
try {
Context context = this.AFInAppEventParameterName.get();
if (context == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("public-key", this.AFInAppEventType);
hashMap.put("sig-data", this.afDebugLog);
hashMap.put("signature", this.AFLogger);
Object hashMap2 = new HashMap(hashMap);
Object obj = this.afRDLog;
StringBuilder sb = new StringBuilder();
sb.append(String.format(AFKeystoreWrapper, AppsFlyerLib.getInstance().getHostPrefix(), AFb1zSDK.AFInAppEventType().getHostName()));
sb.append(context.getPackageName());
String obj2 = sb.toString();
String string = AFb1zSDK.AFKeystoreWrapper(context).getString("referrer", BuildConfig.FLAVOR);
AFa1qSDK aFe1kSDK = new AFe1kSDK(context);
aFe1kSDK.afRDLog = string;
AFb1zSDK AFInAppEventType = AFb1zSDK.AFInAppEventType();
Map<String, Object> AFInAppEventParameterName = AFInAppEventType.AFInAppEventParameterName(aFe1kSDK);
AFInAppEventParameterName.put("price", this.afInfoLog);
AFInAppEventParameterName.put("currency", this.afErrorLog);
AFInAppEventParameterName.put("receipt_data", hashMap2);
if (obj != null) {
AFInAppEventParameterName.put("extra_prms", obj);
}
AFInAppEventParameterName.putAll(AFInAppEventType.valueOf().AFLogger$LogLevel().AFKeystoreWrapper());
AFInAppEventType(context, (AFe1kSDK) aFe1kSDK.values(AFInAppEventParameterName).AFInAppEventType(obj2));
hashMap.put("dev_key", this.valueOf);
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);
}
AFe1oSDK aFe1oSDK = (AFe1oSDK) new AFe1oSDK().values(hashMap).AFInAppEventType(String.format(values, AppsFlyerLib.getInstance().getHostPrefix(), AFb1zSDK.AFInAppEventType().getHostName()));
final AFd1rSDK AFInAppEventType2 = AFInAppEventType(context, aFe1oSDK);
aFe1oSDK.values = new AppsFlyerRequestListener() {
@Override
public final void onError(int i2, String str2) {
ResponseNetwork responseNetwork;
if (i2 == RequestError.RESPONSE_CODE_FAILURE && (responseNetwork = ((AFd1vSDK) AFInAppEventType2).AFLogger) != null) {
str2 = responseNetwork.toString();
}
AFa1fSDK.valueOf(false, AFa1fSDK.this.afDebugLog, AFa1fSDK.this.afInfoLog, AFa1fSDK.this.afErrorLog, str2);
}
@Override
public final void onSuccess() {
try {
JSONObject jSONObject = new JSONObject((String) ((AFd1vSDK) AFInAppEventType2).AFLogger.getBody());
AFLogger.afInfoLog("Validate response ok: ".concat(String.valueOf(jSONObject)));
AFa1fSDK.valueOf(jSONObject.optBoolean("result"), AFa1fSDK.this.afDebugLog, AFa1fSDK.this.afInfoLog, AFa1fSDK.this.afErrorLog, jSONObject.toString());
} catch (Exception e2) {
AFLogger.afErrorLog("Failed Validate request: ".concat(String.valueOf(e2)), e2);
AFa1fSDK.valueOf(false, AFa1fSDK.this.afDebugLog, AFa1fSDK.this.afInfoLog, AFa1fSDK.this.afErrorLog, e2.getMessage());
}
}
};
} catch (Throwable th) {
if (AFb1zSDK.valueOf != null) {
AFLogger.afErrorLog("Failed Validate request + ex", th);
valueOf(false, this.afDebugLog, this.afInfoLog, this.afErrorLog, th.getMessage());
}
AFLogger.afErrorLog(th.getMessage(), th);
}
}
public static AFd1rSDK AFInAppEventType(Context context, AFe1mSDK aFe1mSDK) {
AFb1zSDK.AFInAppEventType().valueOf(context);
AFb1aSDK valueOf = AFb1zSDK.AFInAppEventType().valueOf();
aFe1mSDK.AFInAppEventParameterName(valueOf.values().valueOf.AFInAppEventType("appsFlyerCount"));
AFd1rSDK aFd1rSDK = new AFd1rSDK(aFe1mSDK, valueOf);
AFc1gSDK afDebugLog = valueOf.afDebugLog();
afDebugLog.valueOf.execute(afDebugLog.new AnonymousClass1(aFd1rSDK));
return aFd1rSDK;
}
}