导航菜单

页面标题

页面副标题

moonshot.企业版 v8.14.46 - C1450.java 源代码

正在查看: moonshot.企业版 v8.14.46 应用的 C1450.java JAVA 源代码文件

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


package kp1AiJpjqJHu1Tcnj96z.saktfaQObACC6AiCgP8Y.zSFvmU2XOpXZrEfUxlHp.kp1AiJpjqJHu1Tcnj96z;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.os.Process;
import android.text.TextUtils;
import com.tencent.bugly.crashreport.common.info.PlugInBean;
import com.xiaomi.mipush.sdk.Constants;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import kp1AiJpjqJHu1Tcnj96z.l9DIbgbSEsWEHUgGqnur.zSFvmU2XOpXZrEfUxlHp.C1312;

public final class C1450 {

    private static final Map<String, String> f5024 = new HashMap();

    private static C1450 f5025 = null;

    public String f5026;

    public String f5027;

    public int f5034;

    private String f5036;

    private final Context f5042;

    public final String f5043;

    public final String f5048;

    public String f5057;

    public String f5060;

    public String f5064;

    public String f5073;

    private String f5075;

    public String f5077;

    public String f5081;

    public boolean f5085;

    public boolean f5086;

    public List<String> f5091;

    public String f5092;

    public String f5093;

    public final SharedPreferences f5094;

    private String f5095;

    private String f5096;

    public final SharedPreferences f5097;

    public boolean f5031 = true;

    public final String f5082 = "com.tencent.bugly";

    public String f5028 = "4.1.9.3";

    public final String f5062 = "";

    @Deprecated
    public final String f5079 = "";

    public String f5055 = C1312.f4611;

    private String f5090 = C1312.f4611;

    private String f5059 = "";

    public long f5066 = 0;

    private String f5065 = null;

    private long f5054 = -1;

    private long f5030 = -1;

    private long f5037 = -1;

    private String f5053 = null;

    private String f5046 = null;

    private Map<String, PlugInBean> f5047 = null;

    public boolean f5080 = false;

    private String f5058 = null;

    private Boolean f5089 = null;

    private String f5063 = null;

    public String f5061 = null;

    public String f5032 = null;

    private Map<String, PlugInBean> f5052 = null;

    private Map<String, PlugInBean> f5070 = null;

    public int f5083 = -1;

    public int f5100 = -1;

    private final Map<String, String> f5040 = new HashMap();

    private final Map<String, String> f5050 = new HashMap();

    private final Map<String, String> f5041 = new HashMap();

    public String f5029 = C1312.f4611;

    public long f5049 = 0;

    public long f5088 = 0;

    public long f5038 = 0;

    public long f5069 = 0;

    public boolean f5051 = false;

    public HashMap<String, String> f5098 = new HashMap<>();

    public List<String> f5072 = new ArrayList();

    public boolean f5078 = false;

    public InterfaceC1478 f5087 = null;

    public boolean f5074 = true;

    public boolean f5076 = true;

    public boolean f5068 = false;

    private final Object f5084 = new Object();

    public final Object f5033 = new Object();

    private final Object f5099 = new Object();

    private final Object f5045 = new Object();

    public final Object f5067 = new Object();

    public final Object f5035 = new Object();

    private final Object f5056 = new Object();

    private final List<Integer> f5044 = new ArrayList();

    public final long f5039 = System.currentTimeMillis();

    public final byte f5071 = 1;

