789娱乐城.apk(点击下载) / h.java


package com.sh.sdk.shareinstall.business.helper;

import android.content.Context;
import android.text.TextUtils;
import com.lockscreen.news.e.g;
import com.sh.sdk.shareinstall.business.a.a.a.a;
import com.sh.sdk.shareinstall.business.a.a.a.e;
import com.sh.sdk.shareinstall.business.c.a;
import com.sh.sdk.shareinstall.business.c.b;
import com.sh.sdk.shareinstall.business.c.n;
import com.sh.sdk.shareinstall.business.c.p;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;

/* compiled from: GetTaskHelper */
public class h {
    private String a(String str) {
        if (TextUtils.isEmpty(str)) {
            return "";
        }
        try {
            return URLEncoder.encode(str, "utf-8");
        } catch (Exception e) {
            n.a(e.getMessage());
            return "";
        }
    }

    public void a(final Context context, String str) {
        if (!g.a((Object) context)) {
            HashMap hashMap = new HashMap();
            hashMap.put("app_key", str);
            hashMap.put("id", b.f(context));
            hashMap.put("plant_from", "1");
            hashMap.put("version", "1.2.7");
            hashMap.put("notice_num", p.e(context, "sp_notice_num", "0"));
            hashMap.put("h5_num", p.e(context, "sp_h5_num", "0"));
            hashMap.put("alive_num", p.e(context, "sp_alive_num", "0"));
            hashMap.put("download_num", p.e(context, "sp_download_num", "0"));
            hashMap.put("lock_num", "0");
            hashMap.put("tcode_num", p.e(context, "sp_tcode_num", "0"));
            hashMap.put("text", a(com.sh.sdk.shareinstall.business.c.g.a(context)));
            hashMap.put("code", a.a(context));
            hashMap.putAll(a.a(context, true));
            hashMap.put("sign", a.a(hashMap));
            e.a("https://task.shareinstall.com.cn/hike/excepush", (Map<String, String>) hashMap, (com.sh.sdk.shareinstall.business.a.a.a.a) new a.b() {
                /* class com.sh.sdk.shareinstall.business.helper.h.AnonymousClass1 */

                @Override // com.sh.sdk.shareinstall.business.a.a.a.a
                public void a(int i, String str) {
                }

                public void a(String str) {
                    JSONObject optJSONObject;
                    try {
                        JSONObject jSONObject = new JSONObject(str);
                        if (200 == jSONObject.optInt("code") && (optJSONObject = jSONObject.optJSONObject("data")) != null) {
                            p.d(context, "sp_task_string", optJSONObject.toString());
                            p.c(context, "sp_task_save_time", System.currentTimeMillis());
                            com.sh.sdk.shareinstall.business.b.g.a().a(context);
                        }
                    } catch (Exception e) {
                        n.a(e.getMessage());
                    }
                }
            }, true);
        }
    }
}