40 lines
1.2 KiB
Java
40 lines
1.2 KiB
Java
package c.i.a.f.a.a;
|
|
|
|
import android.content.Context;
|
|
import android.content.SharedPreferences;
|
|
import android.content.pm.PackageManager;
|
|
import android.util.Log;
|
|
import c.i.a.f.e.e;
|
|
public final class b {
|
|
public SharedPreferences a;
|
|
|
|
public b(Context context) {
|
|
Context context2;
|
|
try {
|
|
boolean z2 = e.a;
|
|
try {
|
|
context2 = context.createPackageContext("com.google.android.gms", 3);
|
|
} catch (PackageManager.NameNotFoundException unused) {
|
|
context2 = null;
|
|
}
|
|
this.a = context2 == null ? null : context2.getSharedPreferences("google_ads_flags", 0);
|
|
} catch (Throwable th) {
|
|
Log.w("GmscoreFlag", "Error while getting SharedPreferences ", th);
|
|
this.a = null;
|
|
}
|
|
}
|
|
|
|
public final boolean a(String str) {
|
|
try {
|
|
SharedPreferences sharedPreferences = this.a;
|
|
if (sharedPreferences == null) {
|
|
return false;
|
|
}
|
|
return sharedPreferences.getBoolean(str, false);
|
|
} catch (Throwable th) {
|
|
Log.w("GmscoreFlag", "Error while reading from SharedPreferences ", th);
|
|
return false;
|
|
}
|
|
}
|
|
}
|