正在查看: 管控平台 v5.2.3.0. 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 管控平台 v5.2.3.0. 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package a.b.a.d.c.f;
import a.b.a.d.b.b.a;
import a.b.a.d.c.c.e;
import android.text.TextUtils;
import com.google.gson.m;
import com.google.gson.n;
import com.iflytek.edu.apm.base.http.constants.EDULogHttpConstants;
import com.iflytek.edu.statistics.log.config.http.EDUHttpConstant;
import com.iflytek.mdmcommon.log.LogCacheConfig;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import okhttp3.a0;
import okhttp3.b0;
import okhttp3.c0;
import okhttp3.w;
import okhttp3.y;
public class b extends a {
private a.b.a.d.c.a.b f26a;
public b(a.b.a.d.c.a.b bVar) {
this.f26a = bVar;
}
private long b(a.b.a.d.c.b.a aVar) {
File file = !TextUtils.isEmpty(aVar.b()) ? new File(aVar.b()) : aVar.g() != null ? aVar.g() : null;
if (file != null) {
long length = file.length();
if (length > e.f().e()) {
long j = length % LogCacheConfig.LOG_FILE_SIZE;
long j2 = length / LogCacheConfig.LOG_FILE_SIZE;
return j == 0 ? j2 : j2 + 1;
}
}
return 0L;
}
private Map<String, String> c(a.b.a.d.c.b.a aVar) {
HashMap hashMap = new HashMap();
hashMap.put("clientType", "android");
hashMap.put("token", aVar.f());
hashMap.put(EDUHttpConstant.DEVICE_ID, e.f().g().a());
hashMap.put("epasAppId", e.f().g().b());
return hashMap;
}
private static String g(String str, String str2, Map<String, String> map) throws Exception {
y yVar = new y();
b0 A = b0.A(w.d("application/json; charset=utf-8"), str2);
a0.a aVar = new a0.a();
aVar.o(str);
aVar.j(A);
if (map != null && !map.isEmpty()) {
for (Map.Entry<String, String> entry : map.entrySet()) {
aVar.a(entry.getKey(), entry.getValue());
}
}
c0 execute = yVar.b(aVar.b()).execute();
String N = execute.a() != null ? execute.a().N() : null;
execute.close();
return N;
}
public void a(a.b.a.d.c.b.a aVar) {
if (aVar != null) {
a.C0001a c0001a = aVar.c().a().get(0);
long b = b(aVar);
if (b > 1) {
c0001a.b(b);
}
try {
String g = g(d(), a.b.a.d.d.b.b(aVar.c()), c(aVar));
if (TextUtils.isEmpty(g)) {
e(4001, null);
} else {
f(0, g);
}
} catch (Exception e) {
a.b.a.d.c.d.a.b("获取token失败" + e.getMessage());
e(4001, null);
}
}
}
protected String d() {
return e.f().g().d() ? "https://aidp.changyan.com/open-svc/file/listStsTokenV2" : "https://pre-aidp.changyan.com/open-svc/file/listStsTokenV2";
}
public void e(int i, String str) {
a.b.a.d.c.a.b bVar = this.f26a;
if (bVar != null) {
bVar.b(new a.b.a.d.b.a.a(i, str));
}
}
public void f(int i, String str) {
String message;
a.b.a.d.c.d.a.c("token result :" + str);
if (this.f26a != null) {
int i2 = -1;
a.b.a.d.a.a aVar = null;
try {
m c = new n().a(str).c();
i2 = c.m("code").a();
if (i2 == 200) {
aVar = (a.b.a.d.a.a) new com.google.gson.e().g(c.m("data").b().l(0), a.b.a.d.a.a.class);
message = null;
} else {
message = c.m(EDULogHttpConstants.HTTP_RESULT_MSG).f();
}
} catch (Throwable th) {
message = th.getMessage();
}
if (aVar != null) {
this.f26a.a(aVar);
} else {
this.f26a.b(new a.b.a.d.b.a.a(i2, message));
}
}
}
}