EMOTIBOT v3.0.0版本的 MD5 值为:e78ae62c08f0ada6738206eeb97d2940
以下内容为反编译后的 eb2.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.fb2;
public class eb2 extends Dialog {
private HashMap<String, Runnable> f1513a;
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 pd2 lite_throws;
private String lite_transient;
private md2 lite_volatile;
public class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
eb2.this.dismiss();
if (eb2.this.lite_interface || eb2.this.lite_switch == null) {
return;
}
eb2.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() {
eb2.this.lite_continue.loadUrl(eb2.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();
eb2.this.dismiss();
}
}
private e() {
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
mc2.lite_const("openSDK_LOG.AuthDialog", "-->onPageFinished, url: " + str);
eb2.this.lite_finally.setVisibility(8);
if (eb2.this.lite_continue != null) {
eb2.this.lite_continue.setVisibility(0);
}
if (TextUtils.isEmpty(str)) {
return;
}
eb2.this.lite_boolean.removeCallbacks((Runnable) eb2.this.f1513a.remove(str));
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
mc2.lite_const("openSDK_LOG.AuthDialog", "-->onPageStarted, url: " + str);
super.onPageStarted(webView, str, bitmap);
eb2.this.lite_finally.setVisibility(0);
eb2.this.lite_instanceof = SystemClock.elapsedRealtime();
if (!TextUtils.isEmpty(eb2.this.lite_transient)) {
eb2.this.lite_boolean.removeCallbacks((Runnable) eb2.this.f1513a.remove(eb2.this.lite_transient));
}
eb2.this.lite_transient = str;
eb2 eb2Var = eb2.this;
h hVar = new h(eb2Var.lite_transient);
eb2.this.f1513a.put(str, hVar);
eb2.this.lite_boolean.postDelayed(hVar, 120000L);
}
@Override
public void onReceivedError(WebView webView, int i, String str, String str2) {
super.onReceivedError(webView, i, str, str2);
mc2.lite_long("openSDK_LOG.AuthDialog", "-->onReceivedError, errorCode: " + i + " | description: " + str);
if (!hd2.lite_double(eb2.this.lite_strictfp)) {
eb2.this.lite_switch.lite_do(new rd2(ConnectionResult.RESOLUTION_REQUIRED, "当前网络不可用,请稍后重试!", str2));
eb2.this.dismiss();
return;
}
if (!eb2.this.lite_transient.startsWith("https://login.imgcache.qq.com/ptlogin/static/qzsjump.html?")) {
long elapsedRealtime = SystemClock.elapsedRealtime() - eb2.this.lite_instanceof;
if (eb2.this.lite_protected >= 1 || elapsedRealtime >= eb2.this.lite_synchronized) {
eb2.this.lite_continue.loadUrl(eb2.this.lite_for());
return;
} else {
eb2.lite_return(eb2.this);
eb2.this.lite_boolean.postDelayed(new a(), 500L);
return;
}
}
eb2.this.lite_switch.lite_do(new rd2(i, str, str2));
eb2.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("请求不合法,请检查手机安全设置,如系统时间、代理等");
mc2.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 = zw1.d;
str3 = NotifyOption.NOTIFY_OPTION;
}
AlertDialog.Builder builder = new AlertDialog.Builder(eb2.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;
mc2.lite_const("openSDK_LOG.AuthDialog", "-->Redirect URL: " + str);
if (str.startsWith("auth://browser")) {
JSONObject lite_static = hd2.lite_static(str);
eb2 eb2Var = eb2.this;
eb2Var.lite_interface = eb2Var.lite_super();
if (!eb2.this.lite_interface) {
if (lite_static.optString("fail_cb", null) != null) {
eb2.this.lite_byte(lite_static.optString("fail_cb"), "");
} else if (lite_static.optInt("fall_to_wv") == 1) {
eb2 eb2Var2 = eb2.this;
StringBuilder sb = new StringBuilder();
sb.append(eb2.this.lite_static);
sb.append(eb2.this.lite_static.indexOf("?") > -1 ? "&" : "?");
eb2Var2.lite_static = sb.toString();
eb2.this.lite_static = eb2.this.lite_static + "browser_error=1";
eb2.this.lite_continue.loadUrl(eb2.this.lite_static);
} else {
String optString = lite_static.optString("redir", null);
if (optString != null) {
eb2.this.lite_continue.loadUrl(optString);
}
}
}
return true;
}
if (str.startsWith("auth://tauth.qq.com/")) {
eb2.this.lite_switch.lite_if(hd2.lite_static(str));
eb2.this.dismiss();
return true;
}
if (str.startsWith(lb2.v0)) {
eb2.this.lite_switch.onCancel();
eb2.this.dismiss();
return true;
}
if (str.startsWith(lb2.w0)) {
eb2.this.dismiss();
return true;
}
if (!str.startsWith(lb2.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) {
eb2.this.lite_finally.setVisibility(8);
eb2.this.lite_continue.setVisibility(0);
} else if (intValue == 1) {
eb2.this.lite_finally.setVisibility(0);
}
return true;
}
if (!str.startsWith("auth://onLoginSubmit")) {
if (eb2.this.lite_volatile.lite_for(eb2.this.lite_continue, str)) {
return true;
}
mc2.lite_long("openSDK_LOG.AuthDialog", "-->Redirect URL: return false");
return false;
}
try {
List<String> pathSegments2 = Uri.parse(str).getPathSegments();
if (!pathSegments2.isEmpty()) {
eb2.this.lite_implements = pathSegments2.get(0);
}
} catch (Exception unused2) {
}
return true;
}
try {
if (str.startsWith(lb2.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);
eb2.this.lite_strictfp.startActivity(intent);
} catch (Exception e) {
mc2.lite_char("openSDK_LOG.AuthDialog", "-->start download activity exception, e: ", e);
}
return true;
}
public e(eb2 eb2Var, a aVar) {
this();
}
}
public class f implements pd2 {
private String lite_do;
public String lite_for;
public String lite_if;
private pd2 lite_int;
public f(String str, String str2, String str3, pd2 pd2Var) {
this.lite_do = str;
this.lite_if = str2;
this.lite_for = str3;
this.lite_int = pd2Var;
}
public void lite_int(String str) {
try {
lite_if(hd2.lite_throws(str));
} catch (JSONException e) {
e.printStackTrace();
lite_do(new rd2(-4, lb2.g, str));
}
}
@Override
public void lite_do(rd2 rd2Var) {
String str;
if (rd2Var.lite_if != null) {
str = rd2Var.lite_if + this.lite_if;
} else {
str = this.lite_if;
}
ic2.lite_if().lite_new(r5.lite_volatile(new StringBuilder(), this.lite_do, "_H5"), SystemClock.elapsedRealtime(), 0L, 0L, rd2Var.lite_do, str, false);
eb2.this.lite_new(str);
pd2 pd2Var = this.lite_int;
if (pd2Var != null) {
pd2Var.lite_do(rd2Var);
this.lite_int = null;
}
}
@Override
public void lite_if(Object obj) {
JSONObject jSONObject = (JSONObject) obj;
ic2.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);
pd2 pd2Var = this.lite_int;
if (pd2Var != null) {
pd2Var.lite_if(jSONObject);
this.lite_int = null;
}
}
@Override
public void onCancel() {
pd2 pd2Var = this.lite_int;
if (pd2Var != null) {
pd2Var.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;
}
eb2.lite_goto(eb2.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(eb2.this.lite_transient);
mc2.lite_const("openSDK_LOG.AuthDialog", b.toString());
if (this.lite_static.equals(eb2.this.lite_transient)) {
eb2.this.lite_switch.lite_do(new rd2(ConnectionResult.DRIVE_EXTERNAL_STORAGE_REQUIRED, "请求页面超时,请稍后重试!", eb2.this.lite_transient));
eb2.this.dismiss();
}
}
}
public eb2(Context context, String str, String str2, pd2 pd2Var, db2 db2Var) {
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, db2Var.lite_new(), pd2Var);
this.lite_boolean = new g(this.lite_switch, context.getMainLooper());
this.lite_throws = pd2Var;
this.lite_abstract = str;
this.lite_volatile = new md2();
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 = hd2.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);
mc2.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 kd2(), "SecureJsInterface");
kd2.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);
mc2.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 = hd2.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(eb2 eb2Var) {
int i = eb2Var.lite_protected;
eb2Var.lite_protected = i + 1;
return i;
}
public boolean lite_super() {
fb2 lite_do = fb2.lite_do();
String lite_int = lite_do.lite_int();
fb2.a aVar = new fb2.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 = hd2.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 hd2.lite_catch(this.lite_strictfp, str2);
}
private void lite_void() {
Button button = new Button(this.lite_strictfp);
this.lite_private = button;
button.setBackgroundDrawable(hd2.lite_if("h5_qr_back.png", this.lite_strictfp));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -2);
layoutParams.leftMargin = jb2.lite_do(this.lite_strictfp, 20.0f);
layoutParams.topMargin = jb2.lite_do(this.lite_strictfp, 10.0f);
this.lite_private.setLayoutParams(layoutParams);
this.lite_private.setOnClickListener(new a());
}
@Override
public void dismiss() {
this.f1513a.clear();
this.lite_boolean.removeCallbacksAndMessages(null);
try {
Context context = this.lite_strictfp;
if ((context instanceof Activity) && !((Activity) context).isFinishing() && isShowing()) {
super.dismiss();
mc2.lite_long("openSDK_LOG.AuthDialog", "-->dismiss dialog");
}
} catch (Exception e2) {
mc2.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.f1513a = new HashMap<>();
}
@Override
public void onStop() {
super.onStop();
}
}