Files
rr3-apk/decompiled-community/sources/csdk/glucustomersupport/util/StringStore.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

85 lines
2.6 KiB
Java

package csdk.glucustomersupport.util;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes4.dex */
public class StringStore {
private static final String gcsClassName = "csdk.glucentralservices.kvstore.StringStore";
private static final String getMethodName = "get";
private static final Map<Key, String> keys = new HashMap<Key, String>() { // from class: csdk.glucustomersupport.util.StringStore.1
{
put(Key.ANALYTICS_ID, "AnalyticsID");
put(Key.LOCATION_ISO_CODE, "LocationISOCode");
put(Key.IDENTITY_PIN, "IdentityPin");
put(Key.UNDER_AGE_USER, "UnderAge");
put(Key.PREEXISTING_UNDER_AGE_USER, "PreExistingUnderAge");
}
};
private static final String setMethodName = "set";
public enum Key {
ANALYTICS_ID,
LOCATION_ISO_CODE,
IDENTITY_PIN,
UNDER_AGE_USER,
PREEXISTING_UNDER_AGE_USER
}
private static void log(String str) {
}
public static void init() {
set("*init", "glucustomersupport");
}
public static void destroy() {
set("*destroy", "glucustomersupport");
}
private static String get(String str) {
try {
return (String) csdk.glucentralservices.kvstore.StringStore.class.getMethod(getMethodName, String.class).invoke(null, str);
} catch (ClassNotFoundException | NoSuchMethodException unused) {
log("Can't find GCS");
return null;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private static void set(String str, String str2) {
try {
csdk.glucentralservices.kvstore.StringStore.class.getMethod(setMethodName, String.class, String.class).invoke(null, str, str2);
} catch (ClassNotFoundException | NoSuchMethodException unused) {
log("Can't find GCS");
} catch (Exception e) {
e.printStackTrace();
}
}
public static String get(Key key) {
Map<Key, String> map = keys;
if (!map.containsKey(key)) {
log("Invalid Key: " + key);
return null;
}
return get(map.get(key));
}
public static String getOrDefault(Key key, String str) {
String str2 = get(key);
return (str2 == null || str2.isEmpty()) ? str : str2;
}
public static void set(Key key, String str) {
Map<Key, String> map = keys;
if (!map.containsKey(key)) {
log("Invalid Key: " + key);
return;
}
set(map.get(key), str);
}
}