Play House Simulation v3.0版本的 MD5 值为:4dbd745af43e6bcde3a0dca90b9e5934
以下内容为反编译后的 aa.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.content.Context;
import androidx.annotation.NonNull;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerInAppPurchaseValidatorListener;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.huawei.hms.ads.jsb.constant.Constant;
import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import com.huawei.hms.support.feature.result.CommonConstant;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.huawei.openalliance.ad.views.PPSLabelView;
import java.lang.ref.WeakReference;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public final class aa implements Runnable {
private static String AFInAppEventParameterName = null;
private static String AFInAppEventType = "https://%ssdk-services.%s/validate-android-signature";
private String AFKeystoreWrapper;
private String AFLogger$LogLevel;
private String AFVersionDeclaration;
private Map<String, String> AppsFlyer2dXConversionCallback;
private String getLevel;
private String init;
private WeakReference<Context> valueOf;
private String values;
static {
StringBuilder sb = new StringBuilder("https://%svalidate.%s/api/v");
sb.append(af.AFInAppEventParameterName);
sb.append("/androidevent?buildnumber=6.3.0&app_id=");
AFInAppEventParameterName = sb.toString();
}
public aa(Context context, String str, String str2, String str3, String str4, String str5, String str6, Map<String, String> map) {
this.valueOf = new WeakReference<>(context);
this.AFKeystoreWrapper = str;
this.values = str2;
this.AFVersionDeclaration = str4;
this.getLevel = str5;
this.init = str6;
this.AppsFlyer2dXConversionCallback = map;
this.AFLogger$LogLevel = str3;
}
private static HttpURLConnection AFInAppEventParameterName(@NonNull bj bjVar) {
StringBuilder sb = new StringBuilder("Calling ");
sb.append(bjVar.onInstallConversionFailureNative);
AFLogger.AFInAppEventType(sb.toString());
bjVar.onConversionDataSuccess = AppsFlyerLib.getInstance().isStopped();
return new k(bjVar).values();
}
public static void values(aa aaVar, Map map, Map map2, WeakReference weakReference) {
if (weakReference.get() != null) {
z.valueOf((Context) weakReference.get()).valueOf();
StringBuilder sb = new StringBuilder();
sb.append(String.format(AFInAppEventParameterName, AppsFlyerLib.getInstance().getHostPrefix(), af.AFInAppEventParameterName().getHostName()));
sb.append(((Context) weakReference.get()).getPackageName());
String obj = sb.toString();
String string = af.AFInAppEventType((Context) weakReference.get()).getString("referrer", "");
h bpVar = new bp((Context) weakReference.get());
bpVar.AFLogger$LogLevel = aaVar.AFKeystoreWrapper;
bpVar.AppsFlyer2dXConversionCallback = string;
af AFInAppEventParameterName2 = af.AFInAppEventParameterName();
Map<String, Object> valueOf = AFInAppEventParameterName2.valueOf(bpVar);
valueOf.put("price", aaVar.getLevel);
valueOf.put(HwPayConstant.KEY_CURRENCY, aaVar.init);
valueOf.put("receipt_data", map);
if (map2 != null) {
valueOf.put("extra_prms", map2);
}
valueOf.putAll(AFInAppEventParameterName2.valueOf());
am.AFKeystoreWrapper().valueOf("server_request", obj, new JSONObject(valueOf).toString());
HttpURLConnection httpURLConnection = null;
try {
httpURLConnection = AFInAppEventParameterName((bj) bpVar.AFKeystoreWrapper(valueOf).values(obj));
int responseCode = httpURLConnection != null ? httpURLConnection.getResponseCode() : -1;
String AFInAppEventType2 = af.AFInAppEventType(httpURLConnection);
am.AFKeystoreWrapper().valueOf("server_response", obj, String.valueOf(responseCode), AFInAppEventType2);
StringBuilder sb2 = new StringBuilder("Validate-WH response - ");
sb2.append(responseCode);
sb2.append(": ");
sb2.append(new JSONObject(AFInAppEventType2).toString());
AFLogger.AFInAppEventParameterName(sb2.toString());
} catch (Throwable th) {
try {
AFLogger.values(th.getMessage(), th);
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
} finally {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
}
}
}
@Override
public final void run() {
String str = this.AFKeystoreWrapper;
if (str == null || str.length() == 0 || AppsFlyerLib.getInstance().isStopped()) {
return;
}
HttpURLConnection httpURLConnection = null;
try {
Context context = this.valueOf.get();
if (context == null) {
return;
}
HashMap hashMap = new HashMap();
hashMap.put("public-key", this.values);
hashMap.put("sig-data", this.AFVersionDeclaration);
hashMap.put("signature", this.AFLogger$LogLevel);
final HashMap hashMap2 = new HashMap(hashMap);
new Thread(new Runnable() {
@Override
public final void run() {
aa aaVar = aa.this;
aa.values(aaVar, hashMap2, aaVar.AppsFlyer2dXConversionCallback, aa.this.valueOf);
}
}).start();
hashMap.put("dev_key", this.AFKeystoreWrapper);
hashMap.put(HiAnalyticsConstant.BI_KEY_APP_ID, context.getPackageName());
hashMap.put(CommonConstant.KEY_UID, AppsFlyerLib.getInstance().getAppsFlyerUID(context));
hashMap.put("advertiserId", AppsFlyerProperties.getInstance().getString("advertiserId"));
String jSONObject = new JSONObject(hashMap).toString();
String format = String.format(AFInAppEventType, AppsFlyerLib.getInstance().getHostPrefix(), af.AFInAppEventParameterName().getHostName());
am.AFKeystoreWrapper().valueOf("server_request", format, jSONObject);
HttpURLConnection AFInAppEventParameterName2 = AFInAppEventParameterName((bj) new bm().AFKeystoreWrapper(hashMap).values(format));
int responseCode = AFInAppEventParameterName2 != null ? AFInAppEventParameterName2.getResponseCode() : -1;
af.AFInAppEventParameterName();
String AFInAppEventType2 = af.AFInAppEventType(AFInAppEventParameterName2);
am.AFKeystoreWrapper().valueOf("server_response", format, String.valueOf(responseCode), AFInAppEventType2);
JSONObject jSONObject2 = new JSONObject(AFInAppEventType2);
jSONObject2.put(Constant.CALLBACK_KEY_CODE, responseCode);
if (responseCode == 200) {
StringBuilder sb = new StringBuilder("Validate response 200 ok: ");
sb.append(jSONObject2.toString());
AFLogger.AFInAppEventParameterName(sb.toString());
AFInAppEventParameterName(jSONObject2.optBoolean("result"), this.AFVersionDeclaration, this.getLevel, this.init, jSONObject2.toString());
} else {
AFLogger.AFInAppEventParameterName("Failed Validate request");
AFInAppEventParameterName(false, this.AFVersionDeclaration, this.getLevel, this.init, jSONObject2.toString());
}
if (AFInAppEventParameterName2 != null) {
AFInAppEventParameterName2.disconnect();
}
} catch (Throwable th) {
try {
if (af.valueOf != null) {
AFLogger.values("Failed Validate request + ex", th);
AFInAppEventParameterName(false, this.AFVersionDeclaration, this.getLevel, this.init, th.getMessage());
}
AFLogger.values(th.getMessage(), th);
} finally {
if (0 != 0) {
httpURLConnection.disconnect();
}
}
}
}
private static void AFInAppEventParameterName(boolean z, String str, String str2, String str3, String str4) {
if (af.valueOf != null) {
StringBuilder sb = new StringBuilder("Validate callback parameters: ");
sb.append(str);
sb.append(PPSLabelView.Code);
sb.append(str2);
sb.append(PPSLabelView.Code);
sb.append(str3);
AFLogger.AFInAppEventType(sb.toString());
if (z) {
AFLogger.AFInAppEventType("Validate in app purchase success: ".concat(String.valueOf(str4)));
af.valueOf.onValidateInApp();
return;
}
AFLogger.AFInAppEventType("Validate in app purchase failed: ".concat(String.valueOf(str4)));
AppsFlyerInAppPurchaseValidatorListener appsFlyerInAppPurchaseValidatorListener = af.valueOf;
if (str4 == null) {
str4 = "Failed validating";
}
appsFlyerInAppPurchaseValidatorListener.onValidateInAppFailure(str4);
}
}
}