- 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
189 lines
6.7 KiB
Java
189 lines
6.7 KiB
Java
package com.fyber.inneractive.sdk.serverapi;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.app.NotificationManager;
|
|
import android.bluetooth.BluetoothManager;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.media.AudioDeviceInfo;
|
|
import android.media.AudioManager;
|
|
import android.os.Build;
|
|
import android.os.PowerManager;
|
|
import android.provider.Settings;
|
|
import android.text.TextUtils;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.d0;
|
|
import com.fyber.inneractive.sdk.config.e0;
|
|
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
|
|
import com.fyber.inneractive.sdk.config.g0;
|
|
import com.fyber.inneractive.sdk.config.x;
|
|
import com.fyber.inneractive.sdk.util.o;
|
|
import com.ironsource.r8;
|
|
import com.ironsource.zm;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.unity3d.services.core.properties.MadeWithUnityDetector;
|
|
import java.util.Arrays;
|
|
import java.util.Calendar;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class a {
|
|
public static final C0108a a = new C0108a();
|
|
public static final List<String> b = Arrays.asList("POWER_SAVE_MODE_OPEN", "SmartModeStatus");
|
|
|
|
/* renamed from: com.fyber.inneractive.sdk.serverapi.a$a, reason: collision with other inner class name */
|
|
public class C0108a extends HashMap<String, Integer> {
|
|
public C0108a() {
|
|
put("HUAWEI", 4);
|
|
put("XIAOMI", 1);
|
|
}
|
|
}
|
|
|
|
public static String a(float f) {
|
|
return f < 5.0f ? "1" : f <= 9.0f ? "2" : f <= 24.0f ? "3" : f <= 39.0f ? "4" : f <= 54.0f ? CampaignEx.CLICKMODE_ON : f <= 69.0f ? "6" : f <= 84.0f ? zm.e : f <= 100.0f ? "8" : "";
|
|
}
|
|
|
|
public static String b() {
|
|
return String.valueOf(Build.VERSION.SDK_INT);
|
|
}
|
|
|
|
public static Long c() {
|
|
try {
|
|
return Long.valueOf(TimeUnit.MINUTES.convert(Calendar.getInstance().getTimeZone().getOffset(System.currentTimeMillis()), TimeUnit.MILLISECONDS));
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@SuppressLint({"MissingPermission"})
|
|
public static Boolean e() {
|
|
if (o.b("android.permission.BLUETOOTH")) {
|
|
try {
|
|
BluetoothManager bluetoothManager = (BluetoothManager) o.a.getSystemService(r8.d);
|
|
if (bluetoothManager.getAdapter().getProfileConnectionState(1) != 2 && bluetoothManager.getAdapter().getProfileConnectionState(2) != 2) {
|
|
return null;
|
|
}
|
|
return Boolean.TRUE;
|
|
} catch (Throwable unused) {
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public static Boolean k() {
|
|
Integer num;
|
|
try {
|
|
String upperCase = Build.MANUFACTURER.toUpperCase(Locale.getDefault());
|
|
if (TextUtils.isEmpty(upperCase) || !a.containsKey(upperCase)) {
|
|
return Boolean.valueOf(((PowerManager) o.a.getSystemService("power")).isPowerSaveMode());
|
|
}
|
|
try {
|
|
Iterator<String> it = b.iterator();
|
|
while (it.hasNext()) {
|
|
int i = Settings.System.getInt(o.a.getContentResolver(), it.next(), -1);
|
|
if (i != -1 && (num = a.get(upperCase)) != null) {
|
|
return Boolean.valueOf(num.intValue() == i);
|
|
}
|
|
}
|
|
return null;
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
} catch (Throwable unused2) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static Boolean f() {
|
|
return Boolean.valueOf((o.a.getResources().getConfiguration().uiMode & 48) == 32);
|
|
}
|
|
|
|
public static Boolean g() {
|
|
int intExtra;
|
|
try {
|
|
Intent registerReceiver = o.a.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
boolean z = false;
|
|
if (registerReceiver != null && ((intExtra = registerReceiver.getIntExtra("plugged", -1)) == 1 || intExtra == 2 || intExtra == 4)) {
|
|
z = true;
|
|
}
|
|
return Boolean.valueOf(z);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static Boolean h() {
|
|
try {
|
|
int ringerMode = ((AudioManager) o.a.getSystemService("audio")).getRingerMode();
|
|
boolean z = true;
|
|
if (ringerMode != 0 && ringerMode != 1) {
|
|
z = false;
|
|
}
|
|
return Boolean.valueOf(z);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static Boolean i() {
|
|
try {
|
|
int currentInterruptionFilter = ((NotificationManager) o.a.getSystemService("notification")).getCurrentInterruptionFilter();
|
|
return Boolean.valueOf(currentInterruptionFilter >= 2 && currentInterruptionFilter <= 4);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static Boolean j() {
|
|
try {
|
|
boolean z = false;
|
|
for (AudioDeviceInfo audioDeviceInfo : ((AudioManager) o.a.getSystemService("audio")).getDevices(2)) {
|
|
if (audioDeviceInfo.getType() == 22 || audioDeviceInfo.getType() == 11 || audioDeviceInfo.getType() == 12 || audioDeviceInfo.getType() == 4 || audioDeviceInfo.getType() == 3) {
|
|
z = true;
|
|
}
|
|
}
|
|
return Boolean.valueOf(z);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static String a() {
|
|
try {
|
|
Class.forName(MadeWithUnityDetector.UNITY_PLAYER_CLASS_NAME);
|
|
return "unity3d";
|
|
} catch (Throwable unused) {
|
|
return "native";
|
|
}
|
|
}
|
|
|
|
public static Boolean d() {
|
|
try {
|
|
return Boolean.valueOf(Settings.System.getInt(o.a.getContentResolver(), "airplane_mode_on", 0) != 0);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static UnitDisplayType a(String str) {
|
|
e0 e0Var;
|
|
UnitDisplayType unitDisplayType = UnitDisplayType.INTERSTITIAL;
|
|
IAConfigManager iAConfigManager = IAConfigManager.L;
|
|
HashMap hashMap = iAConfigManager.a;
|
|
d0 d0Var = (hashMap == null || !hashMap.containsKey(str)) ? null : (d0) iAConfigManager.a.get(str);
|
|
if (d0Var == null || d0Var.a.size() <= 0 || (e0Var = (e0) d0Var.a.get(0)) == null) {
|
|
return unitDisplayType;
|
|
}
|
|
g0 g0Var = e0Var.f;
|
|
x xVar = e0Var.c;
|
|
if (g0Var != null) {
|
|
return g0Var.j;
|
|
}
|
|
return xVar != null ? xVar.b : unitDisplayType;
|
|
}
|
|
}
|