    private C1450(Context context) {
        this.f5096 = null;
        this.f5057 = null;
        this.f5093 = null;
        this.f5060 = null;
        this.f5064 = null;
        this.f5091 = null;
        this.f5085 = false;
        this.f5077 = null;
        this.f5027 = null;
        this.f5092 = null;
        this.f5026 = "";
        this.f5086 = false;
        this.f5042 = C1471.m7528(context);
        PackageInfo m7173 = C1360.m7173(context);
        if (m7173 != null) {
            try {
                String str = m7173.versionName;
                this.f5057 = str;
                this.f5077 = str;
                this.f5027 = Integer.toString(m7173.versionCode);
            } catch (Throwable th) {
                if (!C1476.m7590(th)) {
                    th.printStackTrace();
                }
            }
        }
        this.f5081 = C1360.m7176(context);
        this.f5043 = C1360.m7172(Process.myPid());
        this.f5093 = C1360.m7175(context);
        this.f5048 = "Android " + C1364.m7197() + ",level " + C1364.m7201();
        Map<String, String> m7170 = C1360.m7170(context);
        if (m7170 != null) {
            try {
                this.f5091 = C1360.m7171(m7170);
                String str2 = m7170.get("BUGLY_APPID");
                if (str2 != null) {
                    this.f5060 = str2;
                    m7406("APP_ID", str2);
                }
                String str3 = m7170.get("BUGLY_APP_VERSION");
                if (str3 != null) {
                    this.f5057 = str3;
                }
                String str4 = m7170.get("BUGLY_APP_CHANNEL");
                if (str4 != null) {
                    this.f5064 = str4;
                }
                String str5 = m7170.get("BUGLY_ENABLE_DEBUG");
                if (str5 != null) {
                    this.f5085 = str5.equalsIgnoreCase("true");
                }
                String str6 = m7170.get("com.tencent.rdm.uuid");
                if (str6 != null) {
                    this.f5092 = str6;
                }
                String str7 = m7170.get("BUGLY_APP_BUILD_NO");
                if (!TextUtils.isEmpty(str7)) {
                    this.f5034 = Integer.parseInt(str7);
                }
                String str8 = m7170.get("BUGLY_AREA");
                if (str8 != null) {
                    this.f5026 = str8;
                }
            } catch (Throwable th2) {
                if (!C1476.m7590(th2)) {
                    th2.printStackTrace();
                }
            }
        }
        try {
            if (!context.getDatabasePath("bugly_db_").exists()) {
                this.f5086 = true;
                C1476.m7583("App is first time to be installed on the device.", new Object[0]);
            }
        } catch (Throwable th3) {
            if (C1475.f5196) {
                th3.printStackTrace();
            }
        }
        this.f5094 = C1471.m7550("BUGLY_COMMON_VALUES", context);
        this.f5097 = C1471.m7550("BUGLY_RESERVED_VALUES", context);
        this.f5096 = C1364.m7199(context);
        m7391();
        C1476.m7583("com info create end", new Object[0]);
    }

    public static synchronized C1450 m7382(Context context) {
        C1450 c1450;
        synchronized (C1450.class) {
            if (f5025 == null) {
                f5025 = new C1450(context);
            }
            c1450 = f5025;
        }
        return c1450;
    }

    @Deprecated
    public static boolean m7383() {
        C1476.m7587("Detect if the emulator is unavailable", new Object[0]);
        return false;
    }

    private String m7384() {
        if (TextUtils.isEmpty(this.f5065)) {
            this.f5065 = C1471.m7558("androidid", null);
        }
        return this.f5065;
    }

    public static synchronized C1450 m7385() {
        C1450 c1450;
        synchronized (C1450.class) {
            c1450 = f5025;
        }
        return c1450;
    }

    @Deprecated
    public static String m7386() {
        return "";
    }

    @Deprecated
    public static boolean m7387() {
        C1476.m7587("Detect if the device hook is unavailable", new Object[0]);
        return false;
    }

    private static String m7388() {
        String uuid = UUID.randomUUID().toString();
        return !C1471.m7544(uuid) ? uuid.replaceAll(Constants.ACCEPT_TIME_SEPARATOR_SERVER, "") : uuid;
    }

    public static int m7389() {
        return C1364.m7201();
    }

    private void m7390(String str, String str2, boolean z) {
        if (C1471.m7544(str)) {
            C1476.m7591("key should not be empty %s", str);
            return;
        }
        C1476.m7583("putExtraRequestData key:%s value:%s save:%s", str, str2, Boolean.valueOf(z));
        synchronized (this.f5056) {
            if (TextUtils.isEmpty(str2)) {
                this.f5050.remove(str);
                this.f5097.edit().remove(str).apply();
            } else {
                this.f5050.put(str, str2);
                if (z) {
                    this.f5097.edit().putString(str, str2).apply();
                }
            }
        }
    }

    private void m7391() {
        try {
            for (Map.Entry<String, ?> entry : this.f5097.getAll().entrySet()) {
                C1476.m7583("put reserved request data from sp, key:%s value:%s", entry.getKey(), entry.getValue());
                m7390(entry.getKey(), entry.getValue().toString(), false);
            }
            for (Map.Entry<String, String> entry2 : f5024.entrySet()) {
                C1476.m7583("put reserved request data from cache, key:%s value:%s", entry2.getKey(), entry2.getValue());
                m7390(entry2.getKey(), entry2.getValue(), true);
            }
            f5024.clear();
        } catch (Throwable th) {
            C1476.m7588(th);
        }
    }

