导航菜单

页面标题

页面副标题

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

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

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


package com.iflytek.pushclient.d.c;

import android.content.Context;
import android.text.TextUtils;
import com.iflytek.pushclient.b.c.c;
import com.iflytek.pushclient.b.c.d;
import com.iflytek.pushclient.b.n;
import com.iflytek.pushclient.d.c.b;
import java.util.List;
import net.sqlcipher.BuildConfig;

public class a {

    private static a f878c;

    private Context f879a;

    private b f880b;

    private a(Context context) {
        this.f879a = context;
        e();
    }

    public static a a() {
        return f878c;
    }

    public static a b(Context context) {
        if (f878c == null) {
            synchronized (a.class) {
                if (f878c == null) {
                    f878c = new a(context);
                }
            }
        }
        return f878c;
    }

    private b c(String str) {
        if (TextUtils.isEmpty(str)) {
            return f();
        }
        c a2 = d.a(str).a();
        b.c cVar = new b.c();
        List<c> e = a2.e("url_list");
        if (e != null && !e.isEmpty()) {
            c cVar2 = e.get(0);
            List<c> e2 = cVar2.e("token_server");
            if (e2 != null && !e2.isEmpty()) {
                cVar.b(e2.get(0).b());
            }
            List<c> e3 = cVar2.e("client_server");
            if (e3 != null && !e3.isEmpty()) {
                cVar.d(e3.get(0).b());
            }
            List<c> e4 = cVar2.e("payload_server");
            if (e4 != null && !e4.isEmpty()) {
                cVar.f(e4.get(0).b());
            }
            List<c> e5 = cVar2.e("tag_server");
            if (e5 != null && !e5.isEmpty()) {
                cVar.h(e5.get(0).b());
            }
        }
        b.C0027b c0027b = new b.C0027b();
        List<c> e6 = a2.e("push_params");
        if (e6 != null && !e6.isEmpty()) {
            c cVar3 = e6.get(0);
            if (cVar3.e("push_interval") != null && !cVar3.e("push_interval").isEmpty()) {
                try {
                    c0027b.b(Integer.valueOf(cVar3.e("push_interval").get(0).b()).intValue());
                } catch (Exception e7) {
                    n.b("ConfigManager", BuildConfig.FLAVOR, e7);
                }
            }
        }
        b.a aVar = new b.a();
        List<c> e8 = a2.e("client_params");
        if (e8 != null && !e8.isEmpty()) {
            c cVar4 = e8.get(0);
            if (cVar4.e("version") != null && !cVar4.e("version").isEmpty()) {
                aVar.c(cVar4.e("version").get(0).b());
            }
            if (cVar4.e("daemon") != null && !cVar4.e("daemon").isEmpty()) {
                try {
                    aVar.b(Integer.valueOf(cVar4.e("daemon").get(0).b()).intValue());
                } catch (Exception e9) {
                    n.b("ConfigManager", "parserConfig daemon error", e9);
                }
            }
        }
        return new b(cVar, c0027b, aVar);
    }

    private void e() {
        String a2 = com.iflytek.pushclient.b.b.a(this.f879a, "pushconfig.xml");
        if (!TextUtils.isEmpty(a2)) {
            this.f880b = c(a2);
        } else {
            this.f880b = f();
            n.a("ConfigManager", "initConfig | read from assets: pushconfig.xml---> is empty");
        }
    }

    private b f() {
        b.c cVar = new b.c("http://xpush.voicecloud.cn/login.do", "http://xpush.voicecloud.cn/app.do", "http://xpush.voicecloud.cn/pushnode.do", "http://xpush.voicecloud.cn/v1/tags/sdk/tags.do");
        b.C0027b c0027b = new b.C0027b();
        c0027b.b(600000);
        b.a aVar = new b.a();
        aVar.c(com.iflytek.user.BuildConfig.VERSION_NAME);
        return new b(cVar, c0027b, aVar);
    }

    public b d() {
        return this.f880b;
    }
}