- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
968 lines
36 KiB
Java
968 lines
36 KiB
Java
package com.applovin.impl.sdk;
|
|
|
|
import android.app.ActivityManager;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import android.content.pm.ApplicationInfo;
|
|
import android.content.pm.PackageInfo;
|
|
import android.content.pm.PackageManager;
|
|
import android.graphics.Point;
|
|
import android.hardware.SensorManager;
|
|
import android.media.AudioDeviceInfo;
|
|
import android.media.AudioManager;
|
|
import android.net.ConnectivityManager;
|
|
import android.os.Build;
|
|
import android.os.Environment;
|
|
import android.os.LocaleList;
|
|
import android.os.PowerManager;
|
|
import android.os.SystemClock;
|
|
import android.provider.Settings;
|
|
import android.telephony.TelephonyManager;
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import android.util.DisplayMetrics;
|
|
import com.applovin.impl.a4;
|
|
import com.applovin.impl.ca;
|
|
import com.applovin.impl.d4;
|
|
import com.applovin.impl.da;
|
|
import com.applovin.impl.e4;
|
|
import com.applovin.impl.em;
|
|
import com.applovin.impl.gc;
|
|
import com.applovin.impl.jn;
|
|
import com.applovin.impl.l0;
|
|
import com.applovin.impl.sdk.array.ArrayService;
|
|
import com.applovin.impl.sdk.utils.CollectionUtils;
|
|
import com.applovin.impl.sdk.utils.JsonUtils;
|
|
import com.applovin.impl.sdk.utils.StringUtils;
|
|
import com.applovin.impl.sj;
|
|
import com.applovin.impl.sr;
|
|
import com.applovin.impl.tm;
|
|
import com.applovin.impl.uj;
|
|
import com.applovin.impl.v;
|
|
import com.applovin.impl.vi;
|
|
import com.applovin.impl.wh;
|
|
import com.applovin.impl.wp;
|
|
import com.applovin.impl.yl;
|
|
import com.applovin.impl.yp;
|
|
import com.applovin.impl.z3;
|
|
import com.applovin.sdk.AppLovinBidTokenCollectionListener;
|
|
import com.applovin.sdk.AppLovinEventTypes;
|
|
import com.applovin.sdk.AppLovinSdk;
|
|
import com.applovin.sdk.AppLovinSdkUtils;
|
|
import com.applovin.sdk.AppLovinWebViewActivity;
|
|
import com.facebook.devicerequests.internal.DeviceRequestsHelper;
|
|
import com.facebook.internal.NativeProtocol;
|
|
import com.ironsource.ad;
|
|
import com.vungle.ads.internal.model.Cookie;
|
|
import java.io.File;
|
|
import java.nio.charset.Charset;
|
|
import java.util.Date;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import java.util.Map;
|
|
import java.util.TimeZone;
|
|
import java.util.UUID;
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class k {
|
|
private static final AtomicReference i = new AtomicReference();
|
|
private static final AtomicReference j = new AtomicReference();
|
|
private final j a;
|
|
private final n b;
|
|
private final Context c;
|
|
private final Map d;
|
|
private final Map f;
|
|
private boolean g;
|
|
private final Object e = new Object();
|
|
private final AtomicReference h = new AtomicReference();
|
|
|
|
public class a implements em.a {
|
|
public a() {
|
|
}
|
|
|
|
@Override // com.applovin.impl.em.a
|
|
public void a(l0.a aVar) {
|
|
k.i.set(aVar);
|
|
}
|
|
}
|
|
|
|
public static class b {
|
|
public final String a;
|
|
public final int b;
|
|
|
|
public b(String str, int i) {
|
|
this.a = str;
|
|
this.b = i;
|
|
}
|
|
}
|
|
|
|
public static class c {
|
|
public int a = -1;
|
|
public int b = -1;
|
|
public Boolean c = null;
|
|
}
|
|
|
|
public k(j jVar) {
|
|
if (jVar == null) {
|
|
throw new IllegalArgumentException("No sdk specified");
|
|
}
|
|
this.a = jVar;
|
|
this.b = jVar.J();
|
|
this.c = j.l();
|
|
this.d = y();
|
|
this.f = x();
|
|
}
|
|
|
|
private Map E() {
|
|
return yp.a(a(null, true, false));
|
|
}
|
|
|
|
private JSONArray H() {
|
|
if (z3.f()) {
|
|
return CollectionUtils.toJSONArray(Build.SUPPORTED_ABIS);
|
|
}
|
|
JSONArray jSONArray = new JSONArray();
|
|
JsonUtils.putStringIfValid(jSONArray, Build.CPU_ABI);
|
|
JsonUtils.putStringIfValid(jSONArray, Build.CPU_ABI2);
|
|
return jSONArray;
|
|
}
|
|
|
|
private boolean I() {
|
|
try {
|
|
if (!b()) {
|
|
if (!c()) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
} catch (Throwable unused) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
private boolean J() {
|
|
ConnectivityManager connectivityManager;
|
|
if (z3.h() && (connectivityManager = (ConnectivityManager) this.c.getSystemService("connectivity")) != null) {
|
|
try {
|
|
return connectivityManager.getRestrictBackgroundStatus() == 3;
|
|
} catch (Throwable th) {
|
|
this.a.J();
|
|
if (n.a()) {
|
|
this.a.J().a("DataCollector", "Unable to collect constrained network info.", th);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private Boolean K() {
|
|
if (z3.i()) {
|
|
return Boolean.valueOf(this.c.getResources().getConfiguration().isScreenHdr());
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void M() {
|
|
this.h.set(n());
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void b(AppLovinBidTokenCollectionListener appLovinBidTokenCollectionListener) {
|
|
try {
|
|
String C = C();
|
|
if (StringUtils.isValidString(C)) {
|
|
this.a.J();
|
|
if (n.a()) {
|
|
this.a.J().a("DataCollector", "Successfully retrieved bid token");
|
|
}
|
|
gc.a(appLovinBidTokenCollectionListener, C);
|
|
return;
|
|
}
|
|
this.a.J();
|
|
if (n.a()) {
|
|
this.a.J().b("DataCollector", "Empty bid token");
|
|
}
|
|
gc.b(appLovinBidTokenCollectionListener, "Empty bid token");
|
|
} catch (Throwable th) {
|
|
if (n.a()) {
|
|
this.b.a("DataCollector", "Failed to collect bid token", th);
|
|
}
|
|
this.a.E().a("DataCollector", "collectBidToken", th);
|
|
gc.b(appLovinBidTokenCollectionListener, "Failed to collect bid token");
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:100:0x01c1 */
|
|
/* JADX WARN: Removed duplicated region for block: B:104:0x01d8 */
|
|
/* JADX WARN: Removed duplicated region for block: B:108:0x01df */
|
|
/* JADX WARN: Removed duplicated region for block: B:111:0x01c8 */
|
|
/* JADX WARN: Removed duplicated region for block: B:113:0x01b1 */
|
|
/* JADX WARN: Removed duplicated region for block: B:96:0x01aa */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private long d() {
|
|
/*
|
|
Method dump skipped, instructions count: 488
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.sdk.k.d():long");
|
|
}
|
|
|
|
private c h() {
|
|
c cVar = new c();
|
|
Intent registerReceiver = this.c.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
int intExtra = registerReceiver != null ? registerReceiver.getIntExtra(AppLovinEventTypes.USER_COMPLETED_LEVEL, -1) : -1;
|
|
int intExtra2 = registerReceiver != null ? registerReceiver.getIntExtra("scale", -1) : -1;
|
|
if (intExtra <= 0 || intExtra2 <= 0) {
|
|
cVar.b = -1;
|
|
} else {
|
|
cVar.b = (int) ((intExtra / intExtra2) * 100.0f);
|
|
}
|
|
cVar.a = registerReceiver != null ? registerReceiver.getIntExtra("status", -1) : -1;
|
|
if (z3.d()) {
|
|
cVar.c = Boolean.valueOf(Settings.Global.getInt(this.c.getContentResolver(), "stay_on_while_plugged_in", -1) > 0);
|
|
} else {
|
|
cVar.c = Boolean.valueOf(((registerReceiver.getIntExtra("plugged", -1) & 1) | 14) > 0);
|
|
}
|
|
return cVar;
|
|
}
|
|
|
|
private String i() {
|
|
TelephonyManager telephonyManager = (TelephonyManager) this.c.getSystemService("phone");
|
|
if (telephonyManager == null) {
|
|
return "";
|
|
}
|
|
try {
|
|
return telephonyManager.getNetworkOperatorName();
|
|
} catch (Throwable th) {
|
|
if (!n.a()) {
|
|
return "";
|
|
}
|
|
this.b.a("DataCollector", "Unable to collect carrier", th);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
private String k() {
|
|
TelephonyManager telephonyManager = (TelephonyManager) this.c.getSystemService("phone");
|
|
return telephonyManager != null ? telephonyManager.getSimCountryIso().toUpperCase(Locale.ENGLISH) : "";
|
|
}
|
|
|
|
private String m() {
|
|
if (!z3.h()) {
|
|
return null;
|
|
}
|
|
try {
|
|
StringBuilder sb = new StringBuilder();
|
|
LocaleList locales = this.c.getResources().getConfiguration().getLocales();
|
|
for (int i2 = 0; i2 < locales.size(); i2++) {
|
|
sb.append(locales.get(i2));
|
|
sb.append(",");
|
|
}
|
|
if (sb.length() > 0 && sb.charAt(sb.length() - 1) == ',') {
|
|
sb.deleteCharAt(sb.length() - 1);
|
|
}
|
|
return sb.toString();
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
private Integer n() {
|
|
if (((AudioManager) this.c.getSystemService("audio")) == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
return Integer.valueOf((int) (r0.getStreamVolume(3) * ((Float) this.a.a(sj.o4)).floatValue()));
|
|
} catch (Throwable th) {
|
|
this.a.J();
|
|
if (n.a()) {
|
|
this.a.J().a("DataCollector", "Unable to collect device volume", th);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
private float o() {
|
|
try {
|
|
return Settings.System.getFloat(this.c.getContentResolver(), "font_scale");
|
|
} catch (Settings.SettingNotFoundException e) {
|
|
if (!n.a()) {
|
|
return -1.0f;
|
|
}
|
|
this.b.a("DataCollector", "Error collecting font scale", e);
|
|
return -1.0f;
|
|
}
|
|
}
|
|
|
|
private boolean p() {
|
|
SensorManager sensorManager = (SensorManager) this.c.getSystemService("sensor");
|
|
return (sensorManager == null || sensorManager.getDefaultSensor(4) == null) ? false : true;
|
|
}
|
|
|
|
private Map q() {
|
|
HashMap hashMap = new HashMap();
|
|
CollectionUtils.putIntegerIfValid(Cookie.IABTCF_GDPR_APPLIES, this.a.k0().g(), hashMap);
|
|
CollectionUtils.putStringIfValid("IABTCF_TCString", this.a.k0().k(), hashMap);
|
|
CollectionUtils.putStringIfValid("IABTCF_AddtlConsent", this.a.k0().c(), hashMap);
|
|
return hashMap;
|
|
}
|
|
|
|
private Boolean r() {
|
|
AudioManager audioManager = (AudioManager) this.c.getSystemService("audio");
|
|
if (audioManager == null) {
|
|
return null;
|
|
}
|
|
return Boolean.valueOf(audioManager.isMusicActive());
|
|
}
|
|
|
|
private Boolean s() {
|
|
AudioManager audioManager = (AudioManager) this.c.getSystemService("audio");
|
|
if (audioManager == null) {
|
|
return null;
|
|
}
|
|
return Boolean.valueOf(audioManager.isSpeakerphoneOn());
|
|
}
|
|
|
|
private String t() {
|
|
TelephonyManager telephonyManager = (TelephonyManager) this.c.getSystemService("phone");
|
|
if (telephonyManager == null) {
|
|
return "";
|
|
}
|
|
try {
|
|
String networkOperator = telephonyManager.getNetworkOperator();
|
|
return networkOperator.substring(0, Math.min(3, networkOperator.length()));
|
|
} catch (Throwable th) {
|
|
if (!n.a()) {
|
|
return "";
|
|
}
|
|
this.b.a("DataCollector", "Unable to collect mobile country code", th);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
private String u() {
|
|
TelephonyManager telephonyManager = (TelephonyManager) this.c.getSystemService("phone");
|
|
if (telephonyManager == null) {
|
|
return "";
|
|
}
|
|
try {
|
|
String networkOperator = telephonyManager.getNetworkOperator();
|
|
return networkOperator.substring(Math.min(3, networkOperator.length()));
|
|
} catch (Throwable th) {
|
|
if (!n.a()) {
|
|
return "";
|
|
}
|
|
this.b.a("DataCollector", "Unable to collect mobile network code", th);
|
|
return "";
|
|
}
|
|
}
|
|
|
|
private String w() {
|
|
AudioManager audioManager = (AudioManager) this.c.getSystemService("audio");
|
|
if (audioManager == null) {
|
|
return null;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
if (z3.g()) {
|
|
for (AudioDeviceInfo audioDeviceInfo : audioManager.getDevices(2)) {
|
|
sb.append(audioDeviceInfo.getType());
|
|
sb.append(",");
|
|
}
|
|
} else {
|
|
if (audioManager.isWiredHeadsetOn()) {
|
|
sb.append(3);
|
|
sb.append(",");
|
|
}
|
|
if (audioManager.isBluetoothScoOn()) {
|
|
sb.append(7);
|
|
sb.append(",");
|
|
}
|
|
if (audioManager.isBluetoothA2dpOn()) {
|
|
sb.append(8);
|
|
}
|
|
}
|
|
if (sb.length() > 0 && sb.charAt(sb.length() - 1) == ',') {
|
|
sb.deleteCharAt(sb.length() - 1);
|
|
}
|
|
String sb2 = sb.toString();
|
|
if (TextUtils.isEmpty(sb2) && n.a()) {
|
|
this.b.a("DataCollector", "No sound outputs detected");
|
|
}
|
|
return sb2;
|
|
}
|
|
|
|
private Map x() {
|
|
PackageInfo packageInfo;
|
|
HashMap hashMap = new HashMap();
|
|
PackageManager packageManager = this.c.getPackageManager();
|
|
ApplicationInfo applicationInfo = this.c.getApplicationInfo();
|
|
long lastModified = new File(applicationInfo.sourceDir).lastModified();
|
|
String str = null;
|
|
try {
|
|
packageInfo = packageManager.getPackageInfo(this.c.getPackageName(), 0);
|
|
try {
|
|
str = packageManager.getInstallerPackageName(applicationInfo.packageName);
|
|
} catch (Throwable unused) {
|
|
}
|
|
} catch (Throwable unused2) {
|
|
packageInfo = null;
|
|
}
|
|
hashMap.put(NativeProtocol.BRIDGE_ARG_APP_NAME_STRING, packageManager.getApplicationLabel(applicationInfo));
|
|
hashMap.put("app_version", packageInfo != null ? packageInfo.versionName : "");
|
|
hashMap.put("app_version_code", Integer.valueOf(packageInfo != null ? packageInfo.versionCode : -1));
|
|
hashMap.put("package_name", applicationInfo.packageName);
|
|
hashMap.put("vz", StringUtils.toShortSHA1Hash(applicationInfo.packageName));
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
hashMap.put("installer_name", str);
|
|
hashMap.put("tg", wp.a(this.a));
|
|
hashMap.put("debug", Boolean.valueOf(yp.c(this.a)));
|
|
hashMap.put("ia", Long.valueOf(lastModified));
|
|
hashMap.put("alts_ms", Long.valueOf(j.k()));
|
|
hashMap.put("j8", Boolean.valueOf(j.y0()));
|
|
hashMap.put("ps_tpg", Boolean.valueOf(wh.d(this.c)));
|
|
hashMap.put("ps_apg", Boolean.valueOf(wh.b(this.c)));
|
|
hashMap.put("ps_capg", Boolean.valueOf(wh.c(this.c)));
|
|
hashMap.put("ps_aipg", Boolean.valueOf(wh.a(this.c)));
|
|
j jVar = this.a;
|
|
uj ujVar = uj.f;
|
|
Long l = (Long) jVar.a(ujVar);
|
|
if (l != null) {
|
|
hashMap.put("ia_v2", l);
|
|
} else {
|
|
this.a.b(ujVar, Long.valueOf(lastModified));
|
|
}
|
|
hashMap.put("sdk_version", AppLovinSdk.VERSION);
|
|
hashMap.put("omid_sdk_version", this.a.W().c());
|
|
CollectionUtils.putStringIfValid("ad_review_sdk_version", v.b(), hashMap);
|
|
hashMap.put("api_did", this.a.a(sj.g));
|
|
hashMap.put("first_install_v3_ms", packageInfo != null ? Long.valueOf(packageInfo.firstInstallTime) : "");
|
|
hashMap.put("target_sdk", Integer.valueOf(applicationInfo.targetSdkVersion));
|
|
if (z3.h()) {
|
|
hashMap.put("min_sdk", Integer.valueOf(applicationInfo.minSdkVersion));
|
|
}
|
|
hashMap.put("epv", Integer.valueOf(yp.f()));
|
|
if (this.a.B0()) {
|
|
hashMap.put("unity_version", yp.a(this.a.g0()));
|
|
}
|
|
return hashMap;
|
|
}
|
|
|
|
private Map y() {
|
|
HashMap hashMap = new HashMap(34);
|
|
hashMap.put("api_level", Integer.valueOf(Build.VERSION.SDK_INT));
|
|
hashMap.put("brand", Build.MANUFACTURER);
|
|
hashMap.put("brand_name", Build.BRAND);
|
|
hashMap.put("hardware", Build.HARDWARE);
|
|
hashMap.put("sim", Boolean.valueOf(AppLovinSdkUtils.isEmulator()));
|
|
hashMap.put("aida", Boolean.valueOf(l0.a()));
|
|
hashMap.put("locale", Locale.getDefault().toString());
|
|
hashMap.put("model", Build.MODEL);
|
|
hashMap.put(ad.y, Build.VERSION.RELEASE);
|
|
hashMap.put("platform", v());
|
|
hashMap.put("revision", Build.DEVICE);
|
|
hashMap.put("tz_offset", Double.valueOf(z()));
|
|
hashMap.put("gy", Boolean.valueOf(p()));
|
|
hashMap.put("country_code", k());
|
|
hashMap.put("mcc", t());
|
|
hashMap.put("mnc", u());
|
|
hashMap.put(ad.y0, i());
|
|
hashMap.put("tv", Boolean.valueOf(AppLovinSdkUtils.isTv(this.c)));
|
|
hashMap.put("pc", Integer.valueOf(Runtime.getRuntime().availableProcessors()));
|
|
hashMap.put("hdr", K());
|
|
hashMap.put("supported_abis", H());
|
|
DisplayMetrics displayMetrics = this.c.getResources().getDisplayMetrics();
|
|
if (displayMetrics != null) {
|
|
hashMap.put("adns", Float.valueOf(displayMetrics.density));
|
|
hashMap.put("adnsd", Integer.valueOf(displayMetrics.densityDpi));
|
|
hashMap.put("xdpi", Float.valueOf(displayMetrics.xdpi));
|
|
hashMap.put("ydpi", Float.valueOf(displayMetrics.ydpi));
|
|
z3.a a2 = z3.a(this.c, this.a);
|
|
if (a2 != null) {
|
|
hashMap.put("tl_cr", Integer.valueOf(a2.c()));
|
|
hashMap.put("tr_cr", Integer.valueOf(a2.d()));
|
|
hashMap.put("bl_cr", Integer.valueOf(a2.a()));
|
|
hashMap.put("br_cr", Integer.valueOf(a2.b()));
|
|
}
|
|
}
|
|
hashMap.put("bt_ms", Long.valueOf(System.currentTimeMillis() - SystemClock.elapsedRealtime()));
|
|
hashMap.put("tbalsi_ms", Long.valueOf(this.a.I() - j.k()));
|
|
CollectionUtils.putBooleanIfValid("psase", Boolean.valueOf(wh.e(this.c)), hashMap);
|
|
CollectionUtils.putStringIfValid("process_name", yp.b(this.c), hashMap);
|
|
CollectionUtils.putBooleanIfValid("is_main_process", yp.g(this.c), hashMap);
|
|
try {
|
|
PackageInfo packageInfo = this.c.getPackageManager().getPackageInfo("com.android.vending", 0);
|
|
hashMap.put("ps_version", packageInfo.versionName);
|
|
hashMap.put("ps_version_code", Integer.valueOf(packageInfo.versionCode));
|
|
} catch (Throwable unused) {
|
|
hashMap.put("ps_version", "");
|
|
hashMap.put("ps_version_code", -1);
|
|
}
|
|
a(hashMap);
|
|
return hashMap;
|
|
}
|
|
|
|
private double z() {
|
|
return Math.round((TimeZone.getDefault().getOffset(new Date().getTime()) * 10.0d) / 3600000.0d) / 10.0d;
|
|
}
|
|
|
|
public Map A() {
|
|
Map map = CollectionUtils.map(this.f);
|
|
map.put("first_install", Boolean.valueOf(this.a.v0()));
|
|
map.put("first_install_v2", Boolean.valueOf(!this.a.t0()));
|
|
map.put("test_ads", Boolean.valueOf(this.g));
|
|
map.put("muted", Boolean.valueOf(this.a.g0().isMuted()));
|
|
if (((Boolean) this.a.a(sj.R3)).booleanValue()) {
|
|
CollectionUtils.putStringIfValid("cuid", this.a.q0().c(), map);
|
|
}
|
|
if (((Boolean) this.a.a(sj.U3)).booleanValue()) {
|
|
map.put("compass_random_token", this.a.q());
|
|
}
|
|
if (((Boolean) this.a.a(sj.W3)).booleanValue()) {
|
|
map.put("applovin_random_token", this.a.a0());
|
|
}
|
|
map.putAll(q());
|
|
if (this.a.Z() != null) {
|
|
CollectionUtils.putJsonArrayIfValid("ps_topics", this.a.Z().a(), map);
|
|
}
|
|
return map;
|
|
}
|
|
|
|
public b B() {
|
|
return (b) j.get();
|
|
}
|
|
|
|
public String C() {
|
|
String encodeToString = Base64.encodeToString(new JSONObject(E()).toString().getBytes(Charset.defaultCharset()), 2);
|
|
return ((Boolean) this.a.a(sj.q5)).booleanValue() ? vi.b(encodeToString, yp.a(this.a), vi.a.a(((Integer) this.a.a(sj.r5)).intValue()), this.a.b0(), this.a) : encodeToString;
|
|
}
|
|
|
|
public String D() {
|
|
ActivityManager activityManager = (ActivityManager) this.c.getSystemService("activity");
|
|
if (activityManager == null) {
|
|
return null;
|
|
}
|
|
return activityManager.getDeviceConfigurationInfo().getGlEsVersion();
|
|
}
|
|
|
|
public Map F() {
|
|
return CollectionUtils.map(this.f);
|
|
}
|
|
|
|
public Map G() {
|
|
return CollectionUtils.map(this.d);
|
|
}
|
|
|
|
public boolean L() {
|
|
return this.g;
|
|
}
|
|
|
|
public void N() {
|
|
tm j0 = this.a.j0();
|
|
em emVar = new em(this.a, new a());
|
|
tm.b bVar = tm.b.OTHER;
|
|
j0.a((yl) emVar, bVar);
|
|
this.a.j0().a((yl) new jn(this.a, true, "setDeviceVolume", new Runnable() { // from class: com.applovin.impl.sdk.k$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
k.this.M();
|
|
}
|
|
}), bVar);
|
|
}
|
|
|
|
public void O() {
|
|
synchronized (this.e) {
|
|
a(this.d);
|
|
}
|
|
}
|
|
|
|
public Map e() {
|
|
HashMap hashMap = new HashMap();
|
|
hashMap.put("sc", this.a.a(sj.m));
|
|
hashMap.put("sc2", this.a.a(sj.n));
|
|
hashMap.put("sc3", this.a.a(sj.o));
|
|
hashMap.put("server_installed_at", this.a.a(sj.p));
|
|
CollectionUtils.putStringIfValid("persisted_data", (String) this.a.a(uj.G), hashMap);
|
|
return hashMap;
|
|
}
|
|
|
|
public Map j() {
|
|
d4.d a2 = this.a.s().a();
|
|
if (a2 == null) {
|
|
return null;
|
|
}
|
|
HashMap hashMap = new HashMap(4);
|
|
hashMap.put("lrm_ts_ms", String.valueOf(a2.c()));
|
|
hashMap.put("lrm_url", a2.d());
|
|
hashMap.put("lrm_ct_ms", String.valueOf(a2.a()));
|
|
hashMap.put("lrm_rs", String.valueOf(a2.b()));
|
|
return hashMap;
|
|
}
|
|
|
|
public Map l() {
|
|
return a(false);
|
|
}
|
|
|
|
public String v() {
|
|
return AppLovinSdkUtils.isFireOS(this.c) ? "fireos" : "android";
|
|
}
|
|
|
|
private String g() {
|
|
int orientation = AppLovinSdkUtils.getOrientation(this.c);
|
|
return orientation == 1 ? "portrait" : orientation == 2 ? "landscape" : "none";
|
|
}
|
|
|
|
public void a(final AppLovinBidTokenCollectionListener appLovinBidTokenCollectionListener) {
|
|
this.a.j0().a((yl) new jn(this.a, ((Boolean) this.a.a(sj.b4)).booleanValue(), "DataCollector", new Runnable() { // from class: com.applovin.impl.sdk.k$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
k.this.b(appLovinBidTokenCollectionListener);
|
|
}
|
|
}), tm.b.CORE);
|
|
}
|
|
|
|
public Map a(Map map, boolean z, boolean z2) {
|
|
HashMap hashMap = new HashMap(64);
|
|
Map a2 = a(z);
|
|
Map A = A();
|
|
Map j2 = j();
|
|
Map d0 = this.a.d0();
|
|
if (z2) {
|
|
hashMap.put(DeviceRequestsHelper.DEVICE_INFO_PARAM, a2);
|
|
hashMap.put("app_info", A);
|
|
if (j2 != null) {
|
|
hashMap.put("connection_info", j2);
|
|
}
|
|
if (map != null) {
|
|
hashMap.put("ad_info", map);
|
|
}
|
|
if (!CollectionUtils.isEmpty(d0)) {
|
|
hashMap.put("segments", d0);
|
|
}
|
|
} else {
|
|
hashMap.putAll(a2);
|
|
hashMap.putAll(A);
|
|
if (j2 != null) {
|
|
hashMap.putAll(j2);
|
|
}
|
|
if (map != null) {
|
|
hashMap.putAll(map);
|
|
}
|
|
if (!CollectionUtils.isEmpty(d0)) {
|
|
hashMap.putAll(d0);
|
|
}
|
|
}
|
|
hashMap.put("accept", "custom_size,launch_app,video");
|
|
hashMap.put("format", "json");
|
|
CollectionUtils.putStringIfValid("mediation_provider", this.a.O(), hashMap);
|
|
CollectionUtils.putStringIfValid("mediation_provider_v2", this.a.z(), hashMap);
|
|
CollectionUtils.putStringIfValid("plugin_version", (String) this.a.a(sj.a4), hashMap);
|
|
CollectionUtils.putLongIfValid("tssf_ms", Long.valueOf(this.a.m0()), hashMap);
|
|
if (!((Boolean) this.a.a(sj.o5)).booleanValue()) {
|
|
hashMap.put(AppLovinWebViewActivity.INTENT_EXTRA_KEY_SDK_KEY, this.a.b0());
|
|
}
|
|
hashMap.putAll(e());
|
|
if (((Boolean) this.a.a(sj.P4)).booleanValue()) {
|
|
da D = this.a.D();
|
|
hashMap.put("li", Long.valueOf(D.b(ca.e)));
|
|
hashMap.put("si", Long.valueOf(D.b(ca.h)));
|
|
hashMap.put("mad", Long.valueOf(D.b(ca.f)));
|
|
hashMap.put("msad", Long.valueOf(D.b(ca.i)));
|
|
hashMap.put("pf", Long.valueOf(D.b(ca.m)));
|
|
hashMap.put("mpf", Long.valueOf(D.b(ca.t)));
|
|
hashMap.put("gpf", Long.valueOf(D.b(ca.n)));
|
|
hashMap.put("asoac", Long.valueOf(D.b(ca.r)));
|
|
}
|
|
hashMap.put("rid", UUID.randomUUID().toString());
|
|
return hashMap;
|
|
}
|
|
|
|
private int b(String str) {
|
|
try {
|
|
return Settings.Secure.getInt(this.c.getContentResolver(), str);
|
|
} catch (Throwable unused) {
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
private boolean b() {
|
|
String str = Build.TAGS;
|
|
return str != null && str.contains(c("lz}$blpz"));
|
|
}
|
|
|
|
private boolean c() {
|
|
String[] strArr = {"&zpz}ld&hyy&Z|yl{|zl{'hyb", "&zk`g&z|", "&zpz}ld&k`g&z|", "&zpz}ld&qk`g&z|", "&mh}h&efjhe&qk`g&z|", "&mh}h&efjhe&k`g&z|", "&zpz}ld&zm&qk`g&z|", "&zpz}ld&k`g&oh`ezhol&z|", "&mh}h&efjhe&z|"};
|
|
for (int i2 = 0; i2 < 9; i2++) {
|
|
if (new File(c(strArr[i2])).exists()) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private String c(String str) {
|
|
int length = str.length();
|
|
int[] iArr = {11, 12, 10, 3, 2, 1, 15, 10, 15, 14};
|
|
char[] cArr = new char[length];
|
|
for (int i2 = 0; i2 < length; i2++) {
|
|
cArr[i2] = str.charAt(i2);
|
|
for (int i3 = 9; i3 >= 0; i3--) {
|
|
cArr[i2] = (char) (cArr[i2] ^ iArr[i3]);
|
|
}
|
|
}
|
|
return new String(cArr);
|
|
}
|
|
|
|
public Map a(boolean z) {
|
|
Map map;
|
|
synchronized (this.e) {
|
|
map = CollectionUtils.map(this.d);
|
|
}
|
|
return a(map, z);
|
|
}
|
|
|
|
private void a(Map map) {
|
|
if (((Boolean) this.a.a(sj.i4)).booleanValue() && !map.containsKey("af")) {
|
|
map.put("af", Long.valueOf(d()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.j4)).booleanValue() && !map.containsKey("font")) {
|
|
map.put("font", Float.valueOf(o()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.q4)).booleanValue() && yp.d(this.a)) {
|
|
sr.a(this.a);
|
|
}
|
|
if (((Boolean) this.a.a(sj.D4)).booleanValue()) {
|
|
sr.b(this.a);
|
|
}
|
|
if (((Boolean) this.a.a(sj.p4)).booleanValue() && !map.containsKey("sua")) {
|
|
map.put("sua", System.getProperty("http.agent"));
|
|
}
|
|
if (((Boolean) this.a.a(sj.l4)).booleanValue() && !map.containsKey("network_restricted")) {
|
|
map.put("network_restricted", Boolean.valueOf(J()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.t4)).booleanValue()) {
|
|
boolean z = false;
|
|
boolean z2 = this.c.getResources().getConfiguration().keyboard == 2;
|
|
boolean hasSystemFeature = this.c.getPackageManager().hasSystemFeature("com.google.android.play.feature.HPE_EXPERIENCE");
|
|
boolean hasSystemFeature2 = this.c.getPackageManager().hasSystemFeature("android.hardware.type.pc");
|
|
if (z2 && (hasSystemFeature || hasSystemFeature2)) {
|
|
z = true;
|
|
}
|
|
map.put("is_pc", Boolean.valueOf(z));
|
|
}
|
|
if (((Boolean) this.a.a(sj.F4)).booleanValue()) {
|
|
CollectionUtils.putStringIfValid("oglv", D(), map);
|
|
}
|
|
}
|
|
|
|
private Map a(Map map, boolean z) {
|
|
l0.a f;
|
|
PowerManager powerManager;
|
|
Map map2 = CollectionUtils.map(map);
|
|
Point b2 = z3.b(this.c);
|
|
map2.put("dx", Integer.valueOf(b2.x));
|
|
map2.put("dy", Integer.valueOf(b2.y));
|
|
if (this.c.getResources().getDisplayMetrics() != null) {
|
|
map2.put("screen_size_in", Double.valueOf(Math.sqrt(Math.pow(b2.x, 2.0d) + Math.pow(b2.y, 2.0d)) / r4.xdpi));
|
|
}
|
|
map2.put("is_tablet", Boolean.valueOf(AppLovinSdkUtils.isTablet(this.c)));
|
|
if (z) {
|
|
f = (l0.a) i.get();
|
|
if (f != null) {
|
|
N();
|
|
} else if (yp.h()) {
|
|
f = new l0.a();
|
|
map2.put("inc", Boolean.TRUE);
|
|
} else {
|
|
f = f();
|
|
}
|
|
} else {
|
|
f = f();
|
|
}
|
|
String a2 = f.a();
|
|
if (StringUtils.isValidString(a2)) {
|
|
map2.put("idfa", a2);
|
|
}
|
|
map2.put("dnt", Boolean.valueOf(f.c()));
|
|
map2.put("dnt_code", f.b().b());
|
|
b bVar = (b) j.get();
|
|
if (((Boolean) this.a.a(sj.Q3)).booleanValue() && bVar != null) {
|
|
map2.put("idfv", bVar.a);
|
|
map2.put("idfv_scope", Integer.valueOf(bVar.b));
|
|
}
|
|
Boolean b3 = a4.b().b(this.c);
|
|
if (b3 != null) {
|
|
map2.put("huc", b3);
|
|
}
|
|
Boolean b4 = a4.c().b(this.c);
|
|
if (b4 != null) {
|
|
map2.put("aru", b4);
|
|
}
|
|
Boolean b5 = a4.a().b(this.c);
|
|
if (b5 != null) {
|
|
map2.put("dns", b5);
|
|
}
|
|
if (((Boolean) this.a.a(sj.c4)).booleanValue()) {
|
|
c h = h();
|
|
CollectionUtils.putIntegerIfValid("act", Integer.valueOf(h.a), map2);
|
|
CollectionUtils.putIntegerIfValid("acm", Integer.valueOf(h.b), map2);
|
|
CollectionUtils.putBooleanIfValid("sowpie", h.c, map2);
|
|
}
|
|
if (((Boolean) this.a.a(sj.k4)).booleanValue()) {
|
|
map2.put("mtl", Integer.valueOf(this.a.f0().getLastTrimMemoryLevel()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.n4)).booleanValue()) {
|
|
map2.put("adr", Boolean.valueOf(I()));
|
|
}
|
|
Integer n = z ? (Integer) this.h.get() : n();
|
|
if (n != null) {
|
|
map2.put("volume", n);
|
|
}
|
|
CollectionUtils.putBooleanIfValid("ma", r(), map2);
|
|
CollectionUtils.putBooleanIfValid("spo", s(), map2);
|
|
CollectionUtils.putBooleanIfValid("aif", Boolean.valueOf(!this.a.f0().isApplicationPaused()), map2);
|
|
CollectionUtils.putLongIfValid("af_ts_ms", Long.valueOf(this.a.f0().getAppEnteredForegroundTimeMillis()), map2);
|
|
CollectionUtils.putLongIfValid("ab_ts_ms", Long.valueOf(this.a.f0().getAppEnteredBackgroundTimeMillis()), map2);
|
|
try {
|
|
map2.put("sb", Integer.valueOf((int) ((Settings.System.getInt(this.c.getContentResolver(), "screen_brightness") / 255.0f) * 100.0f)));
|
|
} catch (Settings.SettingNotFoundException e) {
|
|
if (n.a()) {
|
|
this.b.a("DataCollector", "Unable to collect screen brightness", e);
|
|
}
|
|
}
|
|
if (((Boolean) this.a.a(sj.q4)).booleanValue() && yp.d(this.a)) {
|
|
sr.a(this.a);
|
|
String a3 = sr.a();
|
|
if (StringUtils.isValidString(a3)) {
|
|
map2.put(ad.U, a3);
|
|
}
|
|
}
|
|
if (((Boolean) this.a.a(sj.D4)).booleanValue()) {
|
|
sr.b(this.a);
|
|
CollectionUtils.putIntegerIfValid("wvvc", Integer.valueOf(sr.d()), map2);
|
|
CollectionUtils.putStringIfValid("wvv", sr.c(), map2);
|
|
CollectionUtils.putStringIfValid("wvpn", sr.b(), map2);
|
|
}
|
|
if (((Boolean) this.a.a(sj.e4)).booleanValue()) {
|
|
try {
|
|
map2.put(ad.C0, Long.valueOf(Environment.getDataDirectory().getFreeSpace()));
|
|
map2.put("tds", Long.valueOf(Environment.getDataDirectory().getTotalSpace()));
|
|
} catch (Throwable th) {
|
|
map2.put(ad.C0, -1);
|
|
map2.put("tds", -1);
|
|
if (n.a()) {
|
|
this.b.a("DataCollector", "Unable to collect total & free space.", th);
|
|
}
|
|
}
|
|
}
|
|
if (((Boolean) this.a.a(sj.f4)).booleanValue()) {
|
|
ActivityManager.MemoryInfo a4 = yp.a((ActivityManager) this.c.getSystemService("activity"));
|
|
if (a4 != null) {
|
|
map2.put("fm", Long.valueOf(a4.availMem));
|
|
map2.put("tm", Long.valueOf(a4.totalMem));
|
|
map2.put("lmt", Long.valueOf(a4.threshold));
|
|
map2.put("lm", Boolean.valueOf(a4.lowMemory));
|
|
} else {
|
|
map2.put("fm", -1);
|
|
map2.put("tm", -1);
|
|
map2.put("lmt", -1);
|
|
}
|
|
}
|
|
if (((Boolean) this.a.a(sj.g4)).booleanValue() && z3.a("android.permission.READ_PHONE_STATE", this.c) && z3.h()) {
|
|
map2.put("rat", Integer.valueOf(((TelephonyManager) this.c.getSystemService("phone")).getDataNetworkType()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.d4)).booleanValue()) {
|
|
String w = w();
|
|
if (!TextUtils.isEmpty(w)) {
|
|
map2.put("so", w);
|
|
}
|
|
}
|
|
map2.put("orientation_lock", g());
|
|
if (((Boolean) this.a.a(sj.h4)).booleanValue()) {
|
|
map2.put("vs", Boolean.valueOf(yp.j()));
|
|
}
|
|
if (z3.f() && (powerManager = (PowerManager) this.c.getSystemService("power")) != null) {
|
|
map2.put(ad.H0, Integer.valueOf(powerManager.isPowerSaveMode() ? 1 : 0));
|
|
}
|
|
if (((Boolean) this.a.a(sj.r4)).booleanValue() && this.a.e0() != null) {
|
|
map2.put("da", Float.valueOf(this.a.e0().a()));
|
|
}
|
|
if (((Boolean) this.a.a(sj.s4)).booleanValue() && this.a.e0() != null) {
|
|
map2.put("dm", Float.valueOf(this.a.e0().b()));
|
|
}
|
|
map2.put("mute_switch", Integer.valueOf(this.a.n().a()));
|
|
map2.put("network", e4.g(this.a));
|
|
String m = m();
|
|
if (StringUtils.isValidString(m)) {
|
|
map2.put("kb", m);
|
|
}
|
|
ArrayService m2 = this.a.m();
|
|
if (m2.isAppHubInstalled()) {
|
|
if (m2.getIsDirectDownloadEnabled() != null) {
|
|
map2.put("ah_dd_enabled", m2.getIsDirectDownloadEnabled());
|
|
}
|
|
map2.put("ah_sdk_version_code", Long.valueOf(m2.getAppHubVersionCode()));
|
|
map2.put("ah_random_user_token", StringUtils.emptyIfNull(m2.getRandomUserToken()));
|
|
map2.put("ah_sdk_package_name", StringUtils.emptyIfNull(m2.getAppHubPackageName()));
|
|
}
|
|
return map2;
|
|
}
|
|
|
|
public static void a(l0.a aVar) {
|
|
i.set(aVar);
|
|
}
|
|
|
|
public static void a(b bVar) {
|
|
j.set(bVar);
|
|
}
|
|
|
|
private boolean a(String str) {
|
|
return b(str) == 1;
|
|
}
|
|
|
|
public l0.a f() {
|
|
List<String> testDeviceAdvertisingIds;
|
|
l0.a b2 = l0.b(this.c);
|
|
if (b2 == null) {
|
|
return new l0.a();
|
|
}
|
|
if (((Boolean) this.a.a(sj.P3)).booleanValue()) {
|
|
if (b2.c() && !((Boolean) this.a.a(sj.O3)).booleanValue()) {
|
|
b2.a("");
|
|
}
|
|
i.set(b2);
|
|
} else {
|
|
b2 = new l0.a();
|
|
}
|
|
if (this.a.z0().get()) {
|
|
testDeviceAdvertisingIds = this.a.g0().getTestDeviceAdvertisingIds();
|
|
} else {
|
|
testDeviceAdvertisingIds = this.a.H() != null ? this.a.H().getTestDeviceAdvertisingIds() : null;
|
|
}
|
|
if (testDeviceAdvertisingIds != null) {
|
|
String a2 = b2.a();
|
|
if (StringUtils.isValidString(a2)) {
|
|
this.g = testDeviceAdvertisingIds.contains(a2);
|
|
}
|
|
b B = B();
|
|
String str = B != null ? B.a : null;
|
|
if (StringUtils.isValidString(str)) {
|
|
this.g = testDeviceAdvertisingIds.contains(str) | this.g;
|
|
}
|
|
} else {
|
|
this.g = false;
|
|
}
|
|
return b2;
|
|
}
|
|
}
|