正在查看: CityMall v1.42.1 应用的 AbstractC6843a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CityMall v1.42.1 应用的 AbstractC6843a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package r3;
import Z2.e;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import com.facebook.react.AbstractC2256o;
import in.juspay.hyper.constants.LogSubCategory;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.Locale;
import java.util.Map;
public abstract class AbstractC6843a {
private static final String f56701a = "a";
private static String f56702b;
public static String a(Context context) {
return b(c(context));
}
public static String b(Integer num) {
return "adb reverse tcp:" + num + " tcp:" + num;
}
private static Integer c(Context context) {
return Integer.valueOf(context.getResources().getInteger(AbstractC2256o.f20004a));
}
public static String d() {
if (j()) {
return Build.MODEL;
}
return Build.MODEL + " - " + Build.VERSION.RELEASE + " - API " + Build.VERSION.SDK_INT;
}
public static Map e(Context context) {
String str;
String str2;
if (context != null) {
ApplicationInfo applicationInfo = context.getApplicationInfo();
int i8 = applicationInfo.labelRes;
String packageName = context.getPackageName();
str = i8 == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(i8);
str2 = packageName;
} else {
str = null;
str2 = null;
}
return e.h("appDisplayName", str, "appIdentifier", str2, "platform", LogSubCategory.LifeCycle.ANDROID, "deviceName", Build.MODEL, "reactNativeVersion", g());
}
private static synchronized String f() {
BufferedReader bufferedReader;
Throwable th;
Process process;
Exception e8;
synchronized (AbstractC6843a.class) {
String str = f56702b;
if (str != null) {
return str;
}
try {
try {
process = Runtime.getRuntime().exec(new String[]{"/system/bin/getprop", "metro.host"});
} catch (Throwable th2) {
th = th2;
}
} catch (Exception e9) {
bufferedReader = null;
e8 = e9;
process = null;
} catch (Throwable th3) {
bufferedReader = null;
th = th3;
process = null;
}
try {
bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream(), Charset.forName("UTF-8")));
String str2 = "";
while (true) {
try {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
str2 = readLine;
} catch (Exception e10) {
e8 = e10;
L1.a.K(f56701a, "Failed to query for metro.host prop:", e8);
f56702b = "";
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused) {
}
}
}
}
f56702b = str2;
try {
bufferedReader.close();
} catch (Exception unused2) {
}
} catch (Exception e11) {
bufferedReader = null;
e8 = e11;
} catch (Throwable th4) {
bufferedReader = null;
th = th4;
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused3) {
}
}
if (process == null) {
throw th;
}
process.destroy();
throw th;
}
process.destroy();
return f56702b;
}
}
private static String g() {
String str;
Map map = b.f56703a;
StringBuilder sb = new StringBuilder();
sb.append(map.get("major"));
sb.append(".");
sb.append(map.get("minor"));
sb.append(".");
sb.append(map.get("patch"));
if (map.get("prerelease") != null) {
str = "-" + map.get("prerelease");
} else {
str = "";
}
sb.append(str);
return sb.toString();
}
public static String h(Context context) {
return i(c(context).intValue());
}
private static String i(int i8) {
String f8 = f();
if (f8.equals("")) {
f8 = j() ? "10.0.3.2" : k() ? "10.0.2.2" : "localhost";
}
return String.format(Locale.US, "%s:%d", f8, Integer.valueOf(i8));
}
private static boolean j() {
return Build.FINGERPRINT.contains("vbox");
}
private static boolean k() {
String str = Build.FINGERPRINT;
return str.contains("generic") || str.startsWith("google/sdk_gphone");
}
}