    public final void m7392(String str) {
        this.f5036 = str;
        if (!TextUtils.isEmpty(str)) {
            C1471.m7523("deviceId", str);
        }
        synchronized (this.f5056) {
            this.f5050.put("E8", str);
        }
    }

    public final void m7393(String str) {
        if (TextUtils.isEmpty(str)) {
            return;
        }
        this.f5046 = str.trim();
    }

    public final String m7394() {
        if (this.f5063 == null) {
            String str = C1364.m7203();
            this.f5063 = str;
            C1476.m7587("ROM ID: %s", str);
        }
        return this.f5063;
    }

    public final long m7395() {
        if (this.f5037 <= 0) {
            this.f5037 = C1364.m7190();
        }
        return this.f5037;
    }

    public final void m7396(String str) {
        C1476.m7587("change deviceModel,old:%s new:%s", this.f5095, str);
        this.f5095 = str;
        if (TextUtils.isEmpty(str)) {
            return;
        }
        C1471.m7523("deviceModel", str);
    }

    public final String m7397() {
        String str;
        synchronized (this.f5035) {
            str = this.f5055;
        }
        return str;
    }

    public final Map<String, String> m7398() {
        synchronized (this.f5045) {
            if (this.f5041.size() <= 0) {
                return null;
            }
            return new HashMap(this.f5041);
        }
    }

    public final synchronized Map<String, PlugInBean> m7399() {
        Map<String, PlugInBean> map;
        map = this.f5052;
        Map<String, PlugInBean> map2 = this.f5070;
        if (map2 != null) {
            map.putAll(map2);
        }
        return map;
    }

    public final String m7400() {
        String str = this.f5036;
        if (str != null) {
            return str;
        }
        String m7558 = C1471.m7558("deviceId", null);
        this.f5036 = m7558;
        if (m7558 != null) {
            return m7558;
        }
        String m7384 = m7384();
        this.f5036 = m7384;
        if (TextUtils.isEmpty(m7384)) {
            this.f5036 = m7388();
        }
        String str2 = this.f5036;
        if (str2 == null) {
            return "";
        }
        C1471.m7523("deviceId", str2);
        return this.f5036;
    }

    public final synchronized String m7401() {
        String str = this.f5095;
        if (str != null) {
            return str;
        }
        String m7558 = C1471.m7558("deviceModel", null);
        this.f5095 = m7558;
        if (m7558 != null) {
            C1476.m7583("collect device model from sp:%s", m7558);
            return this.f5095;
        }
        if (!this.f5080) {
            C1476.m7583("not allow collect device model", new Object[0]);
            return "fail";
        }
        String m7188 = C1364.m7188();
        this.f5095 = m7188;
        C1476.m7583("collect device model:%s", m7188);
        C1471.m7523("deviceModel", this.f5095);
        return this.f5095;
    }

    public final int m7402() {
        int i;
        synchronized (this.f5067) {
            i = this.f5083;
        }
        return i;
    }

    public final Map<String, String> m7403() {
        synchronized (this.f5099) {
            if (this.f5040.size() <= 0) {
                return null;
            }
            return new HashMap(this.f5040);
        }
    }

    public final String m7404(String str) {
        String remove;
        if (C1471.m7544(str)) {
            C1476.m7591("key should not be empty %s", String.valueOf(str));
            return null;
        }
        synchronized (this.f5099) {
            remove = this.f5040.remove(str);
        }
        return remove;
    }

    public final String m7405() {
        return !C1471.m7544(this.f5073) ? this.f5073 : this.f5060;
    }

    public final void m7406(String str, String str2) {
        if (C1471.m7544(str) || C1471.m7544(str2)) {
            C1476.m7591("server key&value should not be empty %s %s", String.valueOf(str), String.valueOf(str2));
            return;
        }
        synchronized (this.f5045) {
            this.f5041.put(str, str2);
        }
    }

    public final long m7407() {
        if (this.f5030 <= 0) {
            this.f5030 = C1364.m7200();
        }
        return this.f5030;
    }

    public final long m7408() {
        if (this.f5054 <= 0) {
            this.f5054 = C1364.m7185();
        }
        return this.f5054;
    }

    public final synchronized void m7409(String str) {
        this.f5090 = String.valueOf(str);
    }

