导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - c.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package a.b.a.d.c.f;

import a.b.a.d.c.b.d;
import a.b.a.d.c.c.e;
import android.text.TextUtils;
import androidx.work.WorkRequest;
import com.google.gson.n;
import com.iflytek.edu.statistics.log.config.http.EDUHttpConstant;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import okhttp3.a0;
import okhttp3.b0;
import okhttp3.c0;
import okhttp3.w;
import okhttp3.y;

public class c {

    private a.b.a.d.c.a.a f27a;

    public c(a.b.a.d.c.a.a aVar) {
        this.f27a = aVar;
    }

    private static String e(String str, String str2, Map<String, String> map) throws Exception {
        y.b u = new y().u();
        u.n(WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS);
        y c = u.c();
        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 = c.b(aVar.b()).execute();
        String N = execute.a() != null ? execute.a().N() : null;
        execute.close();
        return N;
    }

    public void a(d dVar, a.b.a.d.c.b.a aVar) {
        if (dVar != null) {
            try {
                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());
                String e = e(b(), a.b.a.d.d.b.b(dVar), hashMap);
                if (TextUtils.isEmpty(e)) {
                    c(1000);
                } else {
                    d(e);
                }
            } catch (Exception e2) {
                a.b.a.d.c.d.a.b(e2.getMessage());
                c(-1);
            }
        }
    }

    protected String b() {
        return e.f().g().d() ? "https://aidp.changyan.com/open-svc/file/recognition" : "https://pre-aidp.changyan.com/open-svc/file/recognition";
    }

    public void c(int i) {
        a.b.a.d.c.a.a aVar = this.f27a;
        if (aVar != null) {
            aVar.a(i);
        }
    }

    public void d(String str) {
        if (this.f27a != null) {
            try {
                int a2 = new n().a(str).c().m("code").a();
                if (a2 == 200) {
                    this.f27a.b();
                } else {
                    this.f27a.a(a2);
                }
            } catch (Throwable th) {
                a.b.a.d.c.d.a.b(th.getMessage());
                this.f27a.a(-1);
            }
        }
    }

    public Boolean f(d dVar, a.b.a.d.c.b.a aVar) {
        try {
            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());
            String e = e(b(), a.b.a.d.d.b.b(dVar), hashMap);
            if (TextUtils.isEmpty(e)) {
                return Boolean.FALSE;
            }
            try {
                if (new n().a(e).c().m("code").a() == 200) {
                    return Boolean.TRUE;
                }
                a.b.a.d.c.d.a.b(e);
                return Boolean.FALSE;
            } catch (Throwable th) {
                a.b.a.d.c.d.a.b(th.getMessage());
                return Boolean.FALSE;
            }
        } catch (Exception e2) {
            a.b.a.d.c.d.a.b(e2.getMessage());
            return Boolean.FALSE;
        }
    }

    public c() {
    }
}