Files
rr3-apk/decompiled/sources/com/ironsource/environment/IronSourceSharedPreferencesUtilities.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -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();
}
}