正在查看: moonshot.企业版 v5.53.33 应用的 C0221.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: moonshot.企业版 v5.53.33 应用的 C0221.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package jnksI9k6J1HFuFo5YzBf.DdEnhsMlZWtEOFIm1zd3.UBVL9U3WwxbAPwDW6rA5.jnksI9k6J1HFuFo5YzBf;
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 jnksI9k6J1HFuFo5YzBf.pSr7Go6RrgekNCYHzK57.UBVL9U3WwxbAPwDW6rA5.C1445;
public final class C0221 {
private String f1958;
public final String f1960;
public int f1966;
public List<String> f1968;
public final SharedPreferences f1975;
public String f1979;
private String f1983;
public boolean f1985;
public final SharedPreferences f1996;
public String f1999;
public String f2003;
public String f2006;
private final Context f2007;
private String f2009;
public String f2012;
private String f2015;
public final String f2017;
public String f2018;
public String f2021;
public String f2023;
public String f2025;
public boolean f2028;
public String f2030;
private static final Map<String, String> f1955 = new HashMap();
private static C0221 f1954 = null;
public boolean f1984 = true;
public final String f2022 = "com.tencent.bugly";
public String f1961 = "4.1.9.3";
public final String f1986 = "";
@Deprecated
public final String f1990 = "";
public String f1957 = C1445.f5151;
private String f1994 = C1445.f5151;
private String f2008 = "";
public long f1991 = 0;
private String f1962 = null;
private long f1967 = -1;
private long f1988 = -1;
private long f1989 = -1;
private String f2029 = null;
private String f1978 = null;
private Map<String, PlugInBean> f2001 = null;
public boolean f1976 = false;
private String f2002 = null;
private Boolean f1973 = null;
private String f2016 = null;
public String f1977 = null;
public String f2000 = null;
private Map<String, PlugInBean> f2024 = null;
private Map<String, PlugInBean> f2004 = null;
public int f1963 = -1;
public int f1995 = -1;
private final Map<String, String> f1982 = new HashMap();
private final Map<String, String> f1964 = new HashMap();
private final Map<String, String> f2014 = new HashMap();
public String f2020 = C1445.f5151;
public long f1956 = 0;
public long f2011 = 0;
public long f1974 = 0;
public long f1971 = 0;
public boolean f1969 = false;
public HashMap<String, String> f1998 = new HashMap<>();
public List<String> f1997 = new ArrayList();
public boolean f1972 = false;
public InterfaceC0250 f1965 = null;
public boolean f1970 = true;
public boolean f2027 = true;
public boolean f1993 = false;
private final Object f2010 = new Object();
public final Object f2026 = new Object();
private final Object f2005 = new Object();
private final Object f2013 = new Object();
public final Object f1980 = new Object();
public final Object f1987 = new Object();
private final Object f1959 = new Object();
private final List<Integer> f2019 = new ArrayList();
public final long f1992 = System.currentTimeMillis();
public final byte f1981 = 1;
private C0221(Context context) {
this.f2015 = null;
this.f2012 = null;
this.f2023 = null;
this.f2025 = null;
this.f2003 = null;
this.f1968 = null;
this.f1985 = false;
this.f1999 = null;
this.f2018 = null;
this.f2006 = null;
this.f2021 = "";
this.f2028 = false;
this.f2007 = C0310.m1747(context);
PackageInfo m1628 = C0272.m1628(context);
if (m1628 != null) {
try {
String str = m1628.versionName;
this.f2012 = str;
this.f1999 = str;
this.f2018 = Integer.toString(m1628.versionCode);
} catch (Throwable th) {
if (!C0264.m1605(th)) {
th.printStackTrace();
}
}
}
this.f2030 = C0272.m1627(context);
this.f1960 = C0272.m1633(Process.myPid());
this.f2023 = C0272.m1629(context);
this.f2017 = "Android " + C0293.m1702() + ",level " + C0293.m1716();
Map<String, String> m1631 = C0272.m1631(context);
if (m1631 != null) {
try {
this.f1968 = C0272.m1632(m1631);
String str2 = m1631.get("BUGLY_APPID");
if (str2 != null) {
this.f2025 = str2;
m1431("APP_ID", str2);
}
String str3 = m1631.get("BUGLY_APP_VERSION");
if (str3 != null) {
this.f2012 = str3;
}
String str4 = m1631.get("BUGLY_APP_CHANNEL");
if (str4 != null) {
this.f2003 = str4;
}
String str5 = m1631.get("BUGLY_ENABLE_DEBUG");
if (str5 != null) {
this.f1985 = str5.equalsIgnoreCase("true");
}
String str6 = m1631.get("com.tencent.rdm.uuid");
if (str6 != null) {
this.f2006 = str6;
}
String str7 = m1631.get("BUGLY_APP_BUILD_NO");
if (!TextUtils.isEmpty(str7)) {
this.f1966 = Integer.parseInt(str7);
}
String str8 = m1631.get("BUGLY_AREA");
if (str8 != null) {
this.f2021 = str8;
}
} catch (Throwable th2) {
if (!C0264.m1605(th2)) {
th2.printStackTrace();
}
}
}
try {
if (!context.getDatabasePath("bugly_db_").exists()) {
this.f2028 = true;
C0264.m1601("App is first time to be installed on the device.", new Object[0]);
}
} catch (Throwable th3) {
if (C0312.f2340) {
th3.printStackTrace();
}
}
this.f1996 = C0310.m1719("BUGLY_COMMON_VALUES", context);
this.f1975 = C0310.m1719("BUGLY_RESERVED_VALUES", context);
this.f2015 = C0293.m1696(context);
m1430();
C0264.m1601("com info create end", new Object[0]);
}
public static int m1421() {
return C0293.m1716();
}
private String m1422() {
if (TextUtils.isEmpty(this.f1962)) {
this.f1962 = C0310.m1726("androidid", null);
}
return this.f1962;
}
private static String m1423() {
String uuid = UUID.randomUUID().toString();
return !C0310.m1745(uuid) ? uuid.replaceAll(Constants.ACCEPT_TIME_SEPARATOR_SERVER, "") : uuid;
}
@Deprecated
public static boolean m1424() {
C0264.m1600("Detect if the device hook is unavailable", new Object[0]);
return false;
}
public static synchronized C0221 m1425(Context context) {
C0221 c0221;
synchronized (C0221.class) {
if (f1954 == null) {
f1954 = new C0221(context);
}
c0221 = f1954;
}
return c0221;
}
private void m1426(String str, String str2, boolean z) {
if (C0310.m1745(str)) {
C0264.m1604("key should not be empty %s", str);
return;
}
C0264.m1601("putExtraRequestData key:%s value:%s save:%s", str, str2, Boolean.valueOf(z));
synchronized (this.f1959) {
if (TextUtils.isEmpty(str2)) {
this.f1964.remove(str);
this.f1975.edit().remove(str).apply();
} else {
this.f1964.put(str, str2);
if (z) {
this.f1975.edit().putString(str, str2).apply();
}
}
}
}
@Deprecated
public static boolean m1427() {
C0264.m1600("Detect if the emulator is unavailable", new Object[0]);
return false;
}
public static synchronized C0221 m1428() {
C0221 c0221;
synchronized (C0221.class) {
c0221 = f1954;
}
return c0221;
}
@Deprecated
public static String m1429() {
return "";
}
private void m1430() {
try {
for (Map.Entry<String, ?> entry : this.f1975.getAll().entrySet()) {
C0264.m1601("put reserved request data from sp, key:%s value:%s", entry.getKey(), entry.getValue());
m1426(entry.getKey(), entry.getValue().toString(), false);
}
for (Map.Entry<String, String> entry2 : f1955.entrySet()) {
C0264.m1601("put reserved request data from cache, key:%s value:%s", entry2.getKey(), entry2.getValue());
m1426(entry2.getKey(), entry2.getValue(), true);
}
f1955.clear();
} catch (Throwable th) {
C0264.m1599(th);
}
}
public final void m1431(String str, String str2) {
if (C0310.m1745(str) || C0310.m1745(str2)) {
C0264.m1604("server key&value should not be empty %s %s", String.valueOf(str), String.valueOf(str2));
return;
}
synchronized (this.f2013) {
this.f2014.put(str, str2);
}
}
public final void m1432(String str) {
this.f2009 = str;
if (!TextUtils.isEmpty(str)) {
C0310.m1742("deviceId", str);
}
synchronized (this.f1959) {
this.f1964.put("E8", str);
}
}
public final synchronized void m1433(String str) {
this.f2008 = String.valueOf(str);
}
public final Set<String> m1434() {
Set<String> keySet;
synchronized (this.f2005) {
keySet = this.f1982.keySet();
}
return keySet;
}
public final int m1435() {
int i;
synchronized (this.f1980) {
i = this.f1963;
}
return i;
}
public final long m1436() {
if (this.f1989 <= 0) {
this.f1989 = C0293.m1714();
}
return this.f1989;
}
public final String m1437() {
return !C0310.m1745(this.f1979) ? this.f1979 : this.f2025;
}
public final int m1438() {
int size;
synchronized (this.f2005) {
size = this.f1982.size();
}
return size;
}
public final synchronized Map<String, PlugInBean> m1439() {
Map<String, PlugInBean> map = this.f2001;
if (map != null && map.size() > 0) {
HashMap hashMap = new HashMap(this.f2001.size());
hashMap.putAll(this.f2001);
return hashMap;
}
return null;
}
public final synchronized String m1440() {
return this.f2008;
}
public final Boolean m1441() {
if (this.f1973 == null) {
this.f1973 = Boolean.valueOf(C0293.m1699());
}
return this.f1973;
}
public final String m1442() {
String str = this.f2009;
if (str != null) {
return str;
}
String m1726 = C0310.m1726("deviceId", null);
this.f2009 = m1726;
if (m1726 != null) {
return m1726;
}
String m1422 = m1422();
this.f2009 = m1422;
if (TextUtils.isEmpty(m1422)) {
this.f2009 = m1423();
}
String str2 = this.f2009;
if (str2 == null) {
return "";
}
C0310.m1742("deviceId", str2);
return this.f2009;
}
public final Map<String, String> m1443() {
synchronized (this.f2013) {
if (this.f2014.size() <= 0) {
return null;
}
return new HashMap(this.f2014);
}
}
public final boolean m1444() {
boolean z = this.f2019.size() > 0;
C0264.m1601("isAppForeground:%s", Boolean.valueOf(z));
return z;
}
public final void m1445(String str, String str2) {
if (C0310.m1745(str) || C0310.m1745(str2)) {
C0264.m1604("key&value should not be empty %s %s", String.valueOf(str), String.valueOf(str2));
return;
}
synchronized (this.f2005) {
this.f1982.put(str, str2);
}
}
public final void m1446(String str) {
if (TextUtils.isEmpty(str)) {
return;
}
this.f1978 = str.trim();
}
public final String m1447() {
String str;
synchronized (this.f1987) {
str = this.f1957;
}
return str;
}
public final String m1448() {
String str;
synchronized (this.f2010) {
if (this.f1958 == null) {
m1449();
}
str = this.f1958;
}
return str;
}
public final void m1449() {
synchronized (this.f2010) {
this.f1958 = UUID.randomUUID().toString();
}
}
public final Map<String, String> m1450() {
synchronized (this.f1959) {
if (this.f1964.size() <= 0) {
return null;
}
return new HashMap(this.f1964);
}
}
public final String m1451() {
if (this.f2016 == null) {
String str = C0293.m1710();
this.f2016 = str;
C0264.m1600("ROM ID: %s", str);
}
return this.f2016;
}
public final synchronized String m1452() {
String str = this.f1983;
if (str != null) {
return str;
}
String m1726 = C0310.m1726("deviceModel", null);
this.f1983 = m1726;
if (m1726 != null) {
C0264.m1601("collect device model from sp:%s", m1726);
return this.f1983;
}
if (!this.f1976) {
C0264.m1601("not allow collect device model", new Object[0]);
return "fail";
}
String m1711 = C0293.m1711();
this.f1983 = m1711;
C0264.m1601("collect device model:%s", m1711);
C0310.m1742("deviceModel", this.f1983);
return this.f1983;
}
public final long m1453() {
if (this.f1967 <= 0) {
this.f1967 = C0293.m1704();
}
return this.f1967;
}
public final String m1454() {
try {
Map<String, ?> all = this.f2007.getSharedPreferences("BuglySdkInfos", 0).getAll();
if (!all.isEmpty()) {
synchronized (this.f2026) {
for (Map.Entry<String, ?> entry : all.entrySet()) {
try {
this.f1998.put(entry.getKey(), entry.getValue().toString());
} catch (Throwable th) {
C0264.m1605(th);
}
}
}
}
} catch (Throwable th2) {
C0264.m1605(th2);
}
if (this.f1998.isEmpty()) {
C0264.m1601("SDK_INFO is empty", new Object[0]);
return null;
}
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, String> entry2 : this.f1998.entrySet()) {
sb.append("[");
sb.append(entry2.getKey());
sb.append(",");
sb.append(entry2.getValue());
sb.append("] ");
}
C0264.m1601("SDK_INFO = %s", sb.toString());
m1431("SDK_INFO", sb.toString());
return sb.toString();
}
public final void m1455() {
synchronized (this.f2005) {
this.f1982.clear();
}
}
public final synchronized Map<String, PlugInBean> m1456() {
Map<String, PlugInBean> map;
map = this.f2024;
Map<String, PlugInBean> map2 = this.f2004;
if (map2 != null) {
map.putAll(map2);
}
return map;
}
public final synchronized void m1457(String str) {
this.f1994 = String.valueOf(str);
}
public final void m1458(String str) {
C0264.m1600("change deviceModel,old:%s new:%s", this.f1983, str);
this.f1983 = str;
if (TextUtils.isEmpty(str)) {
return;
}
C0310.m1742("deviceModel", str);
}
public final long m1459() {
if (this.f1988 <= 0) {
this.f1988 = C0293.m1707();
}
return this.f1988;
}
public final String m1460(String str) {
String str2;
if (C0310.m1745(str)) {
C0264.m1604("key should not be empty %s", String.valueOf(str));
return null;
}
synchronized (this.f2005) {
str2 = this.f1982.get(str);
}
return str2;
}
public final String m1461() {
if (this.f2002 == null) {
this.f2002 = C0293.m1695();
}
return this.f2002;
}
public final void m1462(int i, boolean z) {
C0264.m1601("setActivityForeState, hash:%s isFore:%s", Integer.valueOf(i), Boolean.valueOf(z));
if (z) {
this.f2019.add(Integer.valueOf(i));
} else {
this.f2019.remove(Integer.valueOf(i));
this.f2019.remove((Object) 0);
}
InterfaceC0250 interfaceC0250 = this.f1965;
if (interfaceC0250 != null) {
interfaceC0250.mo720(this.f2019.size() > 0);
}
}
public final String m1463() {
if (!TextUtils.isEmpty(this.f1978)) {
C0264.m1601("get cpu type from so:%s", this.f1978);
return this.f1978;
}
if (TextUtils.isEmpty(this.f2015)) {
return C1445.f5151;
}
C0264.m1601("get cpu type from lib dir:%s", this.f2015);
return this.f2015;
}
public final Map<String, String> m1464() {
synchronized (this.f2005) {
if (this.f1982.size() <= 0) {
return null;
}
return new HashMap(this.f1982);
}
}
public final String m1465(String str) {
String remove;
if (C0310.m1745(str)) {
C0264.m1604("key should not be empty %s", String.valueOf(str));
return null;
}
synchronized (this.f2005) {
remove = this.f1982.remove(str);
}
return remove;
}
}