OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.excelliance.kxqp.pay.share;
import android.app.Dialog;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import com.excelliance.kxqp.GameUtil;
import com.excelliance.kxqp.VersionManager;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.util.CustomNoticeDialogUtil;
import com.excelliance.kxqp.util.aj;
import com.excelliance.staticslio.StatisticsManager;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.client.utils.URLEncodedUtils;
import org.json.JSONObject;
public class b {
private static b f12680a;
private b() {
}
public static b a() {
if (f12680a == null) {
synchronized (b.class) {
if (f12680a == null) {
f12680a = new b();
}
}
}
return f12680a;
}
public a a(Context context, String str) {
a a2 = a(context);
a2.b(str);
return a2;
}
public a a(Context context, String str, String str2) {
a a2 = a(context);
a2.g(str);
a2.b(str2);
return a2;
}
public a a(Context context) {
a aVar = new a();
GameUtil intance = GameUtil.getIntance();
intance.q(context);
VersionManager versionManager = VersionManager.getInstance();
versionManager.a(context);
aVar.d(String.valueOf(GameUtil.f(context)));
aVar.k(String.valueOf(GameUtil.g(context)));
aVar.l(GameUtil.h(context));
aVar.m(versionManager.l());
aVar.n(String.valueOf(intance.m()));
aVar.o(String.valueOf(GameUtil.d(context)));
aVar.p(String.valueOf(GameUtil.e(context)));
aVar.j(versionManager.f());
aVar.a(aj.a().a(context));
aVar.h(com.excelliance.kxqp.pay.ali.b.c(context));
aVar.i(com.excelliance.kxqp.pay.ali.b.k(context));
aVar.e(a().d(context));
return aVar;
}
public com.excelliance.kxqp.pay.ali.a b(Context context) throws Exception {
JSONObject jSONObject;
int optInt;
com.excelliance.kxqp.pay.ali.a aVar = new com.excelliance.kxqp.pay.ali.a();
GameUtil intance = GameUtil.getIntance();
intance.q(context);
VersionManager versionManager = VersionManager.getInstance();
versionManager.a(context);
StringBuilder sb = new StringBuilder("http://mto.multiopen.cn/alipayregrequest.php");
a(sb, "?sdkver=", Integer.valueOf(GameUtil.f(context)));
a(sb, "&vc=", Integer.valueOf(GameUtil.g(context)));
a(sb, "&vn=", GameUtil.h(context));
a(sb, "&compver=", versionManager.l());
a(sb, "&mainver=", intance.m());
a(sb, "&chid=", Integer.valueOf(GameUtil.d(context)));
a(sb, "&subchid=", Integer.valueOf(GameUtil.e(context)));
a(sb, "&uid=", versionManager.f());
a(sb, "&aid=", com.excelliance.kxqp.pay.ali.b.c(context));
a(sb, "&im=", com.excelliance.kxqp.pay.ali.b.k(context));
a(sb, "&new=", "1");
a(sb, "&rid=", aj.a().a(context));
Log.d("ShareUtil", "url:" + sb.toString());
String a2 = bd.a(sb.toString(), 15000, 15000);
Log.d("ShareUtil", "result:_" + a2);
if (!TextUtils.isEmpty(a2)) {
JSONObject jSONObject2 = new JSONObject(com.excelliance.kxqp.pay.ali.b.c(a2, "utf-8"));
if (jSONObject2.length() > 0) {
String optString = jSONObject2.optString("alipay");
if (!TextUtils.isEmpty(optString) && (optInt = (jSONObject = new JSONObject(optString)).optInt("status")) != 0) {
aVar.b(jSONObject.optInt("type"));
aVar.a(optInt);
}
} else {
Log.d("ShareUtil", "jsonObject is null");
}
}
return aVar;
}
public List<Integer> c(Context context) throws Exception {
ArrayList arrayList = new ArrayList();
GameUtil intance = GameUtil.getIntance();
intance.q(context);
VersionManager versionManager = VersionManager.getInstance();
versionManager.a(context);
StringBuilder sb = new StringBuilder("http://mto.multiopen.cn/apliaytrial.php");
a(sb, "?sdkver=", Integer.valueOf(GameUtil.f(context)));
a(sb, "&vc=", Integer.valueOf(GameUtil.g(context)));
a(sb, "&vn=", GameUtil.h(context));
a(sb, "&compver=", versionManager.l());
a(sb, "&mainver=", intance.m());
a(sb, "&chid=", Integer.valueOf(GameUtil.d(context)));
a(sb, "&subchid=", Integer.valueOf(GameUtil.e(context)));
a(sb, "&uid=", versionManager.f());
a(sb, "&aid=", com.excelliance.kxqp.pay.ali.b.c(context));
a(sb, "&im=", com.excelliance.kxqp.pay.ali.b.k(context));
a(sb, "&rid=", aj.a().a(context));
Log.d("ShareUtil", "url:" + sb.toString());
String a2 = bd.a(sb.toString(), 15000, 15000);
Log.d("ShareUtil", "result:_" + a2);
if (!TextUtils.isEmpty(a2)) {
JSONObject jSONObject = new JSONObject(a2);
if (jSONObject.length() > 0) {
String optString = jSONObject.optString("free");
if (!TextUtils.isEmpty(optString)) {
JSONObject jSONObject2 = new JSONObject(optString);
int optInt = jSONObject2.optInt("status");
int optInt2 = jSONObject2.optInt("time");
int optInt3 = jSONObject2.optInt("flag");
arrayList.add(Integer.valueOf(optInt));
arrayList.add(Integer.valueOf(optInt2));
arrayList.add(Integer.valueOf(optInt3));
}
} else {
Log.d("ShareUtil", "jsonObject is null");
}
}
return arrayList;
}
public HttpURLConnection a(String str) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setRequestProperty("Content-Type", URLEncodedUtils.CONTENT_TYPE);
return httpURLConnection;
} catch (Exception unused) {
return null;
}
}
public a a(a aVar) throws Exception {
a aVar2 = new a();
StringBuilder sb = new StringBuilder("http://mto.multiopen.cn/alipayshare.php");
a(sb, "?otaver=", aVar.f());
a(sb, "&vc=", aVar.m());
a(sb, "&vn=", aVar.n());
a(sb, "&compver=", aVar.o());
a(sb, "&mainver=", aVar.p());
a(sb, "&chid=", aVar.q());
a(sb, "&subchid=", aVar.r());
a(sb, "&uid=", aVar.l());
a(sb, "&im=", aVar.k());
a(sb, "&aid=", aVar.j());
a(sb, "&code=", aVar.g());
a(sb, "&type=", aVar.getType());
a(sb, "&rid=", aVar.d());
String sb2 = sb.toString();
Log.d("ShareUtil", "share url>>" + sb2);
String a2 = bd.a(sb2, 15000, 15000);
Log.d("ShareUtil", "result>>" + a2);
if (!TextUtils.isEmpty(a2)) {
JSONObject jSONObject = new JSONObject(a2);
if (jSONObject.length() > 0) {
String optString = jSONObject.optString("sharepay");
if (!TextUtils.isEmpty(optString)) {
JSONObject jSONObject2 = new JSONObject(optString);
String optString2 = jSONObject2.optString("code");
String optString3 = jSONObject2.optString("isin");
String optString4 = jSONObject2.optString("snum");
String optString5 = jSONObject2.optString("msg");
int optInt = jSONObject2.optInt("sign", 3);
int optInt2 = jSONObject2.optInt("time");
int optInt3 = jSONObject2.optInt(RankingItem.KEY_UPDATE);
Log.d("ShareUtil", "shareMsg:" + optString5);
aVar2.b(optInt);
aVar2.c(optInt2);
aVar2.a(optInt3);
if (!TextUtils.isEmpty(optString2)) {
aVar2.e(optString2);
}
if (!TextUtils.isEmpty(optString3)) {
if (optString3.equals("1")) {
aVar2.a(true);
} else {
aVar2.a(false);
}
}
if (!TextUtils.isEmpty(optString4)) {
aVar2.f(optString4);
}
if (!TextUtils.isEmpty(optString5)) {
aVar2.c(optString5);
}
}
} else {
Log.d("ShareUtil", "jsonObject is null");
}
}
return aVar2;
}
private StringBuilder a(StringBuilder sb, String str, Object obj) {
if (sb == null || TextUtils.isEmpty(str) || TextUtils.isEmpty(String.valueOf(obj)) || String.valueOf(obj).equalsIgnoreCase("null")) {
return sb;
}
sb.append(str + obj);
return sb;
}
private StringBuilder a(StringBuilder sb, String str, String str2) {
if (sb == null || TextUtils.isEmpty(str) || TextUtils.isEmpty(str2) || str2.equalsIgnoreCase("null")) {
return sb;
}
sb.append(str + str2);
return sb;
}
public String d(Context context) {
return context.getSharedPreferences("alipay", Build.VERSION.SDK_INT < 11 ? 0 : 4).getString("share_code", null);
}
public boolean e(Context context) {
String k = com.excelliance.kxqp.pay.ali.b.k(context);
Log.d("ShareUtil", "imei:" + k);
if (!TextUtils.isEmpty(k)) {
try {
if (Long.parseLong(k) != 0) {
return true;
}
} catch (Exception unused) {
return true;
}
}
Dialog a2 = CustomNoticeDialogUtil.a(context, String.format(com.excelliance.kxqp.swipe.a.a.getString(context, "open_imei_dialog"), com.excelliance.kxqp.swipe.a.a.getString(context, "app_name")), true, null, com.excelliance.kxqp.swipe.a.a.getString(context, "share_register_but"), new CustomNoticeDialogUtil.b() {
@Override
public void a(Dialog dialog) {
}
@Override
public void b(Dialog dialog) {
if (dialog == null || !dialog.isShowing()) {
return;
}
dialog.dismiss();
}
});
if (a2 != null && a2.isShowing()) {
a2.dismiss();
}
if (a2 != null) {
a2.setCanceledOnTouchOutside(false);
a2.show();
}
return false;
}
public String b() {
return a("109,122,109,113,117,116,105,98,115,102", 1);
}
public String a(String str, int i) {
StringBuffer stringBuffer = new StringBuffer();
for (String str2 : str.split(StatisticsManager.COMMA)) {
stringBuffer.append((char) (Integer.parseInt(str2) - i));
}
return stringBuffer.toString();
}
}