Roblox v2.616.655版本的 MD5 值为:0bc7d8a921fe7f043454ac7c31685936
以下内容为反编译后的 p0.java 源代码,内容仅作参考
package com.roblox.client;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import android.provider.Settings;
import android.text.TextUtils;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.oaid.BuildConfig;
import com.roblox.client.analytics.CrashpadHandler;
import com.roblox.client.i;
import com.roblox.engine.jni.NativeSettingsInterface;
import com.roblox.engine.jni.model.NativeInitCrashpadParams;
import java.io.IOException;
import java.util.Arrays;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.json.JSONArray;
import org.json.JSONException;
public class p0 {
private static c9.d f9624a = null;
private static String f9625b = "";
private static boolean f9626c;
private static String f9627d;
private static boolean f9628e;
private static String f9629f;
private static boolean f9630g;
private static boolean f9631h;
private static String f9632i;
private static String f9633j;
private static String f9634k;
private static boolean f9635l;
static Pattern f9636m;
private static boolean f9637n;
public static SharedPreferences f9638o;
public static String f9639p;
public static int f9640q;
static boolean f9641r;
public class a implements i.c {
final ApplicationInfo f9642a;
a(ApplicationInfo applicationInfo) {
this.f9642a = applicationInfo;
}
@Override
public void a(String str, j jVar) {
if (jVar != null) {
c9.k.a("roblox.config", "crashpad init error " + jVar);
return;
}
NativeInitCrashpadParams.Builder i10 = NativeInitCrashpadParams.builder().c(p0.f1()).d(p0.i()).f(p0.b()).k(c7.c.a().S()).j(c7.c.a().d1()).h(CrashpadHandler.class.getCanonicalName()).g(Arrays.asList("ANDROID_DATA=" + System.getenv("ANDROID_DATA"), "ANDROID_ROOT=" + System.getenv("ANDROID_ROOT"), "ANDROID_STORAGE=" + System.getenv("ANDROID_STORAGE"), "LIBRARYPATH=" + str, "CLASSPATH=.:" + this.f9642a.sourceDir)).i(p0.h0());
if (NativeSettingsInterface.nativeInitCrashpad(i10.e("googleProd" + c9.q.a(BuildConfig.BUILD_TYPE)).b())) {
boolean unused = p0.f9628e = true;
c9.k.f("roblox.config", "Crashpad monitoring is ON");
}
}
}
static {
M0("www.roblox.com/");
O0(BuildConfig.FLAVOR);
if (!f9625b.isEmpty()) {
f9626c = true;
}
f9637n = false;
f9638o = null;
f9639p = BuildConfig.FLAVOR;
f9640q = 0;
f9641r = false;
}
static String A() {
return "exception_reason.txt";
}
public static String A0() {
return i() + "Login/ResetPasswordRequest.aspx";
}
public static String B(String str) {
return i() + "games/?SortFilter=" + str;
}
public static String B0() {
return i() + "login/forgot-password-or-username";
}
private static String C(Context context) {
SharedPreferences Q = Q(context);
String string = Q.getString(AppsFlyerProperties.CHANNEL, BuildConfig.FLAVOR);
Q.edit().remove(AppsFlyerProperties.CHANNEL).apply();
return string;
}
public static String C0(long j10) {
return i() + "my/messages/#!/inbox?conversationId=" + j10;
}
public static String D() {
return "AppAndroidV";
}
public static String D0() {
return a0("profile");
}
public static String E() {
return f9627d;
}
public static void E0(String str, String str2, long j10) {
if (str2 == null) {
str2 = BuildConfig.FLAVOR;
}
try {
JSONArray jSONArray = new JSONArray(P().getString(str, "[]"));
jSONArray.put(str2 + "_" + j10);
P().edit().putString(str, jSONArray.toString()).apply();
} catch (JSONException e10) {
e10.printStackTrace();
}
}
public static String F() {
return f9624a.c();
}
public static String F0() {
return "https://ecsv2." + L() + "mobile/pbe";
}
public static String G() {
return f9624a.d();
}
public static boolean G0() {
return false;
}
public static String H() {
return "12520957";
}
public static String H0() {
return i() + "upgrades/robux";
}
public static String I() {
return "AndroidApp";
}
public static String I0(String str) {
return i() + "catalog?Keyword=" + str;
}
private static String J() {
return c9.l.g() ? "Android-TENCENTPlayer-Crash" : m0() ? "Quest-ROBLOXPlayer-Crash" : "Android-ROBLOXPlayer-Crash";
}
public static String J0(String str) {
return i() + "games/?Keyword=" + str;
}
public static String K() {
return f9624a.a();
}
public static String K0(String str) {
return i() + "search/groups?keyword=" + str;
}
public static String L() {
return f9624a.b();
}
public static String L0(String str) {
return i() + "users/search?keyword=" + str;
}
public static String M(Context context) {
String N = N();
String string = context.getString(c0.CommonUI_Features_Label_Friends);
return "{\"searchParams\":{\"searchType\":\"Players\"},\"url\":\"" + N + "\",\"title\":\"" + string + "\",\"animated\":true}";
}
public static void M0(String str) {
c9.k.f("roblox.config", "setBaseUrl() " + f9624a + " => " + str);
f9624a = new c9.d(str);
f9636m = Pattern.compile(t0(), 2);
}
public static String N() {
return i() + "/users/friends#!/friend-requests";
}
public static void N0(String str) {
if (str != null) {
f9627d = new c9.e().d(str);
} else {
f9627d = null;
}
}
public static String O() {
return "application/json;charset=UTF-8";
}
public static void O0(String str) {
if (str != null) {
c9.k.f("roblox.config", "setChannel() " + f9625b + " => " + str);
f9625b = str.trim();
}
}
public static SharedPreferences P() {
return f9638o;
}
public static void P0(boolean z10) {
f9637n = z10;
}
public static SharedPreferences Q(Context context) {
return c9.p.a(context, "prefs");
}
public static String Q0() {
return k() + "v2/signup";
}
public static String R(String str) {
Matcher matcher = f9636m.matcher(str);
if (matcher.matches()) {
return matcher.group(1);
}
return null;
}
public static String R0() {
return k() + "v1/twostepverification/verify";
}
public static com.roblox.client.components.o S() {
return com.roblox.client.components.o.b(c7.c.a().t());
}
public static String S0() {
return k() + "v1/twostepverification/resend";
}
public static String T() {
return f9625b;
}
public static void T0(Context context) {
f9630g = context.getResources().getBoolean(u.sw500dp);
f9631h = context.getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
}
public static String U() {
return "my/account#!/notifications";
}
public static void U0() {
String d10 = o9.i.e().d(i());
if (d10 == null) {
d10 = BuildConfig.FLAVOR;
}
if (c7.c.a().w0()) {
NativeSettingsInterface.nativeSetMultipleCookies(i(), d10);
} else {
NativeSettingsInterface.nativeSetCookiesForDomain(F(), d10);
}
}
public static String V() {
return "my/account#!/privacy";
}
public static void V0() {
NativeSettingsInterface.nativeSetHttpClientProxy(System.getProperty("http.proxyHost", BuildConfig.FLAVOR), Long.getLong("http.proxyPort", 0L).longValue());
}
public static String W(long j10) {
return c9.q.c("%sv1/users/%d", m(), Long.valueOf(j10));
}
public static void W0() {
NativeSettingsInterface.nativeSetExceptionReasonFilename(A());
NativeSettingsInterface.nativeSetBaseUrl(i(), j());
NativeSettingsInterface.nativeSetRobloxChannel(T());
String str = f9632i;
Objects.requireNonNull(str, "Missing cacheDirectory");
NativeSettingsInterface.nativeSetCacheDirectory(str);
NativeSettingsInterface.nativeSetFilesDirectory(f9633j);
NativeSettingsInterface.nativeInitFastLog();
NativeSettingsInterface.nativeSetRobloxVersion(f1());
c9.c.f4701d.b(new Runnable() {
@Override
public final void run() {
p0.r0();
}
}, com.google.common.util.concurrent.n.a());
f0();
U0();
}
public static String X(long j10) {
return i() + "users/" + j10 + "/friends#!/friend-requests";
}
public static void X0() {
NativeSettingsInterface.nativeSetPlatformHeadersWithIdfa(f9639p, "googleplay", c9.c.d());
}
public static String Y(long j10) {
return i() + "users/" + j10 + "/friends#!/friends";
}
public static String Y0() {
return e() + "v1/mobile-client-version?appVersion=" + D() + f1();
}
public static String Z(long j10) {
return i() + "users/" + j10 + "/profile";
}
public static String Z0() {
return f9629f;
}
static String a0(String str) {
long g10 = x7.g.e().g();
if (g10 != -1) {
return i() + "users/" + g10 + "/" + str;
}
return i() + "users/" + str;
}
public static String a1() {
return m() + "v1/users/authenticated";
}
static String b() {
return J();
}
public static String b0() {
return i() + "home";
}
public static String b1(String str, String str2) {
return c9.q.c("%sv2/passwords/validate?username=%s&password=%s", k(), str, str2);
}
public static boolean c0() {
return f9625b.isEmpty();
}
public static String c1() {
return n() + "v1/google/validate";
}
public static String d(Context context) {
StringBuilder sb2;
int i10;
String str = b9.c.c().k() + " ";
if (b9.c.c().m()) {
sb2 = new StringBuilder();
sb2.append(str);
i10 = c0.CommonUI_Features_Heading_VisibleAgeUnder13;
} else {
sb2 = new StringBuilder();
sb2.append(str);
i10 = c0.CommonUI_Features_Heading_VisibleAgeOver13;
}
sb2.append(context.getString(i10));
return sb2.toString();
}
public static String d0(Context context) {
String absolutePath = context.getCacheDir().getAbsolutePath();
f9632i = absolutePath;
return absolutePath;
}
public static String d1(String str, String str2, String str3) {
return c9.q.c("%sv2/usernames/validate?username=%s&birthday=%s&context=%s", k(), str, str2, str3);
}
static String e() {
return "https://clientsettings." + L();
}
public static void e0(Context context) throws IOException {
f9640q = context.getResources().getDisplayMetrics().densityDpi;
if (!d1.e()) {
f9634k = context.getString(c0.CommonUI_Messages_Response_RequiresNEONInstructions);
} else if (d1.g(context).x < 180) {
f9634k = BuildConfig.FLAVOR;
} else if (Build.MODEL.equals("SM\u00ad-T210R")) {
f9634k = "SM\u00ad-T210R";
}
f9633j = context.getFilesDir().getAbsolutePath();
d0(context);
f9639p = Settings.Secure.getString(context.getContentResolver(), "android_id");
}
public static String e1() {
return n() + "v1/google/purchase";
}
public static String f() {
String str;
String T = T();
StringBuilder sb2 = new StringBuilder();
sb2.append("https://clientsettingscdn.");
sb2.append(L());
sb2.append("v2/settings/application/");
sb2.append(I());
if (T.isEmpty()) {
str = BuildConfig.FLAVOR;
} else {
str = "/bucket/" + T;
}
sb2.append(str);
return sb2.toString();
}
private static void f0() {
if (f9628e) {
return;
}
i.h(new a(RobloxApplication.a().getApplicationInfo()));
}
public static String f1() {
return "2.616.655";
}
public static String g(long j10) {
return "catalog/" + j10 + "/itempage";
}
public static void g0(Context context, u6.c cVar) {
if (cVar != null) {
if (!f9626c) {
O0(cVar.f());
}
String a10 = cVar.a();
if (!TextUtils.isEmpty(a10)) {
c9.k.f("roblox.config", "initConfig: Set base-URL from: " + f9624a + " => " + a10);
M0(a10);
}
}
N0(c9.p.b(context, "configure_dev_roblox", true).getString("BaseApiUrl", null));
f9638o = Q(context);
if (c7.c.a().P0()) {
String C = C(context);
if (!f9626c && !C.isEmpty()) {
c9.k.f("roblox.config", "Found channel from preferences: " + C);
O0(C);
}
}
T0(context);
if (cVar != null && !TextUtils.isEmpty(cVar.i())) {
f9629f = cVar.i();
f9635l = true;
c9.k.j("roblox.config", "Using a custom user agent: " + f9629f);
return;
}
f9629f = o(context);
}
public static String h() {
return l() + "v1/user/currency";
}
public static boolean h0() {
return Build.VERSION.SDK_INT >= 29;
}
public static String i() {
return "https://" + f9624a.d();
}
public static boolean i0() {
return f9631h;
}
public static String j() {
if (f9627d == null) {
return "https://api." + L();
}
return "https://" + f9627d;
}
public static boolean j0(String str) {
String R = R(str);
return (!k0(str)) & ((R == null || R.isEmpty()) ? false : true);
}
public static String k() {
return "https://auth." + L();
}
public static boolean k0(String str) {
return str.contains("Login/FulfillConstraint.aspx") || str.toLowerCase().contains("login/maintenance");
}
public static String l() {
return "https://economy." + L();
}
public static boolean l0() {
return !f9630g;
}
public static String m() {
return "https://users." + L();
}
public static boolean m0() {
return false;
}
static String n() {
return i().replace("www.", "billing.");
}
public static boolean n0() {
return S() == com.roblox.client.components.o.ALL && x7.g.e().i();
}
public static String o(Context context) {
return p(context, "google");
}
public static boolean o0() {
return f9630g;
}
public static String p(Context context, String str) {
return n9.g.a(context, f1(), "AppleWebKit/537.36", "GlobalDist", "GooglePlayStore", "questvr".equals(str), l0(), i0());
}
public static boolean p0() {
return f9624a.c().contains(".robloxlabs.com");
}
public static String q() {
return i() + "mobile-app-upgrades/native-ios/bc";
}
public static boolean q0(String str, String str2, long j10) {
if (str2 == null) {
str2 = BuildConfig.FLAVOR;
}
try {
JSONArray jSONArray = new JSONArray(P().getString(str, "[]"));
for (int i10 = 0; i10 < jSONArray.length(); i10++) {
String string = jSONArray.getString(i10);
if (string.equals(str2 + "_" + j10)) {
return true;
}
}
} catch (JSONException e10) {
e10.printStackTrace();
}
return false;
}
public static String r(String str, String str2) {
return c9.q.c("%scaptcha/app/login?credentialsType=%s&credentialsValue=%s&hybrid-return-token=1", i(), str, str2);
}
public static void r0() {
X0();
la.a.e().b("get_advertisingid_end");
}
public static String s() {
return c9.q.c("%scaptcha/app/signup?hybrid-return-token=1", i());
}
public static String s0() {
StringBuilder sb2;
String str;
if (c7.c.a().N0()) {
sb2 = new StringBuilder();
sb2.append(k());
str = "v2/login";
} else {
sb2 = new StringBuilder();
sb2.append(k());
str = "v1/login";
}
sb2.append(str);
return sb2.toString();
}
public static boolean t(Context context) {
return Q(context).getBoolean("under13", true);
}
static String t0() {
return "^(https?://" + Pattern.quote(G()) + "(?:login|newlogin))(?!/reset-password).*";
}
public static String u() {
return "https://en.help.roblox.com/hc/en-us/articles/212459863";
}
public static String u0() {
return k() + "/v2/logout";
}
public static String v() {
if (f9635l) {
Matcher matcher = Pattern.compile("\\b[A-Za-z]+Dist\\b").matcher(f9629f);
if (matcher.find()) {
return matcher.group();
}
c9.k.c("roblox.config", "Unable to find correct distributor type inside customized user agent.");
return "GlobalDist";
}
return "GlobalDist";
}
public static String v0(long j10) {
return j() + "marketplace/productinfo?assetId=" + j10;
}
public static String w(String str, int i10) {
return "&counterName=" + str + "&amount=" + i10;
}
public static String w0() {
return i() + "my/messages/#!/inbox";
}
public static String x() {
return "https://ephemeralcounters.api." + L() + "v1.1/Counters/Increment/?apiKey=76E5A40C-3AE1-4028-9F10-7C62520BD94F";
}
public static boolean x0() {
return f9637n;
}
public static String y(String str, long j10) {
return "&sequenceName=" + str + "&value=" + j10;
}
public static String y0() {
return i() + c7.c.a().Y0();
}
public static String z() {
return "https://ephemeralcounters.api." + L() + "v1.0/SequenceStatistics/AddToSequence?apiKey=76E5A40C-3AE1-4028-9F10-7C62520BD94F";
}
public static String z0() {
return i() + "login/resetpasswordrequest/success";
}
}