HYDK v3.0.0版本的 MD5 值为:36b96e4c5561390bc72ab66c2f29a92f
以下内容为反编译后的 vb2.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import com.alipay.sdk.app.OpenAuthTask;
import com.tencent.open.utils.HttpUtils;
import org.json.JSONObject;
import p.a.y.e.a.s.e.net.fb2;
public class vb2 extends fb2 {
public static final String lite_byte = "fopen_id";
public static final String lite_case = "friend_label";
public static final String lite_char = "add_msg";
public static final String lite_else = "unionid";
public static final String lite_goto = "union_name";
public static final String lite_long = "zoneid";
public static final String lite_this = "signature";
public class a implements kd2 {
public final kd2 lite_do;
public a(kd2 kd2Var) {
this.lite_do = kd2Var;
}
@Override
public void lite_do(md2 md2Var) {
hc2.lite_const("openSDK_LOG.GameAppOperation", "-->unbindQQGroup, error: " + md2Var);
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
kd2Var.lite_do(md2Var);
}
}
@Override
public void lite_if(Object obj) {
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->unbind group resp is: " + obj);
if (obj == null) {
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
r5.q(OpenAuthTask.lite_char, "服务端错误,请稍后重试", "资格检查回包为null。", kd2Var);
return;
}
return;
}
JSONObject jSONObject = (JSONObject) obj;
kd2 kd2Var2 = this.lite_do;
if (kd2Var2 != null) {
kd2Var2.lite_if(jSONObject);
}
}
@Override
public void onCancel() {
}
}
public class b implements kd2 {
public final kd2 lite_do;
public final Intent lite_for;
public final Activity lite_if;
public b(kd2 kd2Var, Activity activity, Intent intent) {
this.lite_do = kd2Var;
this.lite_if = activity;
this.lite_for = intent;
}
@Override
public void lite_do(md2 md2Var) {
hc2.lite_const("openSDK_LOG.GameAppOperation", "-->joinQQGroup, error: " + md2Var);
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
kd2Var.lite_do(md2Var);
}
}
@Override
public void lite_if(Object obj) {
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->join group resp is: " + obj);
if (obj == null) {
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
r5.q(OpenAuthTask.lite_char, "服务端错误,请稍后重试", "资格检查回包为null。", kd2Var);
return;
}
return;
}
if (((JSONObject) obj).optInt("bind") == 1) {
try {
vb2.this.lite_int(this.lite_if, gb2.s0, this.lite_for, false);
return;
} catch (Exception e) {
hc2.lite_char("openSDK_LOG.GameAppOperation", "-->join group, start activity exception.", e);
vb2.this.lite_this(this.lite_if);
return;
}
}
kd2 kd2Var2 = this.lite_do;
if (kd2Var2 != null) {
r5.q(3003, "该组织未绑群,无法加入", "该组织未绑群,无法加入。", kd2Var2);
}
}
@Override
public void onCancel() {
}
}
public class c implements kd2 {
public final kd2 lite_do;
public final Intent lite_for;
public final Activity lite_if;
public c(kd2 kd2Var, Activity activity, Intent intent) {
this.lite_do = kd2Var;
this.lite_if = activity;
this.lite_for = intent;
}
@Override
public void lite_do(md2 md2Var) {
hc2.lite_const("openSDK_LOG.GameAppOperation", "-->bindQQGroup, error: " + md2Var);
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
kd2Var.lite_do(md2Var);
}
}
@Override
public void lite_if(Object obj) {
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->bind group resp is: " + obj);
if (obj == null) {
kd2 kd2Var = this.lite_do;
if (kd2Var != null) {
r5.q(OpenAuthTask.lite_char, "服务端错误,请稍后重试", "资格检查回包为null。", kd2Var);
return;
}
return;
}
if (((JSONObject) obj).optInt("bind") != 1) {
try {
vb2.this.lite_int(this.lite_if, gb2.t0, this.lite_for, false);
return;
} catch (Exception e) {
hc2.lite_char("openSDK_LOG.GameAppOperation", "-->bind group, start activity exception.", e);
vb2.this.lite_this(this.lite_if);
return;
}
}
kd2 kd2Var2 = this.lite_do;
if (kd2Var2 != null) {
r5.q(3002, "该群已绑定!", "绑定过的群不能再次绑定。", kd2Var2);
}
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->bindQQGroup() binded return.");
}
@Override
public void onCancel() {
}
}
public vb2(ya2 ya2Var) {
super(ya2Var);
}
public void lite_this(Activity activity) {
lite_void(activity, "");
}
private void lite_void(Activity activity, String str) {
new wb2(activity, "", lite_for(str), null, this.lite_if).show();
}
public void lite_const(Activity activity, String str, String str2, kd2 kd2Var) {
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->bindQQGroup() -- start");
if (activity == null) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, activity is empty.");
if (kd2Var != null) {
r5.q(1001, "param acitivty is null", "activity param of api can not be null.", kd2Var);
return;
}
return;
}
StringBuffer stringBuffer = new StringBuffer("mqqapi://opensdk/bind_group?src_type=app&version=1");
String lite_new = this.lite_if.lite_new();
if (TextUtils.isEmpty(lite_new)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, appId is empty.");
if (kd2Var != null) {
r5.q(1003, "appid is null", "please login.", kd2Var);
return;
}
return;
}
String lite_case2 = this.lite_if.lite_case();
if (TextUtils.isEmpty(lite_case2)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, openid is empty.");
if (kd2Var != null) {
r5.q(1004, "openid params is null", "please login.", kd2Var);
return;
}
return;
}
String lite_case3 = cd2.lite_case(activity);
if (TextUtils.isEmpty(lite_case3)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, appname is empty.");
if (kd2Var != null) {
r5.q(1005, "appName params is null", "", kd2Var);
return;
}
return;
}
if (TextUtils.isEmpty(str)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, organization id is empty.");
if (kd2Var != null) {
r5.q(1006, "organizationId params is null", "", kd2Var);
return;
}
return;
}
if (TextUtils.isEmpty(str2)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->bindQQGroup, organization name is empty.");
if (kd2Var != null) {
r5.q(1007, "organizationName params is null", "", kd2Var);
return;
}
return;
}
StringBuilder b2 = r5.b("&app_name=");
b2.append(Base64.encodeToString(cd2.lite_implements(lite_case3), 2));
stringBuffer.append(b2.toString());
stringBuffer.append("&organization_id=" + Base64.encodeToString(cd2.lite_implements(str), 2));
stringBuffer.append("&organization_name=" + Base64.encodeToString(cd2.lite_implements(str2), 2));
stringBuffer.append("&openid=" + Base64.encodeToString(cd2.lite_implements(lite_case2), 2));
stringBuffer.append("&appid=" + Base64.encodeToString(cd2.lite_implements(lite_new), 2));
stringBuffer.append("&sdk_version=" + Base64.encodeToString(cd2.lite_implements(gb2.lite_else), 2));
hc2.lite_const("openSDK_LOG.GameAppOperation", "-->bindQQGroup, url: " + stringBuffer.toString());
Uri parse = Uri.parse(stringBuffer.toString());
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(parse);
if (lite_case(intent) && zc2.lite_void(activity, "8.1.0") >= 0) {
c cVar = new c(kd2Var, activity, intent);
Bundle lite_if = lite_if();
lite_if.putString("appid", lite_new);
lite_if.putString("orgid", str);
HttpUtils.lite_long(this.lite_if, activity, "https://openmobile.qq.com/cgi-bin/qunopensdk/check_group", lite_if, gb2.G, new fb2.a(cVar));
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->bindQQGroup() do.");
return;
}
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->bind group, there is no activity, show download page.");
lite_this(activity);
}
public void lite_final(Activity activity, String str, kd2 kd2Var) {
hc2.lite_long("openSDK_LOG.GameAppOperation", "joinQQGroup()");
if (activity == null) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->joinGroup, activity is empty.");
if (kd2Var != null) {
r5.q(1001, "param acitivty is null", "activity param of api can not be null.", kd2Var);
return;
}
return;
}
if (TextUtils.isEmpty(str)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->joinGroup, params is empty.");
if (kd2Var != null) {
r5.q(1006, "param organizationId is null", "organizationId param of api can not be null.", kd2Var);
return;
}
return;
}
Intent intent = new Intent();
String lite_new = this.lite_if.lite_new();
if (TextUtils.isEmpty(lite_new)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->joinGroup, appid is empty.");
if (kd2Var != null) {
r5.q(1003, "appid is null", "appid is null, please login.", kd2Var);
return;
}
return;
}
String lite_case2 = this.lite_if.lite_case();
if (TextUtils.isEmpty(lite_case2)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->joinGroup, openid is empty.");
if (kd2Var != null) {
r5.q(1004, "openid is null", "openid is null, please login.", kd2Var);
return;
}
return;
}
StringBuffer stringBuffer = new StringBuffer("mqqapi://opensdk/join_group?src_type=app&version=1");
StringBuilder b2 = r5.b("&openid=");
b2.append(Base64.encodeToString(cd2.lite_implements(lite_case2), 2));
stringBuffer.append(b2.toString());
stringBuffer.append("&appid=" + Base64.encodeToString(cd2.lite_implements(lite_new), 2));
stringBuffer.append("&organization_id=" + Base64.encodeToString(cd2.lite_implements(str), 2));
stringBuffer.append("&sdk_version=" + Base64.encodeToString(cd2.lite_implements(gb2.lite_else), 2));
intent.setData(Uri.parse(stringBuffer.toString()));
if (lite_case(intent) && zc2.lite_void(activity, "8.1.0") >= 0) {
b bVar = new b(kd2Var, activity, intent);
Bundle lite_if = lite_if();
lite_if.putString("appid", lite_new);
lite_if.putString("orgid", str);
HttpUtils.lite_long(this.lite_if, activity, "https://openmobile.qq.com/cgi-bin/qunopensdk/check_group", lite_if, gb2.G, new fb2.a(bVar));
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->joinQQGroup() do.");
return;
}
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->bind group, there is no activity, show download page.");
lite_this(activity);
}
public void lite_float(Activity activity, Bundle bundle) {
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->makeFriend() -- start");
if (bundle == null) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->makeFriend params is null");
ac2.lite_do().lite_for(this.lite_if.lite_case(), this.lite_if.lite_new(), gb2.o1, "14", "18", "1");
return;
}
String string = bundle.getString(lite_byte);
if (TextUtils.isEmpty(string)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->make friend, fOpenid is empty.");
ac2.lite_do().lite_for(this.lite_if.lite_case(), this.lite_if.lite_new(), gb2.o1, "14", "18", "1");
return;
}
String string2 = bundle.getString(lite_case);
String string3 = bundle.getString(lite_char);
String lite_case2 = cd2.lite_case(activity);
String lite_case3 = this.lite_if.lite_case();
String lite_new = this.lite_if.lite_new();
StringBuilder j = r5.j("-->make friend, fOpenid: ", string, " | label: ", string2, " | message: ");
r5.L(j, string3, " | openid: ", lite_case3, " | appid:");
j.append(lite_new);
hc2.lite_const("openSDK_LOG.GameAppOperation", j.toString());
StringBuffer stringBuffer = new StringBuffer("mqqapi://gamesdk/add_friend?src_type=app&version=1");
StringBuilder b2 = r5.b("&fopen_id=");
b2.append(Base64.encodeToString(cd2.lite_implements(string), 2));
stringBuffer.append(b2.toString());
if (!TextUtils.isEmpty(lite_case3)) {
r5.A(lite_case3, 2, r5.b("&open_id="), stringBuffer);
}
if (!TextUtils.isEmpty(lite_new)) {
stringBuffer.append("&app_id=" + lite_new);
}
if (!TextUtils.isEmpty(string2)) {
r5.A(string2, 2, r5.b("&friend_label="), stringBuffer);
}
if (!TextUtils.isEmpty(string3)) {
r5.A(string3, 2, r5.b("&add_msg="), stringBuffer);
}
if (!TextUtils.isEmpty(lite_case2)) {
r5.A(lite_case2, 2, r5.b("&app_name="), stringBuffer);
}
StringBuilder b3 = r5.b("-->make friend, url: ");
b3.append(stringBuffer.toString());
hc2.lite_const("openSDK_LOG.GameAppOperation", b3.toString());
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(stringBuffer.toString()));
if (lite_case(intent) && !cd2.lite_continue(activity, "5.1.0")) {
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->makeFriend target activity found, qqver greater than 5.1.0");
try {
activity.startActivity(intent);
ac2.lite_do().lite_for(this.lite_if.lite_case(), this.lite_if.lite_new(), gb2.o1, "14", "18", "0");
} catch (Exception e) {
hc2.lite_char("openSDK_LOG.GameAppOperation", "-->make friend, start activity exception.", e);
lite_this(activity);
ac2.lite_do().lite_for(this.lite_if.lite_case(), this.lite_if.lite_new(), gb2.o1, "14", "18", "1");
}
} else {
hc2.lite_float("openSDK_LOG.GameAppOperation", "-->make friend, there is no activity.");
lite_this(activity);
ac2.lite_do().lite_for(this.lite_if.lite_case(), this.lite_if.lite_new(), gb2.o1, "14", "18", "1");
}
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->makeFriend() -- end");
}
public void lite_short(Context context, String str, kd2 kd2Var) {
hc2.lite_long("openSDK_LOG.GameAppOperation", "unBindQQGroup()");
if (context == null) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->uinBindGroup, activity is empty.");
if (kd2Var != null) {
r5.q(1001, "param acitivty is null", "activity param of api can not be null.", kd2Var);
return;
}
return;
}
if (TextUtils.isEmpty(str)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->unBindGroup, params is empty.");
if (kd2Var != null) {
r5.q(1006, "param organizationId is null", "organizationId param of api can not be null.", kd2Var);
return;
}
return;
}
String lite_new = this.lite_if.lite_new();
if (TextUtils.isEmpty(lite_new)) {
hc2.lite_case("openSDK_LOG.GameAppOperation", "-->unBindGroup, appid is empty.");
if (kd2Var != null) {
r5.q(1003, "param appId is null", "appid is null please login.", kd2Var);
return;
}
return;
}
a aVar = new a(kd2Var);
Bundle lite_if = lite_if();
lite_if.putString("appid", lite_new);
lite_if.putString("orgid", str);
HttpUtils.lite_long(this.lite_if, context, "https://openmobile.qq.com/cgi-bin/qunopensdk/unbind", lite_if, gb2.G, new fb2.a(aVar));
hc2.lite_long("openSDK_LOG.GameAppOperation", "-->unBindQQGroup() do.");
}
}