- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
47 lines
1.5 KiB
Java
47 lines
1.5 KiB
Java
package csdk.starlightsecurity.util;
|
|
|
|
/* 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 String setMethodName = "set";
|
|
|
|
private static void log(String str) {
|
|
}
|
|
|
|
public static void init() {
|
|
set("*init", "starlightsecurity");
|
|
}
|
|
|
|
public static void destroy() {
|
|
set("*destroy", "starlightsecurity");
|
|
}
|
|
|
|
public 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;
|
|
}
|
|
}
|
|
|
|
public 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 getOrDefault(String str, String str2) {
|
|
String str3 = get(str);
|
|
return (str3 == null || str3.isEmpty()) ? str2 : str3;
|
|
}
|
|
}
|