正在查看: 用信花 v1.1.3 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 用信花 v1.1.3 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package h1;
import android.content.Context;
import android.os.SystemClock;
import android.util.Base64;
import cn.com.chinatelecom.account.api.CtAuth;
import cn.com.chinatelecom.account.api.CtSetting;
import cn.com.chinatelecom.account.api.ResultListener;
import com.chuanglan.shanyan_sdk.listener.AuthCallbacks;
import com.cmic.gen.sdk.auth.GenAuthnHelper;
import com.cmic.gen.sdk.auth.GenTokenListener;
import com.sdk.base.api.CallBack;
import com.sdk.base.api.ToolUtils;
import com.sdk.base.module.manager.SDKManager;
import com.sdk.mobile.manager.oauth.cucc.OauthManager;
import i1.v;
import java.util.concurrent.ExecutorService;
import org.json.JSONException;
import org.json.JSONObject;
public class c {
public static volatile c f3895k;
public Context f3896a;
public AuthCallbacks f3897b;
public String f3898c;
public String f3899d;
public d f3900e = new d(this, null);
public ExecutorService f3901f;
public String f3902g;
public long f3903h;
public long f3904i;
public long f3905j;
public class a implements Runnable {
public final int f3906a;
public final long f3907b;
public final long f3908c;
public final long f3909d;
public a(int i4, long j4, long j5, long j6) {
this.f3906a = i4;
this.f3907b = j4;
this.f3908c = j5;
this.f3909d = j6;
}
@Override
public void run() {
try {
i1.f.c(c.this.f3896a, new String[]{f0.f.f3717b, "android.permission.ACCESS_WIFI_STATE", "android.permission.CHANGE_NETWORK_STATE", "android.permission.CHANGE_WIFI_STATE", z3.m.N});
i1.o.c(c1.d.f1118e, "authStart processName", Integer.valueOf(this.f3906a), "INIT_STATUS", Integer.valueOf(c1.a.f1084z.get()));
if (c1.a.f1084z.get() != 0) {
c.b().d(this.f3906a, this.f3907b, this.f3908c, this.f3909d);
} else if (c1.c.f1113c == v.e(c.this.f3896a, c1.f.f1185g, c1.c.f1112b)) {
c1.a.f1054j0 = false;
AuthCallbacks authCallbacks = c.this.f3897b;
c1.b bVar = c1.b.ACCOUNT_DISABLED_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d(), this.f3906a, f.a().j(c.this.f3896a), this.f3907b, this.f3908c, this.f3909d);
} else {
l.c().f(this.f3906a, this.f3907b, this.f3908c);
}
} catch (Exception e4) {
e4.printStackTrace();
i1.o.e(c1.d.f1116c, "authStart Exception", e4);
AuthCallbacks authCallbacks2 = c.this.f3897b;
c1.b bVar2 = c1.b.SDK_EXCEPTION_CODE;
authCallbacks2.authFailed(bVar2.a(), bVar2.b(), bVar2.c(), bVar2.d() + ":authStart--Exception_e=" + e4, this.f3906a, f.a().j(c.this.f3896a), this.f3907b, this.f3908c, this.f3909d);
}
}
}
public class b implements ResultListener {
public final String f3911a;
public final String f3912b;
public final long f3913c;
public final long f3914d;
public final long f3915e;
public final int f3916f;
public b(String str, String str2, long j4, long j5, long j6, int i4) {
this.f3911a = str;
this.f3912b = str2;
this.f3913c = j4;
this.f3914d = j5;
this.f3915e = j6;
this.f3916f = i4;
}
@Override
public void onResult(String str) {
AuthCallbacks authCallbacks;
int a4;
String c4;
int i4;
String str2;
long j4;
long j5;
long j6;
try {
if (!i1.e.h(str)) {
AuthCallbacks authCallbacks2 = c.this.f3897b;
c1.b bVar = c1.b.AUTH_TOKEN_FAILED_CODE;
authCallbacks2.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d() + "s isEmpty", this.f3916f, this.f3911a, this.f3913c, this.f3914d, this.f3915e);
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt(c1.e.f1153o);
String optString = jSONObject.optString(c1.e.f1155p);
if (optInt == 0) {
JSONObject optJSONObject = jSONObject.optJSONObject(c1.e.f1156q);
if (optJSONObject != null) {
String optString2 = optJSONObject.optString(c1.e.f1158r);
String optString3 = optJSONObject.optString(c1.e.f1160s);
if (i1.e.h(optString2) && i1.e.h(optString3)) {
c.this.j(this.f3911a, optString2, optString3, this.f3912b, this.f3913c, this.f3914d, this.f3915e);
return;
}
authCallbacks = c.this.f3897b;
c1.b bVar2 = c1.b.AUTH_TOKEN_FAILED_CODE;
a4 = bVar2.a();
c4 = bVar2.c();
i4 = this.f3916f;
str2 = this.f3911a;
j4 = this.f3913c;
j5 = this.f3914d;
j6 = this.f3915e;
} else {
authCallbacks = c.this.f3897b;
c1.b bVar3 = c1.b.AUTH_TOKEN_FAILED_CODE;
a4 = bVar3.a();
c4 = bVar3.c();
i4 = this.f3916f;
str2 = this.f3911a;
j4 = this.f3913c;
j5 = this.f3914d;
j6 = this.f3915e;
}
} else {
authCallbacks = c.this.f3897b;
c1.b bVar4 = c1.b.AUTH_TOKEN_FAILED_CODE;
a4 = bVar4.a();
c4 = bVar4.c();
i4 = this.f3916f;
str2 = this.f3911a;
j4 = this.f3913c;
j5 = this.f3914d;
j6 = this.f3915e;
}
authCallbacks.authFailed(a4, optInt, c4, optString, i4, str2, j4, j5, j6);
} catch (JSONException e4) {
e4.printStackTrace();
i1.o.e(c1.d.f1116c, "mCTCCAuth Exception", e4);
AuthCallbacks authCallbacks3 = c.this.f3897b;
c1.b bVar5 = c1.b.SDK_EXCEPTION_CODE;
authCallbacks3.authFailed(bVar5.a(), bVar5.b(), bVar5.c(), bVar5.d() + "mCTCCAuth--Exception_e=" + e4, this.f3916f, this.f3911a, this.f3913c, this.f3914d, this.f3915e);
}
}
}
public class C0048c implements CallBack<Object> {
public final String f3918a;
public final String f3919b;
public final long f3920c;
public final long f3921d;
public final long f3922e;
public final int f3923f;
public C0048c(String str, String str2, long j4, long j5, long j6, int i4) {
this.f3918a = str;
this.f3919b = str2;
this.f3920c = j4;
this.f3921d = j5;
this.f3922e = j6;
this.f3923f = i4;
}
public void onFailed(int i4, int i5, String str, String str2) {
AuthCallbacks authCallbacks = c.this.f3897b;
c1.b bVar = c1.b.AUTH_TOKEN_FAILED_CODE;
authCallbacks.authFailed(bVar.a(), i5, bVar.c(), bVar.d() + "_code:" + i4 + "_msg:" + str + "_status:" + i5 + "_seq:" + str2, this.f3923f, this.f3918a, this.f3920c, this.f3921d, this.f3922e);
}
public void onSuccess(int i4, String str, int i5, Object obj, String str2) {
AuthCallbacks authCallbacks;
int a4;
String str3;
String str4;
int i6;
String str5;
long j4;
long j5;
long j6;
try {
if (i4 == 0) {
String optString = new JSONObject(obj.toString()).optString(c1.e.f1158r);
if (!optString.isEmpty()) {
c.this.j(this.f3918a, optString, "", this.f3919b, this.f3920c, this.f3921d, this.f3922e);
ToolUtils.clearCache(c.this.f3896a);
return;
}
authCallbacks = c.this.f3897b;
c1.b bVar = c1.b.AUTH_TOKEN_FAILED_CODE;
a4 = bVar.a();
str3 = bVar.d() + "_code=" + i4 + "_msg=" + str + "_status=" + i5 + "_response=" + obj + "_seq=" + str2;
str4 = "check_error";
i6 = this.f3923f;
str5 = this.f3918a;
j4 = this.f3920c;
j5 = this.f3921d;
j6 = this.f3922e;
} else {
authCallbacks = c.this.f3897b;
c1.b bVar2 = c1.b.AUTH_TOKEN_FAILED_CODE;
a4 = bVar2.a();
str3 = bVar2.d() + "_code=" + i4 + "_msg=" + str + "_status=" + i5 + "_response=" + obj + "_seq=" + str2;
str4 = "check_error";
i6 = this.f3923f;
str5 = this.f3918a;
j4 = this.f3920c;
j5 = this.f3921d;
j6 = this.f3922e;
}
authCallbacks.authFailed(a4, i5, str3, str4, i6, str5, j4, j5, j6);
} catch (Exception e4) {
e4.printStackTrace();
i1.o.e(c1.d.f1116c, "mCUCCAuth Exception", e4);
AuthCallbacks authCallbacks2 = c.this.f3897b;
c1.b bVar3 = c1.b.SDK_EXCEPTION_CODE;
authCallbacks2.authFailed(bVar3.a(), bVar3.b(), bVar3.c(), bVar3.d() + "mCUCCAuth--Exception_e=" + e4, this.f3923f, this.f3918a, this.f3920c, this.f3921d, this.f3922e);
}
}
}
public class d implements GenTokenListener {
public d() {
}
public d(c cVar, a aVar) {
this();
}
@Override
public void onGetTokenComplete(int i4, JSONObject jSONObject) {
StringBuilder sb;
try {
if (jSONObject == null) {
AuthCallbacks authCallbacks = c.this.f3897b;
c1.b bVar = c1.b.AUTH_TOKEN_FAILED_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d() + "jObj isEmpty", 11, c.this.f3902g, c.this.f3904i, c.this.f3903h, c.this.f3905j);
return;
}
if (!jSONObject.has(c1.e.f1139h)) {
AuthCallbacks authCallbacks2 = c.this.f3897b;
c1.b bVar2 = c1.b.AUTH_TOKEN_FAILED_CODE;
authCallbacks2.authFailed(bVar2.a(), bVar2.b(), bVar2.c(), bVar2.d() + jSONObject, 11, c.this.f3902g, c.this.f3904i, c.this.f3903h, c.this.f3905j);
return;
}
String optString = jSONObject.optString(c1.e.f1139h);
int optInt = jSONObject.optInt(c1.e.f1141i);
String optString2 = jSONObject.optString(c1.e.f1143j);
String optString3 = jSONObject.optString(c1.e.f1145k);
if (optString.isEmpty() || optInt != 103000) {
AuthCallbacks authCallbacks3 = c.this.f3897b;
c1.b bVar3 = c1.b.AUTH_TOKEN_FAILED_CODE;
authCallbacks3.authFailed(bVar3.a(), optInt, optString2, bVar3.d() + optString2 + optString3, 11, c.this.f3902g, c.this.f3904i, c.this.f3903h, c.this.f3905j);
return;
}
if (c1.a.Y.equals(c.this.f3899d)) {
if (c1.a.f1053j.equals(c.this.f3902g)) {
sb = new StringBuilder();
sb.append(c1.e.f1162t);
sb.append(optString);
} else if (c1.a.f1055k.equals(c.this.f3902g)) {
sb = new StringBuilder();
sb.append(c1.e.f1164u);
sb.append(optString);
} else {
sb = new StringBuilder();
sb.append(c1.e.f1166v);
sb.append(optString);
}
optString = sb.toString();
}
c cVar = c.this;
cVar.j(cVar.f3902g, optString, "", c.this.f3899d, c.this.f3904i, c.this.f3903h, c.this.f3905j);
} catch (Exception e4) {
e4.printStackTrace();
i1.o.e(c1.d.f1116c, "mCMCCAuth onGetTokenComplete Exception", e4);
AuthCallbacks authCallbacks4 = c.this.f3897b;
c1.b bVar4 = c1.b.SDK_EXCEPTION_CODE;
authCallbacks4.authFailed(bVar4.a(), bVar4.b(), bVar4.c(), bVar4.d() + "mCMCCAuth--Exception_e=" + e4, 11, c.this.f3902g, c.this.f3904i, c.this.f3903h, c.this.f3905j);
}
}
}
public static c b() {
if (f3895k == null) {
synchronized (c.class) {
if (f3895k == null) {
f3895k = new c();
}
}
}
return f3895k;
}
public void c(int i4, long j4, long j5) {
this.f3897b = new f1.a();
long uptimeMillis = SystemClock.uptimeMillis();
a aVar = new a(i4, j4, j5, uptimeMillis);
if (this.f3896a != null && this.f3901f != null) {
if (c1.a.f1082y != c1.a.D.getAndSet(c1.a.f1082y)) {
this.f3901f.execute(aVar);
return;
} else {
i1.o.e(c1.d.f1116c, "auth is in progress");
return;
}
}
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.NOT_INITIALIZED_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d() + ":getPhoneInfoMethod()", i4, c1.a.f1059m, j4, j5, uptimeMillis);
}
public void d(int r25, long r26, long r28, long r30) {
throw new UnsupportedOperationException("Method not decompiled: h1.c.d(int, long, long, long):void");
}
public final void e(int i4, long j4, long j5, long j6, String str) {
String str2;
int e4 = v.e(this.f3896a, c1.f.N, c1.c.f1113c);
if (e4 == 1) {
str2 = "1";
} else {
if (e4 != 2) {
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.CMCC_UNAVAILABLE_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d(), i4, str, j4, j5, j6);
return;
}
str2 = c1.a.Y;
}
i(str, str2);
}
public void f(Context context, String str, ExecutorService executorService) {
this.f3896a = context;
this.f3898c = str;
this.f3901f = executorService;
}
public final void h(String str, int i4, long j4, long j5, long j6, String str2) {
int e4 = v.e(this.f3896a, c1.f.R, 4) * 1000;
int i5 = e4 / 2;
CtAuth.getInstance().requestPreLogin(new CtSetting(i5, i5, e4), new b(str, str2, j4, j5, j6, i4));
}
public final void i(String str, String str2) {
this.f3902g = str;
this.f3903h = SystemClock.uptimeMillis();
this.f3905j = SystemClock.uptimeMillis();
this.f3904i = System.currentTimeMillis();
this.f3899d = str2;
GenAuthnHelper.getInstance(this.f3896a).mobileAuth(v.g(this.f3896a, c1.f.f1188j, new String()), v.g(this.f3896a, c1.f.f1204z, new String()), this.f3900e);
}
public final void j(String str, String str2, String str3, String str4, long j4, long j5, long j6) {
StringBuilder sb;
try {
String g4 = v.g(this.f3896a, c1.f.f1200v, "");
String g5 = v.g(this.f3896a, c1.f.f1199u, "");
JSONObject jSONObject = new JSONObject();
jSONObject.put(c1.e.f1170x, g4);
jSONObject.put(c1.e.f1172y, str2);
jSONObject.put(c1.e.f1174z, str3);
String g6 = v.g(this.f3896a, c1.f.f1182d, "");
String g7 = i1.f.g(this.f3896a);
String a4 = i1.b.a(this.f3898c);
String substring = a4.substring(0, 16);
String substring2 = a4.substring(16);
jSONObject.put(c1.e.A, g6 + ",," + g7);
jSONObject.put(c1.e.B, v.g(this.f3896a, c1.f.f1180c, ""));
jSONObject.put(c1.e.C, "2.3.6.4");
jSONObject.put(c1.e.D, "1");
jSONObject.put(c1.e.E, "1");
String encodeToString = Base64.encodeToString(i1.b.e(jSONObject.toString().getBytes(p.f.f5036a), substring, substring2), 11);
JSONObject jSONObject2 = new JSONObject();
if (i1.e.h(g5) && "1".equals(g5)) {
sb = new StringBuilder();
sb.append(c1.e.f1168w);
sb.append(str4);
sb.append(g4);
sb.append("-");
sb.append(encodeToString);
} else {
sb = new StringBuilder();
sb.append(c1.e.f1168w);
sb.append(str4);
sb.append("-");
sb.append(encodeToString);
}
jSONObject2.put(c1.e.f1139h, sb.toString());
String jSONObject3 = jSONObject2.toString();
i1.o.b(c1.d.f1118e, "pre token", substring, substring2, jSONObject);
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.AUTH_TOKEN_SUCCESS_CODE;
authCallbacks.authSuccessed(bVar.a(), bVar.b(), jSONObject3, bVar.d() + substring + substring2, 11, str, j4, j5, j6);
} catch (Exception e4) {
e4.printStackTrace();
i1.o.e(c1.d.f1116c, "phoneNumVerify Exception", e4);
AuthCallbacks authCallbacks2 = this.f3897b;
c1.b bVar2 = c1.b.SDK_EXCEPTION_CODE;
authCallbacks2.authFailed(bVar2.a(), bVar2.b(), bVar2.c(), bVar2.d() + "phoneNumVerify--Exception_e=" + e4, 11, str, j4, j5, j6);
}
}
public final void l(String str, int i4, long j4, long j5, long j6, String str2) {
int e4 = v.e(this.f3896a, c1.f.R, 4);
String g4 = v.g(this.f3896a, c1.f.A, new String());
SDKManager.init(this.f3896a, v.g(this.f3896a, c1.f.f1201w, new String()), g4);
OauthManager.getInstance(this.f3896a).getAuthoriseCode(e4, new C0048c(str, str2, j4, j5, j6, i4));
}
public final boolean m(int i4, long j4, long j5, long j6) {
Context context = this.f3896a;
String str = c1.a.f1050h0;
String g4 = v.g(context, c1.f.I, c1.a.f1050h0);
if (g4.contains(",")) {
String[] split = g4.split(",");
String str2 = split.length == 1 ? split[0] : c1.a.f1050h0;
if (split.length == 2) {
str2 = split[0];
str = split[1];
}
g4 = str2;
}
i1.o.c(c1.d.f1118e, "startGetPhoneInfo cucc", g4, str);
if ("1".equals(g4)) {
f1.f.b().A();
boolean q4 = i1.h.q(this.f3896a);
if (!q4) {
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.DATA_REQUEST_FAILED_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d() + q4, i4, c1.a.f1053j, j4, j5, j6);
return true;
}
int p4 = i1.h.p(this.f3896a);
if (p4 == 2 || p4 == 3) {
AuthCallbacks authCallbacks2 = this.f3897b;
c1.b bVar2 = c1.b.DATA_REQUEST_FAILED_CODE;
authCallbacks2.authFailed(bVar2.a(), bVar2.b(), bVar2.c(), bVar2.d() + q4 + p4, i4, c1.a.f1053j, j4, j5, j6);
return true;
}
boolean k4 = i1.h.k(this.f3896a);
boolean f4 = i1.e.f(Integer.parseInt(str));
i1.o.c(c1.d.f1118e, "startGetPhoneInfo enable", Boolean.valueOf(k4), str);
if (k4 && f4) {
AuthCallbacks authCallbacks3 = this.f3897b;
c1.b bVar3 = c1.b.DATA_REQUEST_FAILED_CODE;
authCallbacks3.authFailed(bVar3.a(), bVar3.b(), bVar3.c(), bVar3.d() + q4 + p4 + k4, i4, c1.a.f1053j, j4, j5, j6);
}
}
return false;
}
public final void o(int i4, long j4, long j5, long j6) {
String str;
String str2;
int e4 = v.e(this.f3896a, c1.f.O, c1.c.f1113c);
int e5 = v.e(this.f3896a, c1.f.G, c1.c.f1112b);
if (e4 == 1) {
if (e5 != c1.c.f1113c) {
str = c1.a.f1053j;
str2 = "2";
l(str, i4, j4, j5, j6, str2);
return;
}
e(i4, j4, j5, j6, c1.a.f1053j);
}
if (e4 != 2) {
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.CUCC_UNAVAILABLE_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d(), i4, c1.a.f1053j, j4, j5, j6);
} else {
if (e5 != c1.c.f1113c) {
str = c1.a.f1053j;
str2 = c1.a.Z;
l(str, i4, j4, j5, j6, str2);
return;
}
e(i4, j4, j5, j6, c1.a.f1053j);
}
}
public final void q(int i4, long j4, long j5, long j6) {
String str;
String str2;
int e4 = v.e(this.f3896a, c1.f.P, c1.c.f1113c);
int e5 = v.e(this.f3896a, c1.f.H, c1.c.f1112b);
if (e4 == 1) {
if (e5 != c1.c.f1113c) {
str = c1.a.f1055k;
str2 = "3";
h(str, i4, j4, j5, j6, str2);
return;
}
e(i4, j4, j5, j6, c1.a.f1055k);
}
if (e4 != 2) {
AuthCallbacks authCallbacks = this.f3897b;
c1.b bVar = c1.b.CTCC_UNAVAILABLE_CODE;
authCallbacks.authFailed(bVar.a(), bVar.b(), bVar.c(), bVar.d(), i4, c1.a.f1055k, j4, j5, j6);
} else {
if (e5 != c1.c.f1113c) {
str = c1.a.f1055k;
str2 = c1.a.f1036a0;
h(str, i4, j4, j5, j6, str2);
return;
}
e(i4, j4, j5, j6, c1.a.f1055k);
}
}
}