HYDK v3.0.0版本的 MD5 值为:36b96e4c5561390bc72ab66c2f29a92f
以下内容为反编译后的 za2.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
import android.R;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.huawei.hms.api.ConnectionResult;
import com.meizu.cloud.pushsdk.notification.model.NotifyOption;
import com.tencent.open.utils.HttpUtils;
import com.tencent.open.web.security.JniInterface;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
import p.a.y.e.a.s.e.net.ab2;
public class za2 extends Dialog {
private HashMap<String, Runnable> f1552a;
private String lite_abstract;
private Handler lite_boolean;
private com.tencent.open.b.c lite_continue;
private FrameLayout lite_default;
private LinearLayout lite_extends;
private FrameLayout lite_finally;
private String lite_implements;
private long lite_instanceof;
private boolean lite_interface;
private ProgressBar lite_package;
private Button lite_private;
private int lite_protected;
private String lite_static;
private Context lite_strictfp;
private f lite_switch;
private long lite_synchronized;
private kd2 lite_throws;
private String lite_transient;
private hd2 lite_volatile;
public class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
za2.this.dismiss();
if (za2.this.lite_interface || za2.this.lite_switch == null) {
return;
}
za2.this.lite_switch.onCancel();
}
}
public class b implements View.OnLongClickListener {
public b() {
}
@Override
public boolean onLongClick(View view) {
return true;
}
}
public class c implements View.OnTouchListener {
public c() {
}
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
int action = motionEvent.getAction();
if ((action != 0 && action != 1) || view.hasFocus()) {
return false;
}
view.requestFocus();
return false;
}
}
public class d implements DialogInterface.OnDismissListener {
public d() {
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
try {
if (JniInterface.lite_do) {
JniInterface.clearAllPWD();
}
} catch (Exception unused) {
}
}
}
public class e extends WebViewClient {
public class a implements Runnable {
public a() {
}
@Override
public void run() {
za2.this.lite_continue.loadUrl(za2.this.lite_transient);
}
}
public class b implements DialogInterface.OnClickListener {
public final SslErrorHandler lite_static;
public b(SslErrorHandler sslErrorHandler) {
this.lite_static = sslErrorHandler;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.lite_static.proceed();
}
}
public class c implements DialogInterface.OnClickListener {
public final SslErrorHandler lite_static;
public c(SslErrorHandler sslErrorHandler) {
this.lite_static = sslErrorHandler;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.lite_static.cancel();
za2.this.dismiss();
}
}
private e() {
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
hc2.lite_const("openSDK_LOG.AuthDialog", "-->onPageFinished, url: " + str);
za2.this.lite_finally.setVisibility(8);
if (za2.this.lite_continue != null) {
za2.this.lite_continue.setVisibility(0);
}
if (TextUtils.isEmpty(str)) {
return;
}
za2.this.lite_boolean.removeCallbacks((Runnable) za2.this.f1552a.remove(str));
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
hc2.lite_const("openSDK_LOG.AuthDialog", "-->onPageStarted, url: " + str);
super.onPageStarted(webView, str, bitmap);
za2.this.lite_finally.setVisibility(0);
za2.this.lite_instanceof = SystemClock.elapsedRealtime();
if (!TextUtils.isEmpty(za2.this.lite_transient)) {
za2.this.lite_boolean.removeCallbacks((Runnable) za2.this.f1552a.remove(za2.this.lite_transient));
}
za2.this.lite_transient = str;
za2 za2Var = za2.this;
h hVar = new h(za2Var.lite_transient);
za2.this.f1552a.put(str, hVar);
za2.this.lite_boolean.postDelayed(hVar, 120000L);
}
@Override
public void onReceivedError(WebView webView, int i, String str, String str2) {
super.onReceivedError(webView, i, str, str2);
hc2.lite_long("openSDK_LOG.AuthDialog", "-->onReceivedError, errorCode: " + i + " | description: " + str);
if (!cd2.lite_double(za2.this.lite_strictfp)) {
za2.this.lite_switch.lite_do(new md2(ConnectionResult.RESOLUTION_REQUIRED, "当前网络不可用,请稍后重试!", str2));
za2.this.dismiss();
return;
}
if (!za2.this.lite_transient.startsWith("https://login.imgcache.qq.com/ptlogin/static/qzsjump.html?")) {
long elapsedRealtime = SystemClock.elapsedRealtime() - za2.this.lite_instanceof;
if (za2.this.lite_protected >= 1 || elapsedRealtime >= za2.this.lite_synchronized) {
za2.this.lite_continue.loadUrl(za2.this.lite_for());
return;
} else {
za2.lite_return(za2.this);
za2.this.lite_boolean.postDelayed(new a(), 500L);
return;
}
}
za2.this.lite_switch.lite_do(new md2(i, str, str2));
za2.this.dismiss();
}
@Override
@TargetApi(8)
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
String str;
String str2;
String str3;
StringBuilder b2 = r5.b("-->onReceivedSslError ");
b2.append(sslError.getPrimaryError());
b2.append("请求不合法,请检查手机安全设置,如系统时间、代理等");
hc2.lite_case("openSDK_LOG.AuthDialog", b2.toString());
if (Locale.getDefault().getLanguage().equals("zh")) {
str = "ssl证书无效,是否继续访问?";
str2 = "是";
str3 = "否";
} else {
str = "The SSL certificate is invalid,do you countinue?";
str2 = vw1.d;
str3 = NotifyOption.NOTIFY_OPTION;
}
AlertDialog.Builder builder = new AlertDialog.Builder(za2.this.lite_strictfp);
builder.setMessage(str);
builder.setPositiveButton(str2, new b(sslErrorHandler));
builder.setNegativeButton(str3, new c(sslErrorHandler));
builder.create().show();
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
Uri parse;
List<String> pathSegments;
hc2.lite_const("openSDK_LOG.AuthDialog", "-->Redirect URL: " + str);
if (str.startsWith("auth://browser")) {
JSONObject lite_static = cd2.lite_static(str);
za2 za2Var = za2.this;
za2Var.lite_interface = za2Var.lite_super();
if (!za2.this.lite_interface) {
if (lite_static.optString("fail_cb", null) != null) {
za2.this.lite_byte(lite_static.optString("fail_cb"), "");
} else if (lite_static.optInt("fall_to_wv") == 1) {
za2 za2Var2 = za2.this;
StringBuilder sb = new StringBuilder();
sb.append(za2.this.lite_static);
sb.append(za2.this.lite_static.indexOf("?") > -1 ? "&" : "?");
za2Var2.lite_static = sb.toString();
za2.this.lite_static = za2.this.lite_static + "browser_error=1";
za2.this.lite_continue.loadUrl(za2.this.lite_static);
} else {
String optString = lite_static.optString("redir", null);
if (optString != null) {
za2.this.lite_continue.loadUrl(optString);
}
}
}
return true;
}
if (str.startsWith("auth://tauth.qq.com/")) {
za2.this.lite_switch.lite_if(cd2.lite_static(str));
za2.this.dismiss();
return true;
}
if (str.startsWith(gb2.v0)) {
za2.this.lite_switch.onCancel();
za2.this.dismiss();
return true;
}
if (str.startsWith(gb2.w0)) {
za2.this.dismiss();
return true;
}
if (!str.startsWith(gb2.x0) && !str.endsWith(".apk")) {
if (str.startsWith("auth://progress")) {
try {
pathSegments = Uri.parse(str).getPathSegments();
} catch (Exception unused) {
}
if (pathSegments.isEmpty()) {
return true;
}
int intValue = Integer.valueOf(pathSegments.get(0)).intValue();
if (intValue == 0) {
za2.this.lite_finally.setVisibility(8);
za2.this.lite_continue.setVisibility(0);
} else if (intValue == 1) {
za2.this.lite_finally.setVisibility(0);
}
return true;
}
if (!str.startsWith("auth://onLoginSubmit")) {
if (za2.this.lite_volatile.lite_for(za2.this.lite_continue, str)) {
return true;
}
hc2.lite_long("openSDK_LOG.AuthDialog", "-->Redirect URL: return false");
return false;
}
try {
List<String> pathSegments2 = Uri.parse(str).getPathSegments();
if (!pathSegments2.isEmpty()) {
za2.this.lite_implements = pathSegments2.get(0);
}
} catch (Exception unused2) {
}
return true;
}
try {
if (str.startsWith(gb2.x0)) {
parse = Uri.parse(Uri.decode(str.substring(11)));
} else {
parse = Uri.parse(Uri.decode(str));
}
Intent intent = new Intent("android.intent.action.VIEW", parse);
intent.addFlags(268435456);
za2.this.lite_strictfp.startActivity(intent);
} catch (Exception e) {
hc2.lite_char("openSDK_LOG.AuthDialog", "-->start download activity exception, e: ", e);
}
return true;
}
public e(za2 za2Var, a aVar) {
this();
}
}
public class f implements kd2 {
private String lite_do;
public String lite_for;
public String lite_if;
private kd2 lite_int;
public f(String str, String str2, String str3, kd2 kd2Var) {
this.lite_do = str;
this.lite_if = str2;
this.lite_for = str3;
this.lite_int = kd2Var;
}
public void lite_int(String str) {
try {
lite_if(cd2.lite_throws(str));
} catch (JSONException e) {
e.printStackTrace();
lite_do(new md2(-4, gb2.g, str));
}
}
@Override
public void lite_do(md2 md2Var) {
String str;
if (md2Var.lite_if != null) {
str = md2Var.lite_if + this.lite_if;
} else {
str = this.lite_if;
}
dc2.lite_if().lite_new(r5.lite_volatile(new StringBuilder(), this.lite_do, "_H5"), SystemClock.elapsedRealtime(), 0L, 0L, md2Var.lite_do, str, false);
za2.this.lite_new(str);
kd2 kd2Var = this.lite_int;
if (kd2Var != null) {
kd2Var.lite_do(md2Var);
this.lite_int = null;
}
}
@Override
public void lite_if(Object obj) {
JSONObject jSONObject = (JSONObject) obj;
dc2.lite_if().lite_new(r5.lite_volatile(new StringBuilder(), this.lite_do, "_H5"), SystemClock.elapsedRealtime(), 0L, 0L, jSONObject.optInt("ret", -6), this.lite_if, false);
kd2 kd2Var = this.lite_int;
if (kd2Var != null) {
kd2Var.lite_if(jSONObject);
this.lite_int = null;
}
}
@Override
public void onCancel() {
kd2 kd2Var = this.lite_int;
if (kd2Var != null) {
kd2Var.onCancel();
this.lite_int = null;
}
}
}
public class g extends Handler {
private f lite_do;
public g(f fVar, Looper looper) {
super(looper);
this.lite_do = fVar;
}
@Override
public void handleMessage(Message message) {
int i = message.what;
if (i == 1) {
this.lite_do.lite_int((String) message.obj);
} else if (i == 2) {
this.lite_do.onCancel();
} else {
if (i != 3) {
return;
}
za2.lite_goto(za2.this.lite_strictfp, (String) message.obj);
}
}
}
public class h implements Runnable {
public String lite_static;
public h(String str) {
this.lite_static = "";
this.lite_static = str;
}
@Override
public void run() {
StringBuilder b = r5.b("-->timeoutUrl: ");
b.append(this.lite_static);
b.append(" | mRetryUrl: ");
b.append(za2.this.lite_transient);
hc2.lite_const("openSDK_LOG.AuthDialog", b.toString());
if (this.lite_static.equals(za2.this.lite_transient)) {
za2.this.lite_switch.lite_do(new md2(ConnectionResult.DRIVE_EXTERNAL_STORAGE_REQUIRED, "请求页面超时,请稍后重试!", za2.this.lite_transient));
za2.this.dismiss();
}
}
}
public za2(Context context, String str, String str2, kd2 kd2Var, ya2 ya2Var) {
super(context, R.style.Theme.Translucent.NoTitleBar);
this.lite_interface = false;
this.lite_instanceof = 0L;
this.lite_synchronized = 30000L;
this.lite_strictfp = context;
this.lite_static = str2;
this.lite_switch = new f(str, str2, ya2Var.lite_new(), kd2Var);
this.lite_boolean = new g(this.lite_switch, context.getMainLooper());
this.lite_throws = kd2Var;
this.lite_abstract = str;
this.lite_volatile = new hd2();
getWindow().setSoftInputMode(32);
}
private void lite_const() {
TextView textView;
this.lite_package = new ProgressBar(this.lite_strictfp);
this.lite_package.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
this.lite_extends = new LinearLayout(this.lite_strictfp);
if (this.lite_abstract.equals("action_login")) {
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-2, -2);
layoutParams.gravity = 16;
layoutParams.leftMargin = 5;
textView = new TextView(this.lite_strictfp);
if (Locale.getDefault().getLanguage().equals("zh")) {
textView.setText("登录中...");
} else {
textView.setText("Logging in...");
}
textView.setTextColor(Color.rgb(255, 255, 255));
textView.setTextSize(18.0f);
textView.setLayoutParams(layoutParams);
} else {
textView = null;
}
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(-2, -2);
layoutParams2.gravity = 17;
this.lite_extends.setLayoutParams(layoutParams2);
this.lite_extends.addView(this.lite_package);
if (textView != null) {
this.lite_extends.addView(textView);
}
this.lite_finally = new FrameLayout(this.lite_strictfp);
FrameLayout.LayoutParams layoutParams3 = new FrameLayout.LayoutParams(-1, -1);
layoutParams3.gravity = 17;
this.lite_finally.setLayoutParams(layoutParams3);
this.lite_finally.setBackgroundColor(Color.parseColor("#B3000000"));
this.lite_finally.addView(this.lite_extends);
}
private void lite_else() {
lite_const();
lite_void();
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
com.tencent.open.b.c cVar = new com.tencent.open.b.c(this.lite_strictfp);
this.lite_continue = cVar;
cVar.setLayerType(1, null);
this.lite_continue.setLayoutParams(layoutParams);
FrameLayout frameLayout = new FrameLayout(this.lite_strictfp);
this.lite_default = frameLayout;
layoutParams.gravity = 17;
frameLayout.setLayoutParams(layoutParams);
this.lite_default.addView(this.lite_continue);
this.lite_default.addView(this.lite_finally);
String string = cd2.lite_short(this.lite_static).getString("style");
if (string != null && "qr".equals(string)) {
this.lite_default.addView(this.lite_private);
}
setContentView(this.lite_default);
}
@SuppressLint({"SetJavaScriptEnabled"})
private void lite_float() {
this.lite_continue.setVerticalScrollBarEnabled(false);
this.lite_continue.setHorizontalScrollBarEnabled(false);
this.lite_continue.setWebViewClient(new e(this, null));
this.lite_continue.setWebChromeClient(new WebChromeClient());
this.lite_continue.clearFormData();
this.lite_continue.clearSslPreferences();
this.lite_continue.setOnLongClickListener(new b());
this.lite_continue.setOnTouchListener(new c());
WebSettings settings = this.lite_continue.getSettings();
settings.setSavePassword(false);
settings.setSaveFormData(false);
settings.setCacheMode(-1);
settings.setNeedInitialFocus(false);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
settings.setJavaScriptEnabled(true);
settings.setDatabaseEnabled(true);
settings.setDatabasePath(this.lite_strictfp.getDir("databases", 0).getPath());
settings.setDomStorageEnabled(true);
hc2.lite_const("openSDK_LOG.AuthDialog", "-->mUrl : " + this.lite_static);
String str = this.lite_static;
this.lite_transient = str;
this.lite_continue.loadUrl(str);
this.lite_continue.setVisibility(4);
this.lite_continue.getSettings().setSavePassword(false);
this.lite_volatile.lite_do(new fd2(), "SecureJsInterface");
fd2.lite_if = false;
super.setOnDismissListener(new d());
}
public String lite_for() {
String str = this.lite_static;
String str2 = "https://login.imgcache.qq.com/ptlogin/static/qzsjump.html?" + str.substring(str.indexOf("?") + 1);
hc2.lite_long("openSDK_LOG.AuthDialog", "-->generateDownloadUrl, url: https://login.imgcache.qq.com/ptlogin/static/qzsjump.html?");
return str2;
}
public static void lite_goto(Context context, String str) {
try {
JSONObject lite_throws = cd2.lite_throws(str);
int i = lite_throws.getInt("type");
Toast.makeText(context.getApplicationContext(), lite_throws.getString("msg"), i).show();
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public String lite_new(String str) {
StringBuilder sb = new StringBuilder(str);
if (!TextUtils.isEmpty(this.lite_implements) && this.lite_implements.length() >= 4) {
String str2 = this.lite_implements;
String substring = str2.substring(str2.length() - 4);
sb.append("_u_");
sb.append(substring);
}
return sb.toString();
}
public static int lite_return(za2 za2Var) {
int i = za2Var.lite_protected;
za2Var.lite_protected = i + 1;
return i;
}
public boolean lite_super() {
ab2 lite_do = ab2.lite_do();
String lite_int = lite_do.lite_int();
ab2.a aVar = new ab2.a();
aVar.lite_do = this.lite_throws;
aVar.lite_if = this;
aVar.lite_for = lite_int;
String lite_if = lite_do.lite_if(aVar);
String str = this.lite_static;
String substring = str.substring(0, str.indexOf("?"));
Bundle lite_short = cd2.lite_short(this.lite_static);
lite_short.putString("token_key", lite_int);
lite_short.putString("serial", lite_if);
lite_short.putString("browser", "1");
String str2 = substring + "?" + HttpUtils.lite_try(lite_short);
this.lite_static = str2;
return cd2.lite_catch(this.lite_strictfp, str2);
}
private void lite_void() {
Button button = new Button(this.lite_strictfp);
this.lite_private = button;
button.setBackgroundDrawable(cd2.lite_if("h5_qr_back.png", this.lite_strictfp));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -2);
layoutParams.leftMargin = eb2.lite_do(this.lite_strictfp, 20.0f);
layoutParams.topMargin = eb2.lite_do(this.lite_strictfp, 10.0f);
this.lite_private.setLayoutParams(layoutParams);
this.lite_private.setOnClickListener(new a());
}
@Override
public void dismiss() {
this.f1552a.clear();
this.lite_boolean.removeCallbacksAndMessages(null);
try {
Context context = this.lite_strictfp;
if ((context instanceof Activity) && !((Activity) context).isFinishing() && isShowing()) {
super.dismiss();
hc2.lite_long("openSDK_LOG.AuthDialog", "-->dismiss dialog");
}
} catch (Exception e2) {
hc2.lite_char("openSDK_LOG.AuthDialog", "-->dismiss dialog exception:", e2);
}
com.tencent.open.b.c cVar = this.lite_continue;
if (cVar != null) {
cVar.destroy();
this.lite_continue = null;
}
}
public void lite_byte(String str, String str2) {
StringBuilder j = r5.j("javascript:", str, "(", str2, ");void(");
j.append(System.currentTimeMillis());
j.append(");");
this.lite_continue.loadUrl(j.toString());
}
@Override
public void onBackPressed() {
if (!this.lite_interface) {
this.lite_switch.onCancel();
}
super.onBackPressed();
}
@Override
public void onCreate(Bundle bundle) {
requestWindowFeature(1);
Window window = getWindow();
if (window != null) {
window.setFlags(1024, 1024);
}
super.onCreate(bundle);
if (window != null) {
window.getDecorView().setSystemUiVisibility(1280);
}
lite_else();
lite_float();
this.f1552a = new HashMap<>();
}
@Override
public void onStop() {
super.onStop();
}
}