Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 AFa1dSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.content.Context;
import android.content.Intent;
import androidx.annotation.NonNull;
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.AFd1vSDK;
import com.appsflyer.internal.components.network.http.ResponseNetwork;
import com.newrelic.agent.android.instrumentation.JSONObjectInstrumentation;
import com.payu.threedsbase.constants.APIConstants;
import com.rudderstack.android.sdk.core.ecomm.ECommerceParamNames;
import com.xiaomi.mipush.sdk.Constants;
import in.juspay.hypersdk.core.PaymentConstants;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public final class AFa1dSDK implements Runnable {
private static String AFInAppEventType = null;
private static String values = "https://%ssdk-services.%s/validate-android-signature";
private final Intent AFInAppEventParameterName;
private WeakReference<Context> AFKeystoreWrapper;
private String AFLogger;
private String afDebugLog;
private String afErrorLog;
private String afInfoLog;
private String afRDLog;
private Map<String, String> afWarnLog;
private String valueOf;
static {
StringBuilder sb = new StringBuilder("https://%svalidate.%s/api/v");
sb.append(AFb1wSDK.AFInAppEventParameterName);
sb.append("/androidevent?buildnumber=6.10.1&app_id=");
AFInAppEventType = sb.toString();
}
public AFa1dSDK(Context context, String str, String str2, String str3, String str4, String str5, String str6, Map<String, String> map, Intent intent) {
this.AFKeystoreWrapper = new WeakReference<>(context);
this.valueOf = str;
this.afDebugLog = str2;
this.afRDLog = str4;
this.afErrorLog = str5;
this.afInfoLog = str6;
this.afWarnLog = map;
this.AFLogger = str3;
this.AFInAppEventParameterName = intent;
}
@Override
public final void run() {
String str = this.valueOf;
if (str == null || str.length() == 0 || AppsFlyerLib.getInstance().isStopped()) {
return;
}
try {
Context context = this.AFKeystoreWrapper.get();
if (context == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("public-key", this.afDebugLog);
hashMap.put("sig-data", this.afRDLog);
hashMap.put(PaymentConstants.SIGNATURE, this.AFLogger);
Object hashMap2 = new HashMap(hashMap);
Object obj = this.afWarnLog;
StringBuilder sb = new StringBuilder();
sb.append(String.format(AFInAppEventType, AppsFlyerLib.getInstance().getHostPrefix(), AFb1wSDK.AFKeystoreWrapper().getHostName()));
sb.append(context.getPackageName());
String obj2 = sb.toString();
String string = AFb1wSDK.valueOf(context).getString("referrer", "");
AFa1tSDK aFf1zSDK = new AFf1zSDK(context);
aFf1zSDK.AFLogger = string;
AFb1wSDK AFKeystoreWrapper = AFb1wSDK.AFKeystoreWrapper();
Map<String, Object> AFInAppEventType2 = AFKeystoreWrapper.AFInAppEventType(aFf1zSDK);
AFInAppEventType2.put(ECommerceParamNames.PRICE, this.afErrorLog);
AFInAppEventType2.put(ECommerceParamNames.CURRENCY, this.afInfoLog);
AFInAppEventType2.put("receipt_data", hashMap2);
if (obj != null) {
AFInAppEventType2.put("extra_prms", obj);
}
AFInAppEventType2.putAll(AFKeystoreWrapper.valueOf().afWarnLog().AFKeystoreWrapper());
values(context, (AFf1zSDK) aFf1zSDK.AFKeystoreWrapper(AFInAppEventType2).AFInAppEventParameterName(obj2));
hashMap.put("dev_key", this.valueOf);
hashMap.put(Constants.APP_ID, context.getPackageName());
hashMap.put("uid", AppsFlyerLib.getInstance().getAppsFlyerUID(context));
String string2 = AppsFlyerProperties.getInstance().getString("advertiserId");
if (string2 != null) {
hashMap.put("advertiserId", string2);
}
AFf1wSDK aFf1wSDK = (AFf1wSDK) new AFf1wSDK().AFKeystoreWrapper(hashMap).AFInAppEventParameterName(String.format(values, AppsFlyerLib.getInstance().getHostPrefix(), AFb1wSDK.AFKeystoreWrapper().getHostName()));
final AFd1hSDK values2 = values(context, aFf1wSDK);
aFf1wSDK.AFInAppEventType = new AppsFlyerRequestListener() {
@Override
public final void onError(int i, @NonNull String str2) {
ResponseNetwork responseNetwork;
if (i == RequestError.RESPONSE_CODE_FAILURE && (responseNetwork = ((AFd1nSDK) values2).afErrorLog) != null) {
str2 = responseNetwork.toString();
}
AFa1dSDK.values(false, AFa1dSDK.this.afRDLog, AFa1dSDK.this.afErrorLog, AFa1dSDK.this.afInfoLog, str2);
}
@Override
public final void onSuccess() {
try {
JSONObject jSONObject = new JSONObject((String) ((AFd1nSDK) values2).afErrorLog.getBody());
AFLogger.afInfoLog("Validate response ok: ".concat(String.valueOf(jSONObject)));
AFa1dSDK.values(jSONObject.optBoolean(APIConstants.PAYMENT_API_RESULT), AFa1dSDK.this.afRDLog, AFa1dSDK.this.afErrorLog, AFa1dSDK.this.afInfoLog, JSONObjectInstrumentation.toString(jSONObject));
} catch (Exception e) {
AFLogger.afErrorLog("Failed Validate request: ".concat(String.valueOf(e)), e);
AFa1dSDK.values(false, AFa1dSDK.this.afRDLog, AFa1dSDK.this.afErrorLog, AFa1dSDK.this.afInfoLog, e.getMessage());
}
}
};
} catch (Throwable th) {
if (AFb1wSDK.values != null) {
AFLogger.afErrorLog("Failed Validate request + ex", th);
values(false, this.afRDLog, this.afErrorLog, this.afInfoLog, th.getMessage());
}
AFLogger.afErrorLog(th.getMessage(), th);
}
}
private static AFd1hSDK values(Context context, @NonNull AFe1dSDK aFe1dSDK) {
AFb1wSDK.AFKeystoreWrapper().AFInAppEventType(context);
AFc1zSDK valueOf = AFb1wSDK.AFKeystoreWrapper().valueOf();
aFe1dSDK.AFKeystoreWrapper(valueOf.valueOf().AFInAppEventType.AFKeystoreWrapper("appsFlyerCount", 0));
AFd1hSDK aFd1hSDK = new AFd1hSDK(aFe1dSDK, valueOf);
AFd1vSDK AFLogger = valueOf.AFLogger();
AFLogger.values.execute(new AFd1vSDK.AnonymousClass2(aFd1hSDK));
return aFd1hSDK;
}
public static void values(boolean z, String str, String str2, String str3, String str4) {
if (AFb1wSDK.values != 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)));
AFb1wSDK.values.onValidateInApp();
return;
}
AFLogger.afDebugLog("Validate in app purchase failed: ".concat(String.valueOf(str4)));
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = AFb1wSDK.values;
if (str4 == null) {
str4 = "Failed validating";
}
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure(str4);
}
}
}