Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,253 @@
package com.vungle.ads.internal.platform;
import android.content.ContentResolver;
import android.content.Context;
import android.media.AudioManager;
import android.os.Build;
import android.os.Environment;
import android.os.PowerManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import androidx.core.util.Consumer;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import com.google.android.gms.appset.AppSet;
import com.google.android.gms.appset.AppSetIdClient;
import com.google.android.gms.appset.AppSetIdInfo;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.model.AdvertisingInfo;
import com.vungle.ads.internal.util.Logger;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
/* loaded from: classes4.dex */
public final class AndroidPlatform implements Platform {
public static final Companion Companion = new Companion(null);
private static final String TAG = "AndroidPlatform";
private AdvertisingInfo advertisingInfo;
private String appSetId;
private Integer appSetIdScope;
private final AudioManager audioManager;
private final Context context;
private final boolean isSideLoaded;
private final PowerManager powerManager;
private final VungleThreadPoolExecutor uaExecutor;
private String userAgent;
@Override // com.vungle.ads.internal.platform.Platform
public String getAppSetId() {
return this.appSetId;
}
@Override // com.vungle.ads.internal.platform.Platform
public Integer getAppSetIdScope() {
return this.appSetIdScope;
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isAtLeastMinimumSDK() {
return true;
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isSideLoaded() {
return this.isSideLoaded;
}
public void setUserAgent(String str) {
this.userAgent = str;
}
public AndroidPlatform(Context context, VungleThreadPoolExecutor uaExecutor) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(uaExecutor, "uaExecutor");
this.context = context;
this.uaExecutor = uaExecutor;
updateAppSetID();
Object systemService = context.getSystemService("power");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.os.PowerManager");
this.powerManager = (PowerManager) systemService;
Object systemService2 = context.getSystemService("audio");
Intrinsics.checkNotNull(systemService2, "null cannot be cast to non-null type android.media.AudioManager");
this.audioManager = (AudioManager) systemService2;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final String getCarrierName$vungle_ads_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
Object systemService = context.getSystemService("phone");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.telephony.TelephonyManager");
return ((TelephonyManager) systemService).getNetworkOperatorName();
}
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isBatterySaverEnabled() {
return this.powerManager.isPowerSaveMode();
}
@Override // com.vungle.ads.internal.platform.Platform
public float getVolumeLevel() {
try {
return this.audioManager.getStreamVolume(3) / this.audioManager.getStreamMaxVolume(3);
} catch (Exception unused) {
return 0.0f;
}
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isSoundEnabled() {
try {
return this.audioManager.getStreamVolume(3) > 0;
} catch (Exception unused) {
return true;
}
}
@Override // com.vungle.ads.internal.platform.Platform
public String getCarrierName() {
String carrierName$vungle_ads_release = Companion.getCarrierName$vungle_ads_release(this.context);
Intrinsics.checkNotNullExpressionValue(carrierName$vungle_ads_release, "getCarrierName(context)");
return carrierName$vungle_ads_release;
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isSdCardPresent() {
try {
return Intrinsics.areEqual(Environment.getExternalStorageState(), "mounted");
} catch (Exception e) {
Logger.Companion.e(TAG, "Acquiring external storage state failed", e);
return false;
}
}
@Override // com.vungle.ads.internal.platform.Platform
public void getUserAgentLazy(final Consumer<String> consumer) {
Intrinsics.checkNotNullParameter(consumer, "consumer");
this.uaExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.platform.AndroidPlatform$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
AndroidPlatform.m3948getUserAgentLazy$lambda0(AndroidPlatform.this, consumer);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getUserAgentLazy$lambda-0, reason: not valid java name */
public static final void m3948getUserAgentLazy$lambda0(AndroidPlatform this$0, Consumer consumer) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(consumer, "$consumer");
new WebViewUtil(this$0.context).getUserAgent(consumer);
}
private final AdvertisingInfo getAmazonAdvertisingInfo() {
AdvertisingInfo advertisingInfo = new AdvertisingInfo();
try {
ContentResolver contentResolver = this.context.getContentResolver();
boolean z = true;
if (Settings.Secure.getInt(contentResolver, "limit_ad_tracking") != 1) {
z = false;
}
advertisingInfo.setLimitAdTracking(z);
advertisingInfo.setAdvertisingId(Settings.Secure.getString(contentResolver, "advertising_id"));
} catch (Settings.SettingNotFoundException e) {
Logger.Companion.w(TAG, "Error getting Amazon advertising info", e);
}
return advertisingInfo;
}
private final AdvertisingInfo getGoogleAdvertisingInfo() {
AdvertisingInfo advertisingInfo = new AdvertisingInfo();
try {
AdvertisingIdClient.Info advertisingIdInfo = AdvertisingIdClient.getAdvertisingIdInfo(this.context);
Intrinsics.checkNotNullExpressionValue(advertisingIdInfo, "getAdvertisingIdInfo(context)");
advertisingInfo.setAdvertisingId(advertisingIdInfo.getId());
advertisingInfo.setLimitAdTracking(advertisingIdInfo.isLimitAdTrackingEnabled());
} catch (GooglePlayServicesNotAvailableException e) {
Logger.Companion.e(TAG, "Play services Not available: " + e.getLocalizedMessage());
} catch (NoClassDefFoundError e2) {
Logger.Companion.e(TAG, "Play services Not available: " + e2.getLocalizedMessage());
advertisingInfo.setAdvertisingId(Settings.Secure.getString(this.context.getContentResolver(), "advertising_id"));
}
return advertisingInfo;
}
@Override // com.vungle.ads.internal.platform.Platform
public AdvertisingInfo getAdvertisingInfo() {
boolean equals;
AdvertisingInfo googleAdvertisingInfo;
String advertisingId;
AdvertisingInfo advertisingInfo = this.advertisingInfo;
if (advertisingInfo != null && (advertisingId = advertisingInfo.getAdvertisingId()) != null && advertisingId.length() != 0) {
return advertisingInfo;
}
equals = StringsKt__StringsJVMKt.equals(Build.MANUFACTURER, "Amazon", true);
if (equals) {
googleAdvertisingInfo = getAmazonAdvertisingInfo();
} else {
googleAdvertisingInfo = getGoogleAdvertisingInfo();
}
this.advertisingInfo = googleAdvertisingInfo;
return googleAdvertisingInfo;
}
private final void updateAppSetID() {
String str = this.appSetId;
if (str == null || str.length() == 0) {
try {
AppSetIdClient client = AppSet.getClient(this.context);
Intrinsics.checkNotNullExpressionValue(client, "getClient(context)");
Task<AppSetIdInfo> appSetIdInfo = client.getAppSetIdInfo();
Intrinsics.checkNotNullExpressionValue(appSetIdInfo, "client.appSetIdInfo");
appSetIdInfo.addOnSuccessListener(new OnSuccessListener() { // from class: com.vungle.ads.internal.platform.AndroidPlatform$$ExternalSyntheticLambda0
@Override // com.google.android.gms.tasks.OnSuccessListener
public final void onSuccess(Object obj) {
AndroidPlatform.m3949updateAppSetID$lambda2(AndroidPlatform.this, (AppSetIdInfo) obj);
}
});
} catch (NoClassDefFoundError e) {
Logger.Companion.e(TAG, "Required libs to get AppSetID Not available: " + e.getLocalizedMessage());
}
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: updateAppSetID$lambda-2, reason: not valid java name */
public static final void m3949updateAppSetID$lambda2(AndroidPlatform this$0, AppSetIdInfo appSetIdInfo) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
if (appSetIdInfo != null) {
this$0.appSetId = appSetIdInfo.getId();
this$0.appSetIdScope = Integer.valueOf(appSetIdInfo.getScope());
}
}
@Override // com.vungle.ads.internal.platform.Platform
public String getUserAgent() {
String str = this.userAgent;
return str == null ? System.getProperty("http.agent") : str;
}
@Override // com.vungle.ads.internal.platform.Platform
public boolean isSilentModeEnabled() {
try {
if (this.audioManager.getRingerMode() != 0) {
if (this.audioManager.getRingerMode() != 1) {
return false;
}
}
return true;
} catch (Exception unused) {
return false;
}
}
}

View File

@@ -0,0 +1,44 @@
package com.vungle.ads.internal.platform;
import androidx.core.util.Consumer;
import com.vungle.ads.internal.model.AdvertisingInfo;
/* loaded from: classes4.dex */
public interface Platform {
public static final Companion Companion = Companion.$$INSTANCE;
public static final String MANUFACTURER_AMAZON = "Amazon";
AdvertisingInfo getAdvertisingInfo();
String getAppSetId();
Integer getAppSetIdScope();
String getCarrierName();
String getUserAgent();
void getUserAgentLazy(Consumer<String> consumer);
float getVolumeLevel();
boolean isAtLeastMinimumSDK();
boolean isBatterySaverEnabled();
boolean isSdCardPresent();
boolean isSideLoaded();
boolean isSilentModeEnabled();
boolean isSoundEnabled();
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
public static final String MANUFACTURER_AMAZON = "Amazon";
private Companion() {
}
}
}

View File

@@ -0,0 +1,45 @@
package com.vungle.ads.internal.platform;
import android.content.Context;
import android.util.AndroidRuntimeException;
import android.webkit.WebSettings;
import androidx.core.util.Consumer;
import com.vungle.ads.internal.util.Logger;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class WebViewUtil {
public static final Companion Companion = new Companion(null);
private static final String TAG = WebViewUtil.class.getSimpleName();
private final Context context;
public WebViewUtil(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public final void getUserAgent(Consumer<String> consumer) {
Intrinsics.checkNotNullParameter(consumer, "consumer");
try {
consumer.accept(WebSettings.getDefaultUserAgent(this.context));
} catch (Exception e) {
if (e instanceof AndroidRuntimeException) {
Logger.Companion companion = Logger.Companion;
String TAG2 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
companion.e(TAG2, "WebView could be missing here");
}
consumer.accept(null);
}
}
}