导航菜单

页面标题

页面副标题

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

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

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


package com.iflytek.sunflower.task;

import android.content.Context;
import android.content.SharedPreferences;
import com.iflytek.sunflower.OnlineConfigListener;
import com.iflytek.sunflower.config.DataKeys;
import com.iflytek.sunflower.util.k;
import com.igexin.push.f.p;
import net.sqlcipher.BuildConfig;
import org.json.JSONObject;

public class b extends f {

    private Context f992b;

    public b(Context context, OnlineConfigListener onlineConfigListener) {
        super(context, onlineConfigListener);
        this.f992b = context;
    }

    private JSONObject b() {
        com.iflytek.sunflower.util.a.a(new com.iflytek.sunflower.util.h(), this.f992b);
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", "app_list");
            jSONObject.put("appid", com.iflytek.sunflower.util.g.f(this.f992b));
            jSONObject.put("pver", com.igexin.push.config.c.H);
            com.iflytek.sunflower.util.j.e("Collector", jSONObject.toString());
            return jSONObject;
        } catch (Throwable unused) {
            com.iflytek.sunflower.util.j.f("Collector", "exception occur while upload app list");
            return null;
        }
    }

    @Override
    protected void a() {
        super.a();
        try {
            JSONObject b2 = b();
            if (k.a(this.f992b)) {
                byte[] bytes = b2.toString().getBytes(p.f1691b);
                com.iflytek.sunflower.util.j.a("Collector", "AppListTask data is: " + new String(bytes, "UTF-8"));
                byte[] a2 = com.iflytek.sunflower.util.d.a(bytes);
                com.iflytek.sunflower.a.a aVar = new com.iflytek.sunflower.a.a();
                aVar.b(20000);
                aVar.a(1);
                aVar.a("http://data.openspeech.cn/index.php/clientrequest/clientcollect/isCollect", BuildConfig.FLAVOR, a2);
                aVar.b(this.f999a);
            } else {
                com.iflytek.sunflower.util.j.f("Collector", "upload app list error, please check net state");
            }
        } catch (Throwable unused) {
            com.iflytek.sunflower.util.j.f("Collector", "exception occur while upload app list");
        }
    }

    @Override
    protected void a(JSONObject jSONObject) {
        super.a(jSONObject);
        com.iflytek.sunflower.util.j.e("Collector", "get app list config result: " + jSONObject.toString());
        Long valueOf = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(DataKeys.TI_APP_ACTIVE)) * 3600.0f));
        Long valueOf2 = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(DataKeys.TI_APP_LIST)) * 3600.0f));
        Long valueOf3 = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(DataKeys.TI_REQUEST)) * 3600.0f));
        Boolean bool = Boolean.FALSE;
        if ("yes".equalsIgnoreCase(jSONObject.optString(DataKeys.IS_COLLECT))) {
            bool = Boolean.TRUE;
        }
        SharedPreferences.Editor edit = com.iflytek.sunflower.c.a(this.f992b).edit();
        edit.putLong(DataKeys.TI_APP_ACTIVE, valueOf.longValue());
        edit.putLong(DataKeys.TI_APP_LIST, valueOf2.longValue());
        edit.putLong(DataKeys.TI_REQUEST, valueOf3.longValue());
        edit.putBoolean(DataKeys.IS_COLLECT, bool.booleanValue());
        edit.commit();
    }
}