- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
702 lines
23 KiB
Java
702 lines
23 KiB
Java
package com.ironsource;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.app.Activity;
|
|
import android.app.ActivityManager;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.content.pm.ApplicationInfo;
|
|
import android.content.res.Resources;
|
|
import android.media.AudioManager;
|
|
import android.os.Build;
|
|
import android.os.Environment;
|
|
import android.os.PowerManager;
|
|
import android.os.StatFs;
|
|
import android.provider.Settings;
|
|
import android.support.v4.media.session.PlaybackStateCompat;
|
|
import android.telephony.TelephonyManager;
|
|
import android.text.TextUtils;
|
|
import android.util.DisplayMetrics;
|
|
import android.view.WindowManager;
|
|
import android.webkit.WebSettings;
|
|
import com.applovin.sdk.AppLovinEventTypes;
|
|
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
|
|
import com.google.android.gms.appset.AppSet;
|
|
import com.google.android.gms.tasks.OnSuccessListener;
|
|
import com.ironsource.ce;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.environment.IronSourceSharedPreferencesUtilities;
|
|
import com.ironsource.k9;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
|
|
import java.io.File;
|
|
import java.lang.reflect.InvocationHandler;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.Method;
|
|
import java.lang.reflect.Proxy;
|
|
import java.util.Calendar;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import java.util.TimeZone;
|
|
import java.util.UUID;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class ma implements ce, ce.a {
|
|
private static final String A = "IABTCF_TCString";
|
|
private static final String B = "IABTCF_AddtlConsent";
|
|
private static final String i = "android";
|
|
private static final String j = "com.google.android.gms.permission.AD_ID";
|
|
private static final String k = "com.google.android.gms.ads.identifier.AdvertisingIdClient";
|
|
private static final String l = "com.google.android.gms.appset.AppSet";
|
|
private static final String m = "com.google.android.gms.tasks.OnSuccessListener";
|
|
private static final String n = "getAdvertisingIdInfo";
|
|
private static final String o = "getClient";
|
|
private static final String p = "getAppSetIdInfo";
|
|
private static final String q = "addOnSuccessListener";
|
|
private static final String r = "getId";
|
|
private static final String s = "isLimitAdTrackingEnabled";
|
|
private static final String t = "Mediation_Shared_Preferences";
|
|
private static final String u = "supersonic_shared_preferen";
|
|
private static final String v = "cachedUUID";
|
|
private static final String w = "auid";
|
|
private static final String x = "browser_user_agent";
|
|
private static final String y = "browser_user_agent_time";
|
|
private static final String z = "IABTCF_gdprApplies";
|
|
private String b = null;
|
|
private String c = null;
|
|
private String d = "";
|
|
private boolean e = false;
|
|
private String f = "";
|
|
private volatile String g;
|
|
private volatile String h;
|
|
|
|
public class a implements InvocationHandler {
|
|
public a() {
|
|
}
|
|
|
|
@Override // java.lang.reflect.InvocationHandler
|
|
public Object invoke(Object obj, Method method, Object[] objArr) {
|
|
Object obj2;
|
|
if (objArr == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
if (objArr.length <= 0 || (obj2 = objArr[0]) == null) {
|
|
return null;
|
|
}
|
|
String obj3 = obj2.getClass().getMethod(ma.r, new Class[0]).invoke(objArr[0], new Object[0]).toString();
|
|
if (TextUtils.isEmpty(obj3)) {
|
|
return null;
|
|
}
|
|
ma.this.f = obj3;
|
|
return null;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
private String L(Context context) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
|
Object N = N(context);
|
|
return N.getClass().getMethod(r, new Class[0]).invoke(N, new Object[0]).toString();
|
|
}
|
|
|
|
private void M(Context context) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
|
Object invoke = AppSet.class.getMethod(o, Context.class).invoke(AppSet.class, context);
|
|
Object invoke2 = invoke.getClass().getMethod(p, new Class[0]).invoke(invoke, new Object[0]);
|
|
invoke2.getClass().getMethod(q, OnSuccessListener.class).invoke(invoke2, Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[]{OnSuccessListener.class}, new a()));
|
|
}
|
|
|
|
private Object N(Context context) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
|
return AdvertisingIdClient.class.getMethod(n, Context.class).invoke(AdvertisingIdClient.class, context);
|
|
}
|
|
|
|
private String O(Context context) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
|
Object N = N(context);
|
|
return String.valueOf(((Boolean) N.getClass().getMethod("isLimitAdTrackingEnabled", new Class[0]).invoke(N, new Object[0])).booleanValue());
|
|
}
|
|
|
|
private String P(Context context) {
|
|
try {
|
|
return IronSourceSharedPreferencesUtilities.getStringFromSharedPrefs(context, t, x, "");
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return "";
|
|
}
|
|
}
|
|
|
|
private long Q(Context context) {
|
|
try {
|
|
return Long.parseLong(IronSourceSharedPreferencesUtilities.getStringFromSharedPrefs(context, t, y, String.valueOf(-1L)));
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return -1L;
|
|
}
|
|
}
|
|
|
|
private long a(File file) {
|
|
StatFs statFs = new StatFs(file.getPath());
|
|
return (statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong()) / PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED;
|
|
}
|
|
|
|
private void a(Context context, String str) {
|
|
try {
|
|
IronSourceSharedPreferencesUtilities.saveStringToSharedPrefs(context, t, x, str);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
|
|
private void b(Context context, long j2) {
|
|
try {
|
|
IronSourceSharedPreferencesUtilities.saveStringToSharedPrefs(context, t, y, String.valueOf(j2));
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
|
|
private boolean b(String str) {
|
|
try {
|
|
String[] strArr = {"/sbin/", "/system/bin/", "/system/xbin/", "/data/local/xbin/", "/data/local/bin/", "/system/sd/xbin/", "/system/bin/failsafe/", "/data/local/"};
|
|
for (int i2 = 0; i2 < 8; i2++) {
|
|
if (new File(strArr[i2] + str).exists()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String A(Context context) {
|
|
try {
|
|
return IronSourceSharedPreferencesUtilities.getStringFromDefaultSharedPrefs(context, "IABTCF_TCString", null);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean B(Context context) {
|
|
return Settings.System.getInt(context.getContentResolver(), "accelerometer_rotation", 0) != 1;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String C(Context context) {
|
|
return Locale.getDefault().toString();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String D(Context context) {
|
|
if (ja.a.c()) {
|
|
try {
|
|
M(context);
|
|
if (!TextUtils.isEmpty(this.f)) {
|
|
return this.f;
|
|
}
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int E(Context context) {
|
|
return context.getResources().getConfiguration().orientation;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String F(Context context) throws Exception {
|
|
return context.getResources().getConfiguration().locale.getCountry();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean G(Context context) {
|
|
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
int intExtra = registerReceiver != null ? registerReceiver.getIntExtra("status", -1) : -1;
|
|
return intExtra == 2 || intExtra == 5;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String H(Context context) {
|
|
try {
|
|
return IronSourceSharedPreferencesUtilities.getStringFromDefaultSharedPrefs(context, B, null);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int I(Context context) {
|
|
return ((WindowManager) context.getSystemService("window")).getDefaultDisplay().getRotation();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public synchronized String J(Context context) {
|
|
if (!TextUtils.isEmpty(this.b)) {
|
|
return this.b;
|
|
}
|
|
if (IronSourceSharedPreferencesUtilities.getBooleanFromSharedPrefs(context, t, ce.a, true)) {
|
|
String stringFromSharedPrefs = IronSourceSharedPreferencesUtilities.getStringFromSharedPrefs(context, t, v, "");
|
|
if (TextUtils.isEmpty(stringFromSharedPrefs)) {
|
|
String uuid = UUID.randomUUID().toString();
|
|
this.b = uuid;
|
|
IronSourceSharedPreferencesUtilities.saveStringToSharedPrefs(context, t, v, uuid);
|
|
} else {
|
|
this.b = stringFromSharedPrefs;
|
|
}
|
|
}
|
|
return this.b;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int K(Context context) {
|
|
if (context instanceof Activity) {
|
|
return ((Activity) context).getRequestedOrientation();
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int a() {
|
|
return j();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public long a(String str) {
|
|
return a(new File(str));
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String a(Context context) {
|
|
String O;
|
|
try {
|
|
if (!ja.a.a()) {
|
|
O = O(context);
|
|
} else {
|
|
if (this.g == null) {
|
|
String O2 = O(context);
|
|
if (TextUtils.isEmpty(O2)) {
|
|
return O2;
|
|
}
|
|
this.g = O2;
|
|
return O2;
|
|
}
|
|
O = this.g;
|
|
}
|
|
return O;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce.a
|
|
public void a(Context context, long j2) {
|
|
if (context != null) {
|
|
if (!new wt(new k9.a()).a(Q(context), j2)) {
|
|
this.d = P(context);
|
|
this.e = !r0.isEmpty();
|
|
}
|
|
if (this.d.isEmpty()) {
|
|
try {
|
|
String defaultUserAgent = WebSettings.getDefaultUserAgent(context);
|
|
this.d = defaultUserAgent;
|
|
a(context, defaultUserAgent);
|
|
if (j2 > 0) {
|
|
b(context, System.currentTimeMillis());
|
|
}
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean a(Activity activity) {
|
|
int systemUiVisibility = activity.getWindow().getDecorView().getSystemUiVisibility();
|
|
return (systemUiVisibility | 4096) == systemUiVisibility || (systemUiVisibility | 2048) == systemUiVisibility;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String b() {
|
|
String id = TimeZone.getDefault().getID();
|
|
return id != null ? id : "";
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String b(Context context) {
|
|
return context.getResources().getConfiguration().locale.getLanguage();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean c() {
|
|
try {
|
|
if ("mounted".equals(Environment.getExternalStorageState())) {
|
|
return Environment.isExternalStorageRemovable();
|
|
}
|
|
return false;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean c(Context context) {
|
|
try {
|
|
return Settings.System.getInt(context.getContentResolver(), "airplane_mode_on", 0) != 0;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int d() {
|
|
return Resources.getSystem().getDisplayMetrics().widthPixels;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean d(Context context) {
|
|
try {
|
|
return Settings.Global.getInt(context.getContentResolver(), "stay_on_while_plugged_in", 0) != 0;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public File e(Context context) {
|
|
return context.getExternalCacheDir();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String e() {
|
|
return Build.MODEL;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String f(Context context) {
|
|
if (context == null) {
|
|
return "";
|
|
}
|
|
int K = K(context);
|
|
if (K != 0) {
|
|
if (K != 1) {
|
|
if (K != 11) {
|
|
if (K != 12) {
|
|
switch (K) {
|
|
case 6:
|
|
case 8:
|
|
break;
|
|
case 7:
|
|
case 9:
|
|
break;
|
|
default:
|
|
return "none";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return "portrait";
|
|
}
|
|
return "landscape";
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean f() {
|
|
return b("su");
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String g() {
|
|
return Build.MANUFACTURER;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean g(Context context) {
|
|
return context.getResources().getConfiguration().getLayoutDirection() == 1;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public float h() {
|
|
return Resources.getSystem().getDisplayMetrics().density;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public long h(Context context) {
|
|
ActivityManager activityManager = (ActivityManager) context.getSystemService("activity");
|
|
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
|
|
if (activityManager == null) {
|
|
return -1L;
|
|
}
|
|
activityManager.getMemoryInfo(memoryInfo);
|
|
return memoryInfo.totalMem;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public long i() {
|
|
return Calendar.getInstance(TimeZone.getDefault()).getTime().getTime();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String i(Context context) {
|
|
return r(context) ? "Tablet" : "Phone";
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int j() {
|
|
return Resources.getSystem().getDisplayMetrics().heightPixels;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String j(Context context) {
|
|
TelephonyManager telephonyManager;
|
|
return (context == null || (telephonyManager = (TelephonyManager) context.getSystemService("phone")) == null) ? "" : telephonyManager.getNetworkOperatorName();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int k() {
|
|
return Build.VERSION.SDK_INT;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public File k(Context context) {
|
|
return context.getCacheDir();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int l(Context context) {
|
|
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
if (registerReceiver != null) {
|
|
return registerReceiver.getIntExtra("plugged", -1);
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String l() {
|
|
return "android";
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public float m(Context context) {
|
|
AudioManager audioManager = (AudioManager) context.getSystemService("audio");
|
|
try {
|
|
return audioManager.getStreamVolume(3) / audioManager.getStreamMaxVolume(3);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return -1.0f;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public long m() {
|
|
if (c()) {
|
|
return a(Environment.getExternalStorageDirectory());
|
|
}
|
|
return 0L;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public long n() {
|
|
return a(Environment.getDataDirectory());
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String n(Context context) {
|
|
TelephonyManager telephonyManager;
|
|
return (context == null || (telephonyManager = (TelephonyManager) context.getSystemService("phone")) == null) ? "" : telephonyManager.getNetworkCountryIso();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String o() {
|
|
return Build.VERSION.RELEASE;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
@SuppressLint({"QueryPermissionsNeeded"})
|
|
public List<ApplicationInfo> o(Context context) {
|
|
return context.getPackageManager().getInstalledApplications(0);
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int p() {
|
|
return -(TimeZone.getDefault().getOffset(i()) / MBridgeCommon.DEFAULT_LOAD_TIMEOUT);
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String p(Context context) {
|
|
String L;
|
|
ja jaVar = ja.a;
|
|
if (!jaVar.b()) {
|
|
return null;
|
|
}
|
|
try {
|
|
if (!jaVar.a()) {
|
|
L = L(context);
|
|
} else {
|
|
if (this.h == null) {
|
|
String L2 = L(context);
|
|
if (TextUtils.isEmpty(L2)) {
|
|
return L2;
|
|
}
|
|
this.h = L2;
|
|
return L2;
|
|
}
|
|
L = this.h;
|
|
}
|
|
return L;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean q() {
|
|
return this.e;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean q(Context context) {
|
|
try {
|
|
return ((PowerManager) context.getSystemService("power")).isPowerSaveMode();
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int r() {
|
|
return d();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean r(Context context) {
|
|
WindowManager windowManager = (WindowManager) context.getSystemService("window");
|
|
if (windowManager == null) {
|
|
return false;
|
|
}
|
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
|
windowManager.getDefaultDisplay().getMetrics(displayMetrics);
|
|
return ((float) displayMetrics.widthPixels) / displayMetrics.density >= 600.0f;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public String s() {
|
|
try {
|
|
return this.d.isEmpty() ? P(ContextProvider.getInstance().getApplicationContext()) : this.d;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public synchronized String s(Context context) {
|
|
if (!TextUtils.isEmpty(this.c)) {
|
|
return this.c;
|
|
}
|
|
if (context == null) {
|
|
return "";
|
|
}
|
|
String stringFromSharedPrefs = IronSourceSharedPreferencesUtilities.getStringFromSharedPrefs(context, "supersonic_shared_preferen", "auid", "");
|
|
this.c = stringFromSharedPrefs;
|
|
if (TextUtils.isEmpty(stringFromSharedPrefs)) {
|
|
String uuid = UUID.randomUUID().toString();
|
|
this.c = uuid;
|
|
IronSourceSharedPreferencesUtilities.saveStringToSharedPrefs(context, "supersonic_shared_preferen", "auid", uuid);
|
|
}
|
|
return this.c;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public File t(Context context) {
|
|
return context.getExternalFilesDir(null);
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public boolean u(Context context) {
|
|
try {
|
|
for (String str : context.getPackageManager().getPackageInfo(context.getPackageName(), 4096).requestedPermissions) {
|
|
if (str.equalsIgnoreCase(j)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return false;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public File v(Context context) {
|
|
return context.getFilesDir();
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int w(Context context) {
|
|
try {
|
|
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
int intExtra = registerReceiver != null ? registerReceiver.getIntExtra(AppLovinEventTypes.USER_COMPLETED_LEVEL, -1) : 0;
|
|
int intExtra2 = registerReceiver != null ? registerReceiver.getIntExtra("scale", -1) : 0;
|
|
if (intExtra == -1 || intExtra2 == -1) {
|
|
return -1;
|
|
}
|
|
return (int) ((intExtra / intExtra2) * 100.0f);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
IronLog.INTERNAL.error(e.toString());
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int x(Context context) {
|
|
int I = I(context);
|
|
int E = E(context);
|
|
return (((I == 0 || I == 2) && E == 2) || ((I == 1 || I == 3) && E == 1)) ? 2 : 1;
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int y(Context context) {
|
|
try {
|
|
return IronSourceSharedPreferencesUtilities.getIntFromDefaultSharedPrefs(context, "IABTCF_gdprApplies", -1);
|
|
} catch (Exception e) {
|
|
i9.d().a(e);
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.ce
|
|
public int z(Context context) {
|
|
if (context != null) {
|
|
return Settings.System.getInt(context.getContentResolver(), "screen_brightness", -1);
|
|
}
|
|
return -1;
|
|
}
|
|
}
|