导航菜单

页面标题

页面副标题

爱心e站 v1.0.0 - a.java 源代码

正在查看: 爱心e站 v1.0.0 应用的 a.java JAVA 源代码文件

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


package com.iflytek.sunflower.task;

import android.content.Context;
import android.content.SharedPreferences;
import com.iflytek.cloud.util.AudioDetector;
import com.iflytek.sunflower.OnlineConfigListener;
import org.json.JSONObject;

public class a extends e {
    private Context b;

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

    private JSONObject b() {
        com.iflytek.sunflower.c.a.a(new com.iflytek.sunflower.c.f(), this.b);
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", "app_list");
            jSONObject.put("appid", com.iflytek.sunflower.c.e.f(this.b));
            jSONObject.put("pver", "2");
            com.iflytek.sunflower.c.g.e("Collector", jSONObject.toString());
            return jSONObject;
        } catch (Exception e) {
            com.iflytek.sunflower.c.g.f("Collector", "exception occur while upload app list");
            return null;
        }
    }

    @Override
    protected void a() {
        super.a();
        try {
            JSONObject b = b();
            if (com.iflytek.sunflower.c.h.a(this.b)) {
                byte[] a2 = com.iflytek.sunflower.c.c.a(b.toString().getBytes("utf-8"));
                com.iflytek.sunflower.b.a aVar = new com.iflytek.sunflower.b.a();
                aVar.b(AudioDetector.DEF_EOS);
                aVar.a(1);
                aVar.a("http://data.openspeech.cn/index.php/clientrequest/clientcollect/isCollect", "", a2);
                aVar.b(this.f881a);
            } else {
                com.iflytek.sunflower.c.g.f("Collector", "upload app list error, please check net state");
            }
        } catch (Exception e) {
            com.iflytek.sunflower.c.g.f("Collector", "exception occur while upload app list");
        }
    }

    @Override
    protected void a(JSONObject jSONObject) {
        super.a(jSONObject);
        com.iflytek.sunflower.c.g.e("Collector", "get app list config result: " + jSONObject.toString());
        Long valueOf = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(com.iflytek.sunflower.config.b.q)) * 3600.0f));
        Long valueOf2 = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(com.iflytek.sunflower.config.b.s)) * 3600.0f));
        Long valueOf3 = Long.valueOf((long) (Float.parseFloat(jSONObject.optString(com.iflytek.sunflower.config.b.u)) * 3600.0f));
        Boolean bool = "yes".equalsIgnoreCase(jSONObject.optString(com.iflytek.sunflower.config.b.w));
        SharedPreferences.Editor edit = com.iflytek.sunflower.d.a(this.b).edit();
        edit.putLong(com.iflytek.sunflower.config.b.q, valueOf.longValue());
        edit.putLong(com.iflytek.sunflower.config.b.s, valueOf2.longValue());
        edit.putLong(com.iflytek.sunflower.config.b.u, valueOf3.longValue());
        edit.putBoolean(com.iflytek.sunflower.config.b.w, bool.booleanValue());
        edit.commit();
    }
}