曹妃甸核酸检测平台.apk(点击下载) / g.java


package com.igexin.push.core;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Environment;
import android.telephony.TelephonyManager;
import com.igexin.a.b.a;
import com.igexin.push.a.j;
import com.igexin.push.a.k;
import com.igexin.push.a.m;
import com.igexin.push.core.bean.f;
import com.igexin.sdk.a.c;
import com.igexin.sdk.a.d;
import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

public class g {
    public static String A;
    public static String B;
    public static String C;
    public static String D;
    public static String E = "";
    public static long F = -1;
    public static long G = -1;
    public static long H = 0;
    public static long I = 0;
    public static long J = 0;
    public static long K = 0;
    public static long L = 0;
    public static long M = 0;
    public static long N = 0;
    public static long O = 0;
    public static String P = null;
    public static boolean Q = m.f7282b.equals("debug");
    public static long R = 0;
    public static long S;
    public static long T;
    public static long U = 0;
    public static String V;
    public static long W = 0;
    public static int X = 0;
    public static long Y;
    public static String Z;

    /* renamed from: a  reason: collision with root package name */
    public static String f7498a = k.f7272a[0];
    private static HashMap aA = new HashMap();
    private static Map aB;
    public static String aa;
    public static String ab;
    public static String ac;
    public static String ad;
    public static String ae;
    public static String af;
    public static String ag;
    public static byte[] ah;
    public static boolean ai = false;
    public static boolean aj = false;
    public static boolean ak = false;
    public static Map al;
    public static Map am;
    public static HashMap an;
    public static HashMap ao;
    public static HashMap ap;
    public static int aq = 0;
    public static Map ar;
    public static int as = 0;
    public static int at = 0;
    public static int au = 0;
    public static f av;
    public static boolean aw = false;
    public static String ax;
    public static com.igexin.push.f.b.f ay;
    private static final String az = j.f7271a;

    /* renamed from: b  reason: collision with root package name */
    public static String f7499b = "http://sdk.open.phone.igexin.com/api.php";

    /* renamed from: c  reason: collision with root package name */
    public static String f7500c = "";

    /* renamed from: d  reason: collision with root package name */
    public static String f7501d = "";

    /* renamed from: e  reason: collision with root package name */
    public static String f7502e = "";

    /* renamed from: f  reason: collision with root package name */
    public static String f7503f = "";

    /* renamed from: g  reason: collision with root package name */
    public static String f7504g = "";

    /* renamed from: h  reason: collision with root package name */
    public static boolean f7505h = false;
    public static Context i;
    public static AtomicBoolean j = new AtomicBoolean(false);
    public static boolean k = true;
    public static boolean l = false;
    public static boolean m = false;
    public static boolean n = true;
    public static boolean o = false;
    public static boolean p = false;
    public static boolean q = true;
    public static int r = 0;
    public static int s = 0;
    public static long t = 0;
    public static String u;
    public static String v;
    public static String w;
    public static String x;
    public static String y;
    public static String z;

    public static int a(String str, boolean z2) {
        int intValue;
        synchronized (aB) {
            if (aB.get(str) == null) {
                aB.put(str, 0);
            }
            intValue = ((Integer) aB.get(str)).intValue();
            if (z2) {
                intValue--;
                aB.put(str, Integer.valueOf(intValue));
                if (intValue == 0) {
                    aB.remove(str);
                }
            }
        }
        return intValue;
    }

    public static String a() {
        return f7499b + "?format=json&t=1";
    }

    public static void a(long j2) {
        t = j2;
        u = a.a(String.valueOf(t));
    }

    /* JADX WARNING: Code restructure failed: missing block: B:53:0x0197, code lost:
        if (com.igexin.push.core.g.A.equals("") != false) goto L_0x019b;
     */
    public static boolean a(Context context) {
        String[] strArr;
        i = context;
        f7504g = context.getPackageName();
        try {
            ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(f7504g, 128);
            if (!(applicationInfo == null || applicationInfo.metaData == null)) {
                String string = applicationInfo.metaData.getString("PUSH_APPID");
                String string2 = applicationInfo.metaData.getString("PUSH_APPSECRET");
                String obj = applicationInfo.metaData.get("PUSH_APPKEY") != null ? applicationInfo.metaData.get("PUSH_APPKEY").toString() : null;
                String obj2 = applicationInfo.metaData.get("PUSH_GROUPID") != null ? applicationInfo.metaData.get("PUSH_GROUPID").toString() : "";
                if (!(string == null || string2 == null || obj == null)) {
                    f7500c = string;
                    f7501d = obj;
                    f7502e = string2;
                    f7503f = obj2;
                    ah = a.a(string + string2 + obj + context.getPackageName()).getBytes();
                    PackageInfo packageInfo = context.getPackageManager().getPackageInfo(f7504g, 4096);
                    if (!(packageInfo == null || packageInfo.requestedPermissions == null)) {
                        for (String str : packageInfo.requestedPermissions) {
                            if (str.equals("android.permission.CALL_PHONE")) {
                                f7505h = true;
                            }
                        }
                        context.getFilesDir();
                        File file = new File("/sdcard/libs");
                        if (!file.exists()) {
                            file.mkdir();
                        }
                        File file2 = new File(Environment.getExternalStorageDirectory().getPath() + "/system/tmp/local");
                        if (!file2.exists()) {
                            file2.mkdirs();
                        }
                        af = file2.getAbsolutePath();
                        ag = "/data/data/" + f7504g + "/files";
                        ab = "/sdcard/libs/" + f7504g + com.umeng.analytics.process.a.f14094d;
                        ac = "/sdcard/libs/com.igexin.sdk.deviceId.db";
                        ad = "/sdcard/libs/app.db";
                        ae = "/sdcard/libs/imsi.db";
                        aa = "/sdcard/libs/" + f7504g + ".properties";
                        try {
                            TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
                            w = telephonyManager.getDeviceId();
                            x = telephonyManager.getSubscriberId();
                            if (A == null || A.equals("")) {
                                if (k.k) {
                                    HashMap b2 = b();
                                    if (!(b2 == null || x == null || x.equals(""))) {
                                        A = (String) b2.get(x);
                                    }
                                    if (A != null) {
                                    }
                                }
                                A = null;
                            }
                            y = Build.MODEL;
                            if (f.a().i().getActiveNetworkInfo() == null || !f.a().i().getActiveNetworkInfo().isAvailable()) {
                                k = false;
                            } else {
                                k = true;
                            }
                        } catch (Throwable unused) {
                        }
                        String str2 = w;
                        if (str2 == null) {
                            str2 = "cantgetimei";
                        }
                        D = a.a(str2);
                        al = new HashMap();
                        am = new HashMap();
                        an = new HashMap();
                        ao = new HashMap();
                        ap = new HashMap();
                        ar = new HashMap();
                        Y = System.currentTimeMillis();
                        Z = "com.igexin.sdk.action.snlresponse." + f7504g;
                        l = new d(context).c();
                        m = new c(context).c();
                        aB = new HashMap();
                        return true;
                    }
                }
            }
        } catch (PackageManager.NameNotFoundException unused2) {
        }
        return false;
    }

    public static boolean a(String str, Integer num, boolean z2) {
        synchronized (aB) {
            int intValue = num.intValue();
            if (!z2 || aB.get(str) == null || (intValue = ((Integer) aB.get(str)).intValue() + num.intValue()) != 0) {
                aB.put(str, Integer.valueOf(intValue));
                return true;
            }
            aB.remove(str);
            return false;
        }
    }

    public static HashMap b() {
        if (!new File(ae).exists()) {
            return null;
        }
        try {
            ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream(ae));
            HashMap hashMap = (HashMap) objectInputStream.readObject();
            try {
                objectInputStream.close();
            } catch (Exception unused) {
            }
            return hashMap;
        } catch (Exception unused2) {
            return null;
        }
    }

    public static HashMap c() {
        return aA;
    }
}