正在查看: 万能钥匙 v1.1.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package v8;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import cn.fly.verify.BuildConfig;
import com.alipay.sdk.app.H5OpenAuthActivity;
import ja.a;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import la.f;
import la.n;
import org.json.JSONException;
import org.json.JSONObject;
import w9.a;
public final class c {
public static final Map<String, b> f19096e = new ConcurrentHashMap();
public static long f19097f = -1;
public final Activity f19099b;
public b f19100c;
public volatile boolean f19098a = false;
public final Handler f19101d = new Handler(Looper.getMainLooper());
public enum a {
Invoice("20000920"),
AccountAuth("20000067"),
Deduct("60000157");
public String f19106a;
a(String str) {
this.f19106a = str;
}
}
public interface b {
void a(int i10, String str, Bundle bundle);
}
public static class C0300c {
public static final int[] f19107a;
static {
int[] iArr = new int[a.values().length];
f19107a = iArr;
try {
iArr[a.Deduct.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
f19107a[a.AccountAuth.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
f19107a[a.Invoice.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
public final class d implements Runnable {
public final int f19108a;
public final String f19109b;
public final Bundle f19110c;
public d(int i10, String str, Bundle bundle) {
this.f19108a = i10;
this.f19109b = str;
this.f19110c = bundle;
}
public d(c cVar, int i10, String str, Bundle bundle, C0300c c0300c) {
this(i10, str, bundle);
}
@Override
public void run() {
if (c.this.f19100c != null) {
c.this.f19100c.a(this.f19108a, this.f19109b, this.f19110c);
}
}
}
public c(Activity activity) {
this.f19099b = activity;
ja.b.d().b(activity);
}
public static void d(String str, int i10, String str2, Bundle bundle) {
b remove = f19096e.remove(str);
if (remove != null) {
try {
remove.a(i10, str2, bundle);
} catch (Throwable th) {
f.d(th);
}
}
}
public final String a(long j10, String str, a aVar, String str2) throws JSONException {
JSONObject jSONObject = new JSONObject();
jSONObject.put("startTime", String.valueOf(j10));
jSONObject.put("session", str);
jSONObject.put("package", this.f19099b.getPackageName());
if (aVar != null) {
jSONObject.put("appId", aVar.f19106a);
}
jSONObject.put("sdkVersion", "h.a.3.8.35");
jSONObject.put("mqpURL", str2);
return Base64.encodeToString(jSONObject.toString().getBytes(Charset.forName("UTF-8")), 2);
}
public final String b(a aVar, Map<String, String> map) {
if (aVar == null) {
throw new RuntimeException("missing bizType");
}
Uri.Builder appendQueryParameter = new Uri.Builder().scheme("alipays").authority("platformapi").path("startapp").appendQueryParameter("appId", aVar.f19106a);
if (C0300c.f19107a[aVar.ordinal()] == 1) {
appendQueryParameter.appendQueryParameter("appClearTop", "false").appendQueryParameter("startMultApp", "YES");
}
for (Map.Entry<String, String> entry : map.entrySet()) {
appendQueryParameter.appendQueryParameter(entry.getKey(), entry.getValue());
}
return appendQueryParameter.build().toString();
}
public final boolean e(ja.a aVar, String str, a aVar2, Map<String, String> map, boolean z) {
PackageInfo packageInfo;
String str2;
if (this.f19098a) {
this.f19101d.post(new d(this, 4000, "该 OpenAuthTask 已在执行", null, null));
return true;
}
this.f19098a = true;
long elapsedRealtime = SystemClock.elapsedRealtime();
if (elapsedRealtime - f19097f <= 3000) {
this.f19101d.post(new d(this, 5000, "3s 内重复支付", null, null));
return true;
}
f19097f = elapsedRealtime;
q9.a.b(BuildConfig.FLAVOR);
String g10 = n.g(32);
HashMap hashMap = new HashMap(map);
hashMap.put("mqpPkgName", this.f19099b.getPackageName());
hashMap.put("mqpScene", "sdk");
List<a.b> D = w9.a.z().D();
if (!w9.a.z().f19739g || D == null) {
D = q9.a.f17304d;
}
n.c s10 = n.s(aVar, this.f19099b, D);
if (s10 == null || s10.b(aVar) || s10.a() || (packageInfo = s10.f14964a) == null || packageInfo.versionCode < 122) {
if (!z) {
this.f19101d.post(new d(this, 4001, "支付宝未安装或签名错误", null, null));
return true;
}
hashMap.put("mqpScheme", String.valueOf(str));
hashMap.put("mqpNotifyName", g10);
hashMap.put("mqpScene", "landing");
String b10 = b(aVar2, hashMap);
Intent intent = new Intent(this.f19099b, (Class<?>) H5OpenAuthActivity.class);
intent.putExtra("url", String.format("https://render.alipay.com/p/s/i?scheme=%s", Uri.encode(b10)));
a.C0202a.c(aVar, intent);
this.f19099b.startActivity(intent);
return false;
}
try {
try {
HashMap<String, String> e10 = ja.a.e(aVar);
e10.put("ts_scheme", String.valueOf(SystemClock.elapsedRealtime()));
hashMap.put("mqpLoc", new JSONObject(e10).toString());
} catch (Throwable th) {
s9.a.d(aVar, "biz", "OpenAuthLocEx", th);
}
String b11 = b(aVar2, hashMap);
f19096e.put(g10, this.f19100c);
try {
str2 = a(elapsedRealtime, g10, aVar2, b11);
} catch (JSONException e11) {
s9.a.d(aVar, "biz", "JSONEx", e11);
str2 = null;
}
if (TextUtils.isEmpty(str2)) {
this.f19101d.post(new d(this, 4000, "参数错误", null, null));
return true;
}
Intent intent2 = new Intent("android.intent.action.VIEW", new Uri.Builder().scheme("alipays").authority("platformapi").path("startapp").appendQueryParameter("appId", "20001129").appendQueryParameter("payload", str2).build());
intent2.addFlags(268435456);
intent2.setPackage(s10.f14964a.packageName);
try {
s9.a.c(aVar, "biz", "PgOpenStarting", BuildConfig.FLAVOR + elapsedRealtime);
a.C0202a.d(aVar, g10);
this.f19099b.startActivity(intent2);
} catch (Throwable th2) {
s9.a.d(aVar, "biz", "StartWalletEx", th2);
}
return false;
} catch (Throwable unused) {
this.f19101d.post(new d(this, 4000, "业务参数错误", null, null));
return true;
}
}
public void f(String str, a aVar, Map<String, String> map, b bVar, boolean z) {
ja.a aVar2 = new ja.a(this.f19099b, String.valueOf(map), "oa-" + aVar);
this.f19100c = bVar;
if (e(aVar2, str, aVar, map, z)) {
s9.a.g(this.f19099b, aVar2, BuildConfig.FLAVOR, aVar2.f14278d);
}
}
}