吉他调音器专业版 v2.30701.8版本的 MD5 值为:9d8c85f04999890638bf11bd08e611f4
以下内容为反编译后的 p0.java 源代码,内容仅作参考
package i.b.a.b;
import android.animation.Animator;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.net.Uri;
import android.os.Build;
import android.os.CountDownTimer;
import android.os.Handler;
import android.provider.Settings;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;
import com.bafenyi.zh.bafenyipaylib.R;
import com.bafenyi.zh.bafenyipaylib.activity.PayQuestionActivity;
import com.bafenyi.zh.bafenyipaylib.activity.PayedQuestionActivity;
import com.blankj.utilcode.util.NetworkUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.just.agentweb.DefaultWebClient;
import com.tencent.smtt.export.external.interfaces.SslError;
import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
import com.tencent.smtt.sdk.QbSdk;
import com.tencent.smtt.sdk.TbsConfig;
import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebView;
import com.tencent.smtt.sdk.WebViewClient;
import i.b.a.b.p0;
import java.util.HashMap;
import java.util.List;
import q.a.a.i;
public class p0 {
public static long a;
public static o0 b;
public static AppCompatActivity f6675c;
public static String f6676d;
public static String f6677e;
public static String f6678f;
public static String f6679g;
public static String f6680h;
public static String f6681i;
public static boolean f6682j;
public static WebView f6683k;
public static int f6684l;
public static CountDownTimer f6685m;
public static q.a.a.g f6686n;
public static q.a.a.g f6687o;
public static q.a.a.g f6688p;
public static q.a.a.g f6689q;
public static q.a.a.g r;
@SuppressLint({"SetJavaScriptEnabled"})
public static i.b.a.b.r0.d s = new f();
public static class a implements i.b.a.b.r0.f {
public final o0 a;
public final Application b;
public final String f6690c;
public final AppCompatActivity f6691d;
public a(o0 o0Var, Application application, String str, AppCompatActivity appCompatActivity) {
this.a = o0Var;
this.b = application;
this.f6690c = str;
this.f6691d = appCompatActivity;
}
@Override
public void a(String str) {
i.b.a.b.r0.b.a(p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, i.d.a.a.m.a().a("currentGoodsCode", ""), new C0157a());
}
@Override
public void onError(Throwable th) {
AppCompatActivity appCompatActivity = this.f6691d;
final Application application = this.b;
final String str = this.f6690c;
final o0 o0Var = this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.a.a(application, str, o0Var);
}
});
}
public static void a(Application application, String str, o0 o0Var) {
i.d.a.a.m.a().b("checkOrderForHomeNum", i.d.a.a.m.a().a("checkOrderForHomeNum", 0) + 1);
p0.a(application, p0.f6675c, p0.f6676d, p0.f6677e, p0.f6679g, p0.f6680h, str, p0.f6682j, o0Var);
}
public class C0157a implements i.b.a.b.r0.c {
public C0157a() {
}
public static void a(boolean z, o0 o0Var, Application application, String str) {
if (z) {
i.d.a.a.m.a().b("checkOrderForHomeNum", 0);
i.d.a.a.m.a().b("isPaying", false);
o0Var.onSuccess();
} else {
i.d.a.a.m.a().b("checkOrderForHomeNum", i.d.a.a.m.a().a("checkOrderForHomeNum", 0) + 1);
p0.a(application, p0.f6675c, p0.f6676d, p0.f6677e, p0.f6679g, p0.f6680h, str, p0.f6682j, o0Var);
}
}
@Override
public void onError(Throwable th) {
a aVar = a.this;
AppCompatActivity appCompatActivity = aVar.f6691d;
final Application application = aVar.b;
final String str = aVar.f6690c;
final o0 o0Var = aVar.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.a.C0157a.a(application, str, o0Var);
}
});
}
@Override
public void onResult(final boolean z) {
AppCompatActivity appCompatActivity = p0.f6675c;
a aVar = a.this;
final o0 o0Var = aVar.a;
final Application application = aVar.b;
final String str = aVar.f6690c;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.a.C0157a.a(r1, r2, r3, r4);
}
}, 200L);
}
});
}
public static void a(Application application, String str, o0 o0Var) {
i.d.a.a.m.a().b("checkOrderForHomeNum", i.d.a.a.m.a().a("checkOrderForHomeNum", 0) + 1);
p0.a(application, p0.f6675c, p0.f6676d, p0.f6677e, p0.f6679g, p0.f6680h, str, p0.f6682j, o0Var);
}
}
}
public static class b implements i.m {
@Override
public Animator a(View view) {
return q.a.a.f.b(view);
}
@Override
public Animator b(View view) {
return q.a.a.f.a(view);
}
}
public static class c implements i.m {
@Override
public Animator a(View view) {
return q.a.a.f.b(view);
}
@Override
public Animator b(View view) {
return q.a.a.f.a(view);
}
}
public static class d implements i.b.a.b.r0.f {
public final o0 a;
public final AppCompatActivity b;
public d(o0 o0Var, AppCompatActivity appCompatActivity) {
this.a = o0Var;
this.b = appCompatActivity;
}
public static void b() {
p0.s();
p0.r();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
ToastUtils.c("当前网络不可用,请检查网络是否可用");
}
}, 200L);
}
@Override
public void a(String str) {
i.b.a.b.r0.b.a(p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, p0.f6679g, new a());
}
@Override
public void onError(Throwable th) {
this.b.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.d.b();
}
});
}
public class a implements i.b.a.b.r0.c {
public a() {
}
public static void a(boolean z, o0 o0Var) {
if (z) {
o0Var.onSuccess();
} else {
ToastUtils.a(R.string.recover_failed);
}
}
public static void b(final boolean z, final o0 o0Var) {
p0.s();
p0.r();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.d.a.a(z, o0Var);
}
}, 200L);
}
@Override
public void onError(Throwable th) {
d.this.b.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.d.a.b();
}
});
}
@Override
public void onResult(final boolean z) {
AppCompatActivity appCompatActivity = p0.f6675c;
final o0 o0Var = d.this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.d.a.b(z, o0Var);
}
});
}
public static void b() {
p0.s();
p0.r();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
ToastUtils.c("当前网络不可用,请检查网络是否可用");
}
}, 200L);
}
}
}
public static class e implements i.b.a.b.r0.f {
public final String a;
public e(String str) {
this.a = str;
}
public static void b(final Throwable th) {
p0.s();
p0.r();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.e.a(th);
}
}, 200L);
}
@Override
public void a(String str) {
i.b.a.b.r0.b.a(p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, p0.f6679g, new a(str));
}
@Override
public void onError(final Throwable th) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.e.b(th);
}
});
}
public static void a(Throwable th) {
ToastUtils.d("当前网络不可用,请检查网络是否可用");
p0.b("101", "时间戳获取失败", "网络原因导致时间戳失败,失败日志:" + th.getMessage());
}
public class a implements i.b.a.b.r0.c {
public final String a;
public a(String str) {
this.a = str;
}
public static void a(boolean z, final String str, final String str2) {
if (z) {
p0.s();
p0.r();
p0.b.onSuccess();
} else {
p0.s();
p0.b(new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.e.a.a(gVar, view);
}
}, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.e.a.a(str, str2, gVar, view);
}
}, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.e.a.b(str, str2, gVar, view);
}
});
}
}
public static void b(String str, String str2, q.a.a.g gVar, View view) {
i.d.a.a.m.a().b("selectingPay", false);
if (System.currentTimeMillis() - p0.a < 700) {
return;
}
long unused = p0.a = System.currentTimeMillis();
if (!p0.c(p0.f6675c)) {
p0.r();
ToastUtils.a(R.string.alipay_not_install);
} else {
p0.d("支付中");
i.b.a.b.r0.b.a(i.b.a.b.s0.a.PayForAlipay, p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, p0.f6680h, p0.f6679g, str2, p0.f6682j, p0.s);
}
}
@Override
public void onError(final Throwable th) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.e.a.b(th);
}
});
}
@Override
public void onResult(final boolean z) {
AppCompatActivity appCompatActivity = p0.f6675c;
final String str = this.a;
final String str2 = e.this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.e.a.a(z, str, str2);
}
});
}
public static void a(q.a.a.g gVar, View view) {
i.d.a.a.m.a().b("selectingPay", false);
if (System.currentTimeMillis() - p0.a < 700) {
return;
}
long unused = p0.a = System.currentTimeMillis();
p0.r();
}
public static void a(String str, String str2, q.a.a.g gVar, View view) {
i.d.a.a.m.a().b("selectingPay", false);
if (System.currentTimeMillis() - p0.a < 700) {
return;
}
long unused = p0.a = System.currentTimeMillis();
if (!p0.d(p0.f6675c)) {
p0.r();
ToastUtils.a(R.string.wechat_not_install);
} else {
p0.d("支付中");
i.b.a.b.r0.b.a(i.b.a.b.s0.a.PayForWechat, p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, p0.f6680h, p0.f6679g, str2, p0.f6682j, p0.s);
}
}
public static void b(final Throwable th) {
p0.s();
p0.r();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.e.a.a(th);
}
}, 200L);
}
public static void a(Throwable th) {
ToastUtils.d("当前网络不可用,请检查网络是否可用");
p0.b("101", "订单检查失败", "网络原因导致订单检查失败,失败日志:" + th.getMessage());
}
}
}
public static class h implements i.b.a.b.r0.f {
public final String a;
public final String b;
public final String f6692c;
public class a implements i.b.a.b.r0.e {
public a(h hVar) {
}
@Override
public void onError(Throwable th) {
}
@Override
public void onSuccess() {
}
}
public h(String str, String str2, String str3) {
this.a = str;
this.b = str2;
this.f6692c = str3;
}
@Override
public void a(String str) {
i.b.a.b.r0.b.a(p0.f6675c, this.a, p0.f6676d, p0.f6677e, str, this.b, this.f6692c, p0.f6678f, new a(this));
}
@Override
public void onError(Throwable th) {
}
}
public static class i implements i.m {
@Override
public Animator a(View view) {
return q.a.a.f.b(view);
}
@Override
public Animator b(View view) {
return q.a.a.f.a(view);
}
}
public static class j implements i.m {
@Override
public Animator a(View view) {
return q.a.a.f.b(view);
}
@Override
public Animator b(View view) {
return q.a.a.f.a(view);
}
}
public static class k implements i.m {
@Override
public Animator a(View view) {
return q.a.a.f.d(view);
}
@Override
public Animator b(View view) {
return q.a.a.f.c(view);
}
}
public static void A() {
q.a.a.g a2 = q.a.a.g.a(f6675c);
r = a2;
a2.b(R.layout.dialog_pay_done);
a2.b(false);
a2.a(false);
a2.a(new c());
a2.b(R.id.pay_close, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.c(gVar, view);
}
});
a2.b(R.id.pay_success, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.c("已支付成功");
}
});
a2.b(R.id.pay_question, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.x();
}
});
}
});
a2.c();
}
public static int g() {
int i2 = f6684l;
f6684l = i2 + 1;
return i2;
}
public static void r() {
q.a.a.g gVar = f6686n;
if (gVar == null || !gVar.b()) {
return;
}
f6686n.a();
}
public static void s() {
q.a.a.g gVar = f6687o;
if (gVar == null || !gVar.b()) {
return;
}
f6687o.a();
}
public static void t() {
q.a.a.g gVar = f6689q;
if (gVar == null || !gVar.b()) {
return;
}
f6689q.a();
}
public static void u() {
q.a.a.g gVar = r;
if (gVar == null || !gVar.b()) {
return;
}
r.a();
}
public static void v() {
q.a.a.g gVar = f6688p;
if (gVar == null || !gVar.b()) {
return;
}
f6688p.a();
}
public static void w() {
r();
s();
b("1003", "点击支付遇到问题", "未查到支付订单弹窗点击\"支付遇到问题\"");
Intent intent = new Intent(f6675c, (Class<?>) PayedQuestionActivity.class);
intent.putExtra("staticticalAppid", f6676d);
intent.putExtra("statisticalAppSecret", f6677e);
intent.putExtra("deviceId", f6678f);
f6675c.startActivity(intent);
}
public static void x() {
r();
s();
b("1002", "点击支付遇到问题", "选择付款状态弹窗点击\"支付遇到问题\"");
Intent intent = new Intent(f6675c, (Class<?>) PayQuestionActivity.class);
intent.putExtra("staticticalAppid", f6676d);
intent.putExtra("statisticalAppSecret", f6677e);
intent.putExtra("deviceId", f6678f);
f6675c.startActivity(intent);
}
public static void y() {
q.a.a.g a2 = q.a.a.g.a(f6675c);
f6686n = a2;
a2.b(R.layout.dialog_pay_bottom);
a2.b(false);
a2.a(false);
a2.a(new i());
a2.c();
}
public static void z() {
q.a.a.g a2 = q.a.a.g.a(f6675c);
f6689q = a2;
a2.b(R.layout.dialog_error_report);
a2.b(false);
a2.a(false);
a2.a(new b());
a2.b(R.id.pay_again, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.a(gVar, view);
}
});
a2.b(R.id.pay_question, new i.o() {
@Override
public final void a(q.a.a.g gVar, View view) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.w();
}
});
}
});
a2.c();
}
@SuppressLint({"CommitPrefEdits"})
public static void c(String str) {
if (i.d.a.a.m.a().a("checkOrderNum", 0) > 1) {
i.d.a.a.m.a().b("checkOrderNum", 0);
i.d.a.a.m.a().b("isPaying", false);
if (str.equals("放弃付款")) {
s();
r();
b("1001", "放弃付款", "用户点击放弃付款");
ToastUtils.c("取消支付");
return;
}
if (str.equals("已支付成功")) {
s();
z();
return;
}
return;
}
i.b.a.b.r0.b.a(new g(str));
}
public static void d(final String str) {
q.a.a.g a2 = q.a.a.g.a(f6675c);
f6687o = a2;
a2.b(R.layout.dialog_pay_load);
a2.b(false);
a2.a(false);
a2.a(new j());
a2.a(new i.n() {
@Override
public final void a(q.a.a.g gVar) {
((TextView) gVar.c(R.id.load_state_text_view)).setText(str);
}
});
a2.c();
}
public static void b(String str, String str2, String str3) {
i.b.a.b.r0.b.a(new h(str, str2, str3));
}
public static class g implements i.b.a.b.r0.f {
public final String a;
public g(String str) {
this.a = str;
}
public static void c(final String str) {
i.d.a.a.m.a().b("checkOrderNum", i.d.a.a.m.a().a("checkOrderNum", 0) + 1);
new Handler().post(new Runnable() {
@Override
public final void run() {
p0.c(str);
}
});
}
@Override
public void a(String str) {
i.b.a.b.r0.b.a(p0.f6675c, p0.f6676d, p0.f6677e, str, p0.f6678f, p0.f6679g, new a());
}
@Override
public void onError(Throwable th) {
AppCompatActivity appCompatActivity = p0.f6675c;
final String str = this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.g.c(r1);
}
}, 1000L);
}
});
}
public class a implements i.b.a.b.r0.c {
public a() {
}
public static void a(boolean z, final String str) {
if (z) {
i.d.a.a.m.a().b("isPaying", false);
p0.s();
p0.r();
i.d.a.a.m.a().b("checkOrderNum", 0);
p0.b.onSuccess();
return;
}
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.g.a.b(str);
}
}, 1000L);
}
public static void b(final String str) {
i.d.a.a.m.a().b("checkOrderNum", i.d.a.a.m.a().a("checkOrderNum", 0) + 1);
new Handler().post(new Runnable() {
@Override
public final void run() {
p0.c(str);
}
});
}
public static void d(final String str) {
i.d.a.a.m.a().b("checkOrderNum", i.d.a.a.m.a().a("checkOrderNum", 0) + 1);
new Handler().post(new Runnable() {
@Override
public final void run() {
p0.c(str);
}
});
}
@Override
public void onError(Throwable th) {
AppCompatActivity appCompatActivity = p0.f6675c;
final String str = g.this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.g.a.d(r1);
}
}, 1000L);
}
});
}
@Override
public void onResult(final boolean z) {
AppCompatActivity appCompatActivity = p0.f6675c;
final String str = g.this.a;
appCompatActivity.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.g.a.a(z, str);
}
});
}
}
}
public static void b(i.o oVar, i.o oVar2, i.o oVar3) {
i.d.a.a.m.a().b("selectingPay", true);
q.a.a.g a2 = q.a.a.g.a(f6675c);
f6688p = a2;
a2.b(R.layout.dialog_pay_select_type);
a2.b(false);
a2.a(false);
a2.a(new k());
a2.a(new i.n() {
@Override
public final void a(q.a.a.g gVar) {
p0.a(gVar);
}
});
a2.b(R.id.bottom_view, oVar);
a2.b(R.id.ll_dialog_wxpay, oVar2);
a2.b(R.id.ll_dialog_alipay, oVar3);
a2.c();
}
@SuppressLint({"CommitPrefEdits"})
public static void a(Application application, @NonNull AppCompatActivity appCompatActivity, String str, String str2, String str3, String str4, String str5, boolean z, o0 o0Var) {
f6676d = str;
f6677e = str2;
f6679g = str3;
f6680h = str4;
f6681i = str5;
f6682j = z;
f6675c = appCompatActivity;
QbSdk.initX5Environment(application.getApplicationContext(), null);
f6683k = new WebView(application.getApplicationContext());
f6678f = Settings.System.getString(application.getContentResolver(), "android_id");
if (i.d.a.a.m.a().a("isPaying", false)) {
if (i.d.a.a.m.a().a("checkOrderForHomeNum", 0) >= 1) {
i.d.a.a.m.a().b("isPaying", false);
i.d.a.a.m.a().b("checkOrderForHomeNum", 0);
} else {
i.b.a.b.r0.b.a(new a(o0Var, application, str5, appCompatActivity));
}
}
}
public static boolean d(Context context) {
List<PackageInfo> installedPackages = context.getPackageManager().getInstalledPackages(0);
if (installedPackages != null) {
for (int i2 = 0; i2 < installedPackages.size(); i2++) {
if (installedPackages.get(i2).packageName.equals(TbsConfig.APP_WX)) {
return true;
}
}
}
return false;
}
public static void c(q.a.a.g gVar, View view) {
s();
d("");
c("放弃付款");
}
public static boolean c(Context context) {
return new Intent("android.intent.action.VIEW", Uri.parse("alipays://platformapi/startApp")).resolveActivity(context.getPackageManager()) != null;
}
public static class f implements i.b.a.b.r0.d {
public class a extends WebViewClient {
public final i.b.a.b.s0.a b;
public a(f fVar, i.b.a.b.s0.a aVar) {
this.b = aVar;
}
public static void a(String str) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
p0.f6675c.startActivity(intent);
}
public static void b(String str) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
p0.f6675c.startActivity(intent);
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
}
@Override
public void onReceivedError(WebView webView, int i2, String str, String str2) {
super.onReceivedError(webView, i2, str, str2);
}
@Override
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
sslErrorHandler.proceed();
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, final String str) {
i.b.a.b.s0.a aVar = this.b;
if (aVar == i.b.a.b.s0.a.PayForWechat) {
if (str.startsWith(DefaultWebClient.WEBCHAT_PAY_SCHEME)) {
p0.g();
if (p0.f6684l <= 1) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.f.a.a(str);
}
});
}
} else {
HashMap hashMap = new HashMap();
hashMap.put("Referer", "http://wxpay.wxutil.com");
webView.loadUrl(str, hashMap);
}
} else if (aVar == i.b.a.b.s0.a.PayForAlipay) {
if (str.contains("alipays:")) {
p0.g();
if (p0.f6684l <= 1) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.f.a.b(str);
}
});
}
} else {
webView.loadUrl(str);
}
}
return true;
}
}
public class b extends CountDownTimer {
public b(f fVar, long j2, long j3) {
super(j2, j3);
}
@Override
public void onFinish() {
if (p0.f6685m != null) {
p0.f6685m.cancel();
CountDownTimer unused = p0.f6685m = null;
}
p0.A();
}
@Override
public void onTick(long j2) {
}
}
public static void b(i.b.a.b.s0.a aVar, Throwable th) {
ToastUtils.c("当前网络不可用,请检查网络是否可用");
if (aVar == i.b.a.b.s0.a.PayForWechat) {
p0.b("101", "微信支付链接获取失败", "网络原因导致微信支付链接失败,失败日志:" + th.getMessage());
return;
}
p0.b("101", "支付宝支付链接获取失败", "网络原因导致支付宝支付链接失败,失败日志:" + th.getMessage());
}
public static void c(final i.b.a.b.s0.a aVar, final Throwable th) {
p0.s();
new Handler().postDelayed(new Runnable() {
@Override
public final void run() {
p0.f.b(i.b.a.b.s0.a.this, th);
}
}, 200L);
}
@Override
public void a(i.b.a.b.s0.a aVar, String str) {
int unused = p0.f6684l = 0;
p0.f6683k.getSettings().setUseWideViewPort(true);
p0.f6683k.getSettings().setDomStorageEnabled(true);
p0.f6683k.getSettings().setAllowFileAccess(true);
p0.f6683k.getSettings().setJavaScriptEnabled(true);
p0.f6683k.getSettings().setAppCacheEnabled(true);
p0.f6683k.getSettings().setBlockNetworkImage(false);
p0.f6683k.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
p0.f6683k.setWebChromeClient(new WebChromeClient());
if (Build.VERSION.SDK_INT >= 21) {
p0.f6683k.getSettings().setMixedContentMode(0);
}
p0.f6683k.setWebViewClient(new a(this, aVar));
if (aVar == i.b.a.b.s0.a.PayForWechat) {
HashMap hashMap = new HashMap();
hashMap.put("Referer", "https://pay.8fenyi.cn");
p0.f6683k.loadUrl(str, hashMap);
} else if (aVar == i.b.a.b.s0.a.PayForAlipay) {
p0.f6683k.loadUrl(str);
}
CountDownTimer unused2 = p0.f6685m = new b(this, FragmentStateAdapter.GRACE_WINDOW_TIME_MS, 1000L);
p0.f6685m.start();
}
@Override
public void a(final i.b.a.b.s0.a aVar, final Throwable th) {
p0.f6675c.runOnUiThread(new Runnable() {
@Override
public final void run() {
p0.f.c(i.b.a.b.s0.a.this, th);
}
});
}
}
public static void a(@NonNull AppCompatActivity appCompatActivity, o0 o0Var) {
f6675c = appCompatActivity;
f6678f = Settings.System.getString(appCompatActivity.getContentResolver(), "android_id");
y();
d("加载中");
i.b.a.b.r0.b.a(new d(o0Var, appCompatActivity));
}
@SuppressLint({"CommitPrefEdits"})
public static void a(@NonNull AppCompatActivity appCompatActivity, String str, o0 o0Var) {
if (!NetworkUtils.c()) {
ToastUtils.c("当前网络不可用,请检查网络是否可用");
return;
}
i.d.a.a.m.a().b("isPaying", false);
i.d.a.a.m.a().b("checkOrderNum", 0);
f6675c = appCompatActivity;
b = o0Var;
f6678f = Settings.System.getString(appCompatActivity.getContentResolver(), "android_id");
f6681i = str;
r();
s();
t();
u();
v();
y();
d("加载中");
i.b.a.b.r0.b.a(new e(str));
}
public static void a(q.a.a.g gVar) {
if (!d(f6675c)) {
((ImageView) gVar.c(R.id.iv_dialog_wxpay)).setImageResource(R.mipmap.icon_wechat_disable);
}
if (c(f6675c)) {
return;
}
((ImageView) gVar.c(R.id.iv_dialog_alipay)).setImageResource(R.mipmap.icon_alipay_disable);
}
public static void a(q.a.a.g gVar, View view) {
r();
a(f6675c, f6681i, b);
}
}