    public final Boolean m7410() {
        if (this.f5089 == null) {
            this.f5089 = Boolean.valueOf(C1364.m7195());
        }
        return this.f5089;
    }

    public final void m7411(String str, String str2) {
        if (C1471.m7544(str) || C1471.m7544(str2)) {
            C1476.m7591("key&value should not be empty %s %s", String.valueOf(str), String.valueOf(str2));
            return;
        }
        synchronized (this.f5099) {
            this.f5040.put(str, str2);
        }
    }

    public final String m7412() {
        if (this.f5058 == null) {
            this.f5058 = C1364.m7192();
        }
        return this.f5058;
    }

    public final String m7413() {
        try {
            Map<String, ?> all = this.f5042.getSharedPreferences("BuglySdkInfos", 0).getAll();
            if (!all.isEmpty()) {
                synchronized (this.f5033) {
                    for (Map.Entry<String, ?> entry : all.entrySet()) {
                        try {
                            this.f5098.put(entry.getKey(), entry.getValue().toString());
                        } catch (Throwable th) {
                            C1476.m7590(th);
                        }
                    }
                }
            }
        } catch (Throwable th2) {
            C1476.m7590(th2);
        }
        if (this.f5098.isEmpty()) {
            C1476.m7583("SDK_INFO is empty", new Object[0]);
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (Map.Entry<String, String> entry2 : this.f5098.entrySet()) {
            sb.append("[");
            sb.append(entry2.getKey());
            sb.append(",");
            sb.append(entry2.getValue());
            sb.append("] ");
        }
        C1476.m7583("SDK_INFO = %s", sb.toString());
        m7406("SDK_INFO", sb.toString());
        return sb.toString();
    }

    public final synchronized void m7414(String str) {
        this.f5059 = String.valueOf(str);
    }

    public final String m7415() {
        String str;
        synchronized (this.f5084) {
            if (this.f5075 == null) {
                m7421();
            }
            str = this.f5075;
        }
        return str;
    }

    public final void m7416() {
        synchronized (this.f5099) {
            this.f5040.clear();
        }
    }

    public final synchronized String m7417() {
        return this.f5059;
    }

    public final void m7418(int i, boolean z) {
        C1476.m7583("setActivityForeState, hash:%s isFore:%s", Integer.valueOf(i), Boolean.valueOf(z));
        if (z) {
            this.f5044.add(Integer.valueOf(i));
        } else {
            this.f5044.remove(Integer.valueOf(i));
            this.f5044.remove((Object) 0);
        }
        InterfaceC1478 interfaceC1478 = this.f5087;
        if (interfaceC1478 != null) {
            interfaceC1478.mo738(this.f5044.size() > 0);
        }
    }

    public final Set<String> m7419() {
        Set<String> keySet;
        synchronized (this.f5099) {
            keySet = this.f5040.keySet();
        }
        return keySet;
    }

    public final synchronized Map<String, PlugInBean> m7420() {
        Map<String, PlugInBean> map = this.f5047;
        if (map != null && map.size() > 0) {
            HashMap hashMap = new HashMap(this.f5047.size());
            hashMap.putAll(this.f5047);
            return hashMap;
        }
        return null;
    }

    public final void m7421() {
        synchronized (this.f5084) {
            this.f5075 = UUID.randomUUID().toString();
        }
    }

    public final int m7422() {
        int size;
        synchronized (this.f5099) {
            size = this.f5040.size();
        }
        return size;
    }

    public final String m7423() {
        if (!TextUtils.isEmpty(this.f5046)) {
            C1476.m7583("get cpu type from so:%s", this.f5046);
            return this.f5046;
        }
        if (TextUtils.isEmpty(this.f5096)) {
            return C1312.f4611;
        }
        C1476.m7583("get cpu type from lib dir:%s", this.f5096);
        return this.f5096;
    }

    public final boolean m7424() {
        boolean z = this.f5044.size() > 0;
        C1476.m7583("isAppForeground:%s", Boolean.valueOf(z));
        return z;
    }

    public final String m7425(String str) {
        String str2;
        if (C1471.m7544(str)) {
            C1476.m7591("key should not be empty %s", String.valueOf(str));
            return null;
        }
        synchronized (this.f5099) {
            str2 = this.f5040.get(str);
        }
        return str2;
    }

    public final Map<String, String> m7426() {
        synchronized (this.f5056) {
            if (this.f5050.size() <= 0) {
                return null;
            }
            return new HashMap(this.f5050);
        }
    }
}