正在查看: Dostt v1.0.89 应用的 AbstractC2340a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Dostt v1.0.89 应用的 AbstractC2340a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package a6;
import D5.e;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import com.cashfree.pg.core.hidden.utils.Constants;
import com.facebook.react.AbstractC2945o;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.Locale;
import java.util.Map;
public abstract class AbstractC2340a {
private static final String f20207a = "a";
private static String f20208b;
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(AbstractC2945o.f31567a));
}
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 i10 = applicationInfo.labelRes;
String packageName = context.getPackageName();
str = i10 == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(i10);
str2 = packageName;
} else {
str = null;
str2 = null;
}
return e.h("appDisplayName", str, "appIdentifier", str2, Constants.SDK_PLATFORM, "android", "deviceName", Build.MODEL, "reactNativeVersion", g());
}
private static synchronized String f() {
BufferedReader bufferedReader;
Throwable th2;
Process process;
Exception e10;
synchronized (AbstractC2340a.class) {
String str = f20208b;
if (str != null) {
return str;
}
try {
try {
process = Runtime.getRuntime().exec(new String[]{"/system/bin/getprop", "metro.host"});
} catch (Throwable th3) {
th2 = th3;
}
} catch (Exception e11) {
bufferedReader = null;
e10 = e11;
process = null;
} catch (Throwable th4) {
bufferedReader = null;
th2 = th4;
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 e12) {
e10 = e12;
U3.a.K(f20207a, "Failed to query for metro.host prop:", e10);
f20208b = "";
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused) {
}
}
}
}
f20208b = str2;
try {
bufferedReader.close();
} catch (Exception unused2) {
}
} catch (Exception e13) {
bufferedReader = null;
e10 = e13;
} catch (Throwable th5) {
bufferedReader = null;
th2 = th5;
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused3) {
}
}
if (process == null) {
throw th2;
}
process.destroy();
throw th2;
}
process.destroy();
return f20208b;
}
}
private static String g() {
String str;
Map map = AbstractC2341b.f20209a;
StringBuilder sb2 = new StringBuilder();
sb2.append(map.get("major"));
sb2.append(".");
sb2.append(map.get("minor"));
sb2.append(".");
sb2.append(map.get("patch"));
if (map.get("prerelease") != null) {
str = "-" + map.get("prerelease");
} else {
str = "";
}
sb2.append(str);
return sb2.toString();
}
public static String h(Context context) {
return i(c(context).intValue());
}
private static String i(int i10) {
String f10 = f();
if (f10.equals("")) {
f10 = j() ? "10.0.3.2" : k() ? "10.0.2.2" : "localhost";
}
return String.format(Locale.US, "%s:%d", f10, Integer.valueOf(i10));
}
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");
}
}