146 lines
5.2 KiB
Java
146 lines
5.2 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
import android.provider.Settings;
|
|
import java.util.ArrayList;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
/* renamed from: o.fLk, reason: case insensitive filesystem */
|
|
/* loaded from: classes.dex */
|
|
public final class C12933fLk extends SharedPreferencesC12958fMf {
|
|
public C12933fLk(Context context, String str, String str2) {
|
|
super(context, str, Settings.Secure.getString(context.getContentResolver(), "android_id"), str2);
|
|
C14957gcv.e(context, "");
|
|
C14957gcv.e(this, "");
|
|
C14957gcv.e(str2, "");
|
|
C12937fLo c12937fLo = new C12937fLo();
|
|
c12937fLo.d = context;
|
|
c12937fLo.e = this;
|
|
c12937fLo.a = str2;
|
|
SharedPreferences sharedPreferences = c12937fLo.e;
|
|
if (sharedPreferences == null) {
|
|
C14957gcv.a("");
|
|
sharedPreferences = null;
|
|
}
|
|
if (sharedPreferences.getString("LAST_MIGRATED_VERSION", null) == null) {
|
|
Context context2 = c12937fLo.d;
|
|
if (context2 == null) {
|
|
C14957gcv.a("");
|
|
context2 = null;
|
|
}
|
|
String str3 = c12937fLo.a;
|
|
if (str3 == null) {
|
|
C14957gcv.a("");
|
|
str3 = null;
|
|
}
|
|
SharedPreferencesC12958fMf sharedPreferencesC12958fMf = new SharedPreferencesC12958fMf(context2, "", str3);
|
|
SharedPreferences sharedPreferences2 = c12937fLo.e;
|
|
if (sharedPreferences2 == null) {
|
|
C14957gcv.a("");
|
|
sharedPreferences2 = null;
|
|
}
|
|
SharedPreferences.Editor edit = sharedPreferences2.edit();
|
|
if (sharedPreferencesC12958fMf.getAll().isEmpty()) {
|
|
edit.putString("LAST_MIGRATED_VERSION", C12937fLo.a()).commit();
|
|
return;
|
|
}
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
for (fKH fkh : fKH.values()) {
|
|
String c = SharedPreferencesC12958fMf.c(fkh.value);
|
|
C14957gcv.c((Object) c, "");
|
|
linkedHashMap.put(c, fkh.value);
|
|
}
|
|
fKL[] values = fKL.values();
|
|
ArrayList arrayList = new ArrayList(values.length);
|
|
for (fKL fkl : values) {
|
|
arrayList.add(fkl.value);
|
|
}
|
|
ArrayList arrayList2 = arrayList;
|
|
Map<String, String> all = sharedPreferencesC12958fMf.getAll();
|
|
C14957gcv.c(all, "");
|
|
for (Map.Entry<String, String> entry : all.entrySet()) {
|
|
String str4 = (String) linkedHashMap.get(entry.getKey());
|
|
if (str4 != null) {
|
|
if (arrayList2.contains(str4)) {
|
|
Set<String> stringSet = sharedPreferencesC12958fMf.getStringSet(str4, null);
|
|
if (stringSet != null) {
|
|
C14957gcv.c(stringSet, "");
|
|
Set<String> set = stringSet;
|
|
C14957gcv.e(set, "");
|
|
edit.putStringSet(str4, C14881gav.h((List) C14881gav.b((Iterable) set, new ArrayList())));
|
|
}
|
|
} else {
|
|
edit.putString(str4, entry.getValue());
|
|
}
|
|
}
|
|
}
|
|
edit.putString("LAST_MIGRATED_VERSION", C12937fLo.a());
|
|
edit.commit();
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final String getString(String str, String str2) {
|
|
try {
|
|
return super.getString(str, str2);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return str2;
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final Set<String> getStringSet(String str, Set<String> set) {
|
|
try {
|
|
return super.getStringSet(str, set);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return set;
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final int getInt(String str, int i) {
|
|
try {
|
|
return super.getInt(str, i);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return i;
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final long getLong(String str, long j) {
|
|
try {
|
|
return super.getLong(str, j);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return j;
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final float getFloat(String str, float f) {
|
|
try {
|
|
return super.getFloat(str, f);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return f;
|
|
}
|
|
}
|
|
|
|
@Override // o.SharedPreferencesC12958fMf, android.content.SharedPreferences
|
|
public final boolean getBoolean(String str, boolean z) {
|
|
try {
|
|
return super.getBoolean(str, z);
|
|
} catch (ClassCastException e) {
|
|
guQ.e(e);
|
|
return z;
|
|
}
|
|
}
|
|
}
|