Files
rr3-apk/decompiled-community/sources/com/ironsource/environment/IronSourceSharedPreferencesUtilities.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

64 lines
2.3 KiB
Java

package com.ironsource.environment;
import android.content.Context;
import android.content.SharedPreferences;
/* loaded from: classes4.dex */
public class IronSourceSharedPreferencesUtilities {
private static final String a = "_preferences";
public static int a(Context context, String str, String str2, int i) {
return context == null ? i : context.getSharedPreferences(str, 0).getInt(str2, i);
}
public static void a(Context context, String str, String str2, boolean z) {
if (context == null) {
return;
}
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putBoolean(str2, z);
edit.apply();
}
public static boolean getBooleanFromSharedPrefs(Context context, String str, String str2, boolean z) {
return context == null ? z : context.getSharedPreferences(str, 0).getBoolean(str2, z);
}
public static String getDefaultSharedPrefName(Context context, String str) {
if (context == null) {
return str;
}
return context.getPackageName() + a;
}
public static int getIntFromDefaultSharedPrefs(Context context, String str, int i) {
return a(context, getDefaultSharedPrefName(context, ""), str, i);
}
public static String getStringFromDefaultSharedPrefs(Context context, String str, String str2) {
return getStringFromSharedPrefs(context, getDefaultSharedPrefName(context, ""), str, str2);
}
public static String getStringFromSharedPrefs(Context context, String str, String str2, String str3) {
return context == null ? str3 : context.getSharedPreferences(str, 0).getString(str2, str3);
}
public static void saveIntToSharedPrefs(Context context, String str, String str2, int i) {
if (context == null) {
return;
}
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putInt(str2, i);
edit.apply();
}
public static void saveStringToSharedPrefs(Context context, String str, String str2, String str3) {
if (context == null) {
return;
}
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putString(str2, str3);
edit.apply();
}
}