HYDK v3.0.0版本的 MD5 值为:36b96e4c5561390bc72ab66c2f29a92f
以下内容为反编译后的 tb2.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.webkit.CookieSyncManager;
import android.webkit.WebSettings;
import com.getmessage.module_base.web.FileManager;
import com.tencent.open.utils.HttpUtils;
import org.json.JSONException;
import org.json.JSONObject;
public class tb2 extends fb2 {
private Activity lite_byte;
public class a implements kd2 {
private kd2 lite_do;
private String lite_for;
private String lite_if;
private Bundle lite_int;
private Activity lite_new;
public a(Activity activity, kd2 kd2Var, String str, String str2, Bundle bundle) {
this.lite_do = kd2Var;
this.lite_if = str;
this.lite_for = str2;
this.lite_int = bundle;
}
@Override
public void lite_do(md2 md2Var) {
StringBuilder b = r5.b("OpenApi, EncryptTokenListener() onError");
b.append(md2Var.lite_if);
hc2.lite_try("openSDK_LOG.SocialApiIml", b.toString());
this.lite_do.lite_do(md2Var);
}
@Override
public void lite_if(Object obj) {
String str;
try {
str = ((JSONObject) obj).getString(ub2.lite_switch);
} catch (JSONException e) {
e.printStackTrace();
hc2.lite_char("openSDK_LOG.SocialApiIml", "OpenApi, EncrytokenListener() onComplete error", e);
str = null;
}
this.lite_int.putString("encrytoken", str);
tb2 tb2Var = tb2.this;
tb2Var.lite_const(tb2Var.lite_byte, this.lite_if, this.lite_int, this.lite_for, this.lite_do);
if (TextUtils.isEmpty(str)) {
hc2.lite_try("openSDK_LOG.SocialApiIml", "The token get from qq or qzone is empty. Write temp token to localstorage.");
tb2.this.lite_while(this.lite_new);
}
}
@Override
public void onCancel() {
this.lite_do.onCancel();
}
}
public tb2(ya2 ya2Var) {
super(ya2Var);
}
private void lite_break(Activity activity, Intent intent, String str, Bundle bundle, String str2, kd2 kd2Var, boolean z) {
StringBuilder h = r5.h("-->handleIntent action = ", str, ", activityIntent = null ? ");
boolean z2 = true;
h.append(intent == null);
hc2.lite_long("openSDK_LOG.SocialApiIml", h.toString());
if (intent != null) {
lite_void(activity, intent, str, bundle, kd2Var);
return;
}
xc2 lite_int = xc2.lite_int(wc2.lite_do(), this.lite_if.lite_new());
if (!z && !lite_int.lite_else("C_LoginH5")) {
z2 = false;
}
if (z2) {
lite_class(activity, str, bundle, str2, kd2Var);
} else {
lite_try(activity, bundle, kd2Var);
}
}
private void lite_catch(Activity activity, String str, Bundle bundle, kd2 kd2Var) {
this.lite_byte = activity;
Intent lite_goto = lite_goto(ub2.f);
if (lite_goto == null) {
hc2.lite_long("openSDK_LOG.SocialApiIml", "--askgift--friend chooser not found");
lite_goto = lite_goto(ub2.lite_transient);
}
Intent intent = lite_goto;
bundle.putAll(lite_else());
if (ub2.lite_abstract.equals(str)) {
bundle.putString("type", "request");
} else if (ub2.lite_continue.equals(str)) {
bundle.putString("type", ub2.h);
}
lite_break(activity, intent, str, bundle, yc2.lite_do().lite_if(wc2.lite_do(), "https://login.imgcache.qq.com/open/mobile/request/sdk_request.html?"), kd2Var, false);
}
private void lite_class(Activity activity, String str, Bundle bundle, String str2, kd2 kd2Var) {
hc2.lite_long("openSDK_LOG.SocialApiIml", "-->handleIntentWithH5 action = " + str);
Intent lite_char = lite_char("com.tencent.open.agent.AgentActivity");
kd2 aVar = new a(activity, kd2Var, str, str2, bundle);
Intent lite_char2 = lite_char("com.tencent.open.agent.EncryTokenActivity");
if (lite_char2 != null && lite_char != null && lite_char.getComponent() != null && lite_char2.getComponent() != null && lite_char.getComponent().getPackageName().equals(lite_char2.getComponent().getPackageName())) {
lite_char2.putExtra("oauth_consumer_key", this.lite_if.lite_new());
lite_char2.putExtra("openid", this.lite_if.lite_case());
lite_char2.putExtra(gb2.lite_break, this.lite_if.lite_int());
lite_char2.putExtra(gb2.M, ub2.lite_volatile);
if (lite_case(lite_char2)) {
hc2.lite_long("openSDK_LOG.SocialApiIml", "-->handleIntentWithH5--found token activity");
hb2.lite_if().lite_byte(gb2.i0, aVar);
lite_new(activity, lite_char2, gb2.i0);
return;
}
return;
}
hc2.lite_long("openSDK_LOG.SocialApiIml", "-->handleIntentWithH5--token activity not found");
String lite_private = cd2.lite_private("tencent&sdk&qazxc***14969%%" + this.lite_if.lite_int() + this.lite_if.lite_new() + this.lite_if.lite_case() + "qzone3.4");
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(ub2.lite_switch, lite_private);
} catch (JSONException e) {
e.printStackTrace();
}
aVar.lite_if(jSONObject);
}
public void lite_const(Context context, String str, Bundle bundle, String str2, kd2 kd2Var) {
hc2.lite_const("openSDK_LOG.SocialApiIml", "OpenUi, showDialog --start");
CookieSyncManager.createInstance(context);
bundle.putString("oauth_consumer_key", this.lite_if.lite_new());
if (this.lite_if.lite_else()) {
bundle.putString(gb2.lite_break, this.lite_if.lite_int());
}
String lite_case = this.lite_if.lite_case();
if (lite_case != null) {
bundle.putString("openid", lite_case);
}
try {
bundle.putString(gb2.lite_return, wc2.lite_do().getSharedPreferences(gb2.lite_switch, 0).getString(gb2.lite_return, gb2.lite_short));
} catch (Exception e) {
e.printStackTrace();
bundle.putString(gb2.lite_return, gb2.lite_short);
}
StringBuilder b = r5.b(str2);
b.append(HttpUtils.lite_try(bundle));
String sb = b.toString();
hc2.lite_try("openSDK_LOG.SocialApiIml", "OpenUi, showDialog TDialog");
if (!ub2.lite_package.equals(str) && !ub2.lite_private.equals(str)) {
new wb2(this.lite_byte, str, sb, kd2Var, this.lite_if).show();
} else {
hc2.lite_try("openSDK_LOG.SocialApiIml", "OpenUi, showDialog PKDialog");
new fc2(this.lite_byte, str, sb, kd2Var, this.lite_if).show();
}
}
private void lite_void(Activity activity, Intent intent, String str, Bundle bundle, kd2 kd2Var) {
hc2.lite_long("openSDK_LOG.SocialApiIml", "-->handleIntentWithAgent action = " + str);
intent.putExtra(gb2.M, str);
intent.putExtra(gb2.L, bundle);
hb2.lite_if().lite_byte(gb2.h0, kd2Var);
lite_new(activity, intent, gb2.h0);
}
@Override
public Intent lite_char(String str) {
Intent intent = new Intent();
intent.setClassName("com.qzone", str);
Intent intent2 = new Intent();
intent2.setClassName("com.tencent.mobileqq", str);
Intent intent3 = new Intent();
intent3.setClassName(gb2.lite_int, str);
if (cd2.lite_default(wc2.lite_do()) && zc2.lite_char(wc2.lite_do(), intent3)) {
return intent3;
}
if (zc2.lite_char(wc2.lite_do(), intent2) && zc2.lite_void(wc2.lite_do(), "4.7") >= 0) {
return intent2;
}
if (zc2.lite_char(wc2.lite_do(), intent) && zc2.lite_if(zc2.lite_byte(wc2.lite_do(), "com.qzone"), "4.2") >= 0 && zc2.lite_else(wc2.lite_do(), intent.getComponent().getPackageName(), gb2.lite_char)) {
return intent;
}
return null;
}
public void lite_float(Activity activity, Bundle bundle, kd2 kd2Var) {
lite_catch(activity, ub2.lite_abstract, bundle, kd2Var);
}
public void lite_short(Activity activity, Bundle bundle, kd2 kd2Var) {
lite_catch(activity, ub2.lite_continue, bundle, kd2Var);
}
public void lite_super(Activity activity, Bundle bundle, kd2 kd2Var) {
this.lite_byte = activity;
Intent lite_goto = lite_goto(ub2.f);
if (lite_goto == null) {
hc2.lite_long("openSDK_LOG.SocialApiIml", "--invite--friend chooser not found");
lite_goto = lite_goto(ub2.lite_synchronized);
}
bundle.putAll(lite_else());
lite_break(activity, lite_goto, ub2.lite_finally, bundle, yc2.lite_do().lite_if(wc2.lite_do(), "https://login.imgcache.qq.com/open/mobile/invite/sdk_invite.html?"), kd2Var, false);
}
public void lite_throw(Activity activity, Bundle bundle, kd2 kd2Var) {
this.lite_byte = activity;
Intent lite_goto = lite_goto(ub2.f1542a);
bundle.putAll(lite_else());
lite_break(activity, lite_goto, ub2.lite_extends, bundle, yc2.lite_do().lite_if(wc2.lite_do(), "https://login.imgcache.qq.com/open/mobile/sendstory/sdk_sendstory_v1.3.html?"), kd2Var, false);
}
@SuppressLint({"SetJavaScriptEnabled"})
public void lite_while(Context context) {
String str;
String lite_int = this.lite_if.lite_int();
String lite_new = this.lite_if.lite_new();
String lite_case = this.lite_if.lite_case();
if (lite_int == null || lite_int.length() <= 0 || lite_new == null || lite_new.length() <= 0 || lite_case == null || lite_case.length() <= 0) {
str = null;
} else {
str = cd2.lite_private("tencent&sdk&qazxc***14969%%" + lite_int + lite_new + lite_case + "qzone3.4");
}
com.tencent.open.b.b bVar = new com.tencent.open.b.b(context);
WebSettings settings = bVar.getSettings();
settings.setDomStorageEnabled(true);
settings.setJavaScriptEnabled(true);
settings.setDatabaseEnabled(true);
String str2 = "<!DOCTYPE HTML><html lang=\"en-US\"><head><meta charset=\"UTF-8\"><title>localStorage Test</title><script type=\"text/javascript\">document.domain = 'qq.com';localStorage[\"" + this.lite_if.lite_case() + "_" + this.lite_if.lite_new() + "\"]=\"" + str + "\";</script></head><body></body></html>";
String lite_if = yc2.lite_do().lite_if(context, "https://login.imgcache.qq.com");
bVar.loadDataWithBaseURL(lite_if, str2, wy1.lite_new, FileManager.CODE_ENCODING, lite_if);
}
public tb2(bb2 bb2Var, ya2 ya2Var) {
super(bb2Var, ya2Var);
}
}