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,738 @@
package com.vungle.ads.internal;
import android.content.Context;
import com.vungle.ads.AdExpiredError;
import com.vungle.ads.AdExpiredOnPlayError;
import com.vungle.ads.AdMarkupInvalidError;
import com.vungle.ads.AdNotLoadedCantPlay;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.ConcurrentPlaybackUnsupported;
import com.vungle.ads.InternalError;
import com.vungle.ads.InvalidAdStateError;
import com.vungle.ads.InvalidWaterfallPlacementError;
import com.vungle.ads.PlacementAdTypeMismatchError;
import com.vungle.ads.PlacementNotFoundError;
import com.vungle.ads.SdkNotInitialized;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.TimeIntervalMetric;
import com.vungle.ads.VungleAdSize;
import com.vungle.ads.VungleAds;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.SDKExecutors;
import com.vungle.ads.internal.load.AdLoaderCallback;
import com.vungle.ads.internal.load.AdRequest;
import com.vungle.ads.internal.load.BaseAdLoader;
import com.vungle.ads.internal.load.DefaultAdLoader;
import com.vungle.ads.internal.load.RealtimeAdLoader;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.TpatSender;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.presenter.AdEventListener;
import com.vungle.ads.internal.presenter.AdPlayCallback;
import com.vungle.ads.internal.presenter.AdPlayCallbackWrapper;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.task.CleanupJob;
import com.vungle.ads.internal.task.JobRunner;
import com.vungle.ads.internal.ui.AdActivity;
import com.vungle.ads.internal.util.ActivityManager;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import java.lang.ref.WeakReference;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.NoWhenBranchMatchedException;
import kotlin.NotImplementedError;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.serialization.DeserializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
/* loaded from: classes4.dex */
public abstract class AdInternal implements AdLoaderCallback {
private static final String TAG = "AdInternal";
private static final boolean THROW_ON_ILLEGAL_TRANSITION = false;
private AdLoaderCallback adLoaderCallback;
private AdState adState;
private AdPayload advertisement;
private BaseAdLoader baseAdLoader;
private BidPayload bidPayload;
private final Context context;
private Placement placement;
private WeakReference<Context> playContext;
private TimeIntervalMetric requestMetric;
private final Lazy signalManager$delegate;
private final Lazy vungleApiClient$delegate;
public static final Companion Companion = new Companion(null);
private static final Json json = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.AdInternal$Companion$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[AdState.values().length];
iArr[AdState.NEW.ordinal()] = 1;
iArr[AdState.LOADING.ordinal()] = 2;
iArr[AdState.READY.ordinal()] = 3;
iArr[AdState.PLAYING.ordinal()] = 4;
iArr[AdState.FINISHED.ordinal()] = 5;
iArr[AdState.ERROR.ordinal()] = 6;
$EnumSwitchMapping$0 = iArr;
}
}
public void adLoadedAndUpdateConfigure$vungle_ads_release(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
}
public abstract VungleAdSize getAdSizeForAdRequest();
public final AdState getAdState() {
return this.adState;
}
public final AdPayload getAdvertisement() {
return this.advertisement;
}
public final BidPayload getBidPayload() {
return this.bidPayload;
}
public final Context getContext() {
return this.context;
}
public final Placement getPlacement() {
return this.placement;
}
public abstract boolean isValidAdSize(VungleAdSize vungleAdSize);
public abstract boolean isValidAdTypeForPlacement(Placement placement);
public final void setAdvertisement(AdPayload adPayload) {
this.advertisement = adPayload;
}
public final void setBidPayload(BidPayload bidPayload) {
this.bidPayload = bidPayload;
}
public final void setPlacement(Placement placement) {
this.placement = placement;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private static /* synthetic */ void getJson$annotations() {
}
private Companion() {
}
}
public AdInternal(final Context context) {
Lazy lazy;
Lazy lazy2;
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
this.adState = AdState.NEW;
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$special$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
this.vungleApiClient$delegate = lazy;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$special$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.signals.SignalManager, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SignalManager.class);
}
});
this.signalManager$delegate = lazy2;
}
public final void setAdState(AdState value) {
AdPayload adPayload;
String eventId;
Lazy lazy;
Intrinsics.checkNotNullParameter(value, "value");
if (value.isTerminalState() && (adPayload = this.advertisement) != null && (eventId = adPayload.eventId()) != null) {
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.AdInternal$_set_adState_$lambda-1$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.task.JobRunner, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final JobRunner invoke() {
return ServiceLocator.Companion.getInstance(context).getService(JobRunner.class);
}
});
m3835_set_adState_$lambda1$lambda0(lazy).execute(CleanupJob.Companion.makeJobInfo(eventId));
}
this.adState = this.adState.transitionTo(value);
}
/* renamed from: _set_adState_$lambda-1$lambda-0, reason: not valid java name */
private static final JobRunner m3835_set_adState_$lambda1$lambda0(Lazy lazy) {
return (JobRunner) lazy.getValue();
}
private final VungleApiClient getVungleApiClient() {
return (VungleApiClient) this.vungleApiClient$delegate.getValue();
}
private final SignalManager getSignalManager() {
return (SignalManager) this.signalManager$delegate.getValue();
}
public static /* synthetic */ VungleError canPlayAd$default(AdInternal adInternal, boolean z, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: canPlayAd");
}
if ((i & 1) != 0) {
z = false;
}
return adInternal.canPlayAd(z);
}
public final VungleError canPlayAd(boolean z) {
VungleError invalidAdStateError;
AdPayload adPayload = this.advertisement;
if (adPayload == null) {
invalidAdStateError = new AdNotLoadedCantPlay();
} else if (adPayload == null || !adPayload.hasExpired()) {
AdState adState = this.adState;
if (adState == AdState.PLAYING) {
invalidAdStateError = new ConcurrentPlaybackUnsupported();
} else {
if (adState == AdState.READY) {
return null;
}
invalidAdStateError = new InvalidAdStateError(0, null, null, null, null, null, 63, null);
}
} else if (z) {
invalidAdStateError = new AdExpiredOnPlayError();
} else {
invalidAdStateError = new AdExpiredError();
}
if (z) {
Placement placement = this.placement;
VungleError placementId$vungle_ads_release = invalidAdStateError.setPlacementId$vungle_ads_release(placement != null ? placement.getReferenceId() : null);
AdPayload adPayload2 = this.advertisement;
VungleError creativeId$vungle_ads_release = placementId$vungle_ads_release.setCreativeId$vungle_ads_release(adPayload2 != null ? adPayload2.getCreativeId() : null);
AdPayload adPayload3 = this.advertisement;
creativeId$vungle_ads_release.setEventId$vungle_ads_release(adPayload3 != null ? adPayload3.eventId() : null).logErrorNoReturnValue$vungle_ads_release();
}
return invalidAdStateError;
}
/* JADX WARN: Multi-variable type inference failed */
public final void loadAd(String placementId, String str, AdLoaderCallback adLoaderCallback) {
Lazy lazy;
Lazy lazy2;
Lazy lazy3;
Lazy lazy4;
int i;
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adLoaderCallback, "adLoaderCallback");
this.adLoaderCallback = adLoaderCallback;
if (!VungleAds.Companion.isInitialized()) {
adLoaderCallback.onFailure(new SdkNotInitialized());
return;
}
ConfigManager configManager = ConfigManager.INSTANCE;
Placement placement = configManager.getPlacement(placementId);
if (placement != null) {
this.placement = placement;
if (!isValidAdTypeForPlacement(placement)) {
adLoaderCallback.onFailure(new PlacementAdTypeMismatchError(placement.getReferenceId()).logError$vungle_ads_release());
return;
}
if ((placement.getHeaderBidding() && (str == null || str.length() == 0)) || (!placement.getHeaderBidding() && str != null && str.length() != 0)) {
adLoaderCallback.onFailure(new InvalidWaterfallPlacementError(placementId).logError$vungle_ads_release());
return;
}
} else if (configManager.configLastValidatedTimestamp() != -1) {
adLoaderCallback.onFailure(new PlacementNotFoundError(placementId).logError$vungle_ads_release());
return;
} else {
Placement placement2 = new Placement(placementId, false, (String) null, 6, (DefaultConstructorMarker) null);
this.placement = placement2;
placement = placement2;
}
VungleAdSize adSizeForAdRequest = getAdSizeForAdRequest();
String str2 = null;
Object[] objArr = 0;
Object[] objArr2 = 0;
Object[] objArr3 = 0;
if (!isValidAdSize(adSizeForAdRequest)) {
adLoaderCallback.onFailure(new InternalError(VungleError.INVALID_SIZE, str2, 2, objArr3 == true ? 1 : 0));
return;
}
AdState adState = this.adState;
if (adState != AdState.NEW) {
switch (WhenMappings.$EnumSwitchMapping$0[adState.ordinal()]) {
case 1:
throw new NotImplementedError(objArr2 == true ? 1 : 0, 1, objArr == true ? 1 : 0);
case 2:
i = 203;
break;
case 3:
i = 204;
break;
case 4:
i = 205;
break;
case 5:
i = 202;
break;
case 6:
i = 206;
break;
default:
throw new NoWhenBranchMatchedException();
}
Sdk.SDKError.Reason codeToLoggableReason = VungleError.Companion.codeToLoggableReason(i);
String str3 = this.adState + " state is incorrect for load";
AdPayload adPayload = this.advertisement;
String creativeId = adPayload != null ? adPayload.getCreativeId() : null;
AdPayload adPayload2 = this.advertisement;
adLoaderCallback.onFailure(new InvalidAdStateError(VungleError.INVALID_AD_STATE, codeToLoggableReason, str3, placementId, creativeId, adPayload2 != null ? adPayload2.eventId() : null).logError$vungle_ads_release());
return;
}
TimeIntervalMetric timeIntervalMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_REQUEST_TO_CALLBACK_ADO_DURATION_MS);
this.requestMetric = timeIntervalMetric;
timeIntervalMetric.markStart();
if (str != null && str.length() != 0) {
try {
StringFormat stringFormat = json;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(BidPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
this.bidPayload = (BidPayload) stringFormat.decodeFromString(serializer, str);
} catch (IllegalArgumentException e) {
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
String str4 = "Unable to decode payload into BidPayload object. Error: " + e.getLocalizedMessage();
AdPayload adPayload3 = this.advertisement;
analyticsClient.logError$vungle_ads_release(213, str4, (r13 & 4) != 0 ? null : placementId, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : adPayload3 != null ? adPayload3.eventId() : null);
adLoaderCallback.onFailure(new AdMarkupInvalidError());
return;
} catch (Throwable th) {
AnalyticsClient analyticsClient2 = AnalyticsClient.INSTANCE;
String str5 = "Unable to decode payload into BidPayload object. Error: " + th.getLocalizedMessage();
AdPayload adPayload4 = this.advertisement;
analyticsClient2.logError$vungle_ads_release(209, str5, (r13 & 4) != 0 ? null : placementId, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : adPayload4 != null ? adPayload4.eventId() : null);
adLoaderCallback.onFailure(new AdMarkupInvalidError());
return;
}
}
setAdState(AdState.LOADING);
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$loadAd$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.omsdk.OMInjector, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final OMInjector invoke() {
return ServiceLocator.Companion.getInstance(context).getService(OMInjector.class);
}
});
final Context context2 = this.context;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$loadAd$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.SDKExecutors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SDKExecutors invoke() {
return ServiceLocator.Companion.getInstance(context2).getService(SDKExecutors.class);
}
});
final Context context3 = this.context;
lazy3 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$loadAd$$inlined$inject$3
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.util.PathProvider, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final PathProvider invoke() {
return ServiceLocator.Companion.getInstance(context3).getService(PathProvider.class);
}
});
final Context context4 = this.context;
lazy4 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$loadAd$$inlined$inject$4
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.downloader.Downloader, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Downloader invoke() {
return ServiceLocator.Companion.getInstance(context4).getService(Downloader.class);
}
});
if (str == null || str.length() == 0) {
DefaultAdLoader defaultAdLoader = new DefaultAdLoader(this.context, getVungleApiClient(), m3837loadAd$lambda3(lazy2), m3836loadAd$lambda2(lazy), m3839loadAd$lambda5(lazy4), m3838loadAd$lambda4(lazy3), new AdRequest(placement, null, adSizeForAdRequest));
this.baseAdLoader = defaultAdLoader;
defaultAdLoader.loadAd(this);
} else {
RealtimeAdLoader realtimeAdLoader = new RealtimeAdLoader(this.context, getVungleApiClient(), m3837loadAd$lambda3(lazy2), m3836loadAd$lambda2(lazy), m3839loadAd$lambda5(lazy4), m3838loadAd$lambda4(lazy3), new AdRequest(placement, this.bidPayload, adSizeForAdRequest));
this.baseAdLoader = realtimeAdLoader;
realtimeAdLoader.loadAd(this);
}
}
/* renamed from: loadAd$lambda-2, reason: not valid java name */
private static final OMInjector m3836loadAd$lambda2(Lazy lazy) {
return (OMInjector) lazy.getValue();
}
/* renamed from: loadAd$lambda-3, reason: not valid java name */
private static final SDKExecutors m3837loadAd$lambda3(Lazy lazy) {
return (SDKExecutors) lazy.getValue();
}
/* renamed from: loadAd$lambda-4, reason: not valid java name */
private static final PathProvider m3838loadAd$lambda4(Lazy lazy) {
return (PathProvider) lazy.getValue();
}
/* renamed from: loadAd$lambda-5, reason: not valid java name */
private static final Downloader m3839loadAd$lambda5(Lazy lazy) {
return (Downloader) lazy.getValue();
}
public final void cancelDownload$vungle_ads_release() {
BaseAdLoader baseAdLoader = this.baseAdLoader;
if (baseAdLoader != null) {
baseAdLoader.cancel();
}
}
public final void play(Context context, final AdPlayCallback adPlayCallback) {
Intrinsics.checkNotNullParameter(adPlayCallback, "adPlayCallback");
this.playContext = context != null ? new WeakReference<>(context) : null;
VungleError canPlayAd = canPlayAd(true);
if (canPlayAd != null) {
adPlayCallback.onFailure(canPlayAd);
if (isErrorTerminal$vungle_ads_release(canPlayAd.getCode())) {
setAdState(AdState.ERROR);
return;
}
return;
}
AdPayload adPayload = this.advertisement;
if (adPayload == null) {
return;
}
AdPlayCallbackWrapper adPlayCallbackWrapper = new AdPlayCallbackWrapper(adPlayCallback) { // from class: com.vungle.ads.internal.AdInternal$play$callbackWrapper$1
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdStart(String str) {
this.setAdState(AdInternal.AdState.PLAYING);
super.onAdStart(str);
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdEnd(String str) {
this.setAdState(AdInternal.AdState.FINISHED);
super.onAdEnd(str);
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onFailure(VungleError error) {
Intrinsics.checkNotNullParameter(error, "error");
this.setAdState(AdInternal.AdState.ERROR);
super.onFailure(error);
}
};
cancelDownload$vungle_ads_release();
renderAd$vungle_ads_release(adPlayCallbackWrapper, adPayload);
}
public void renderAd$vungle_ads_release(final AdPlayCallback adPlayCallback, AdPayload advertisement) {
Context context;
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
AdActivity.Companion companion = AdActivity.Companion;
final Placement placement = this.placement;
companion.setEventListener$vungle_ads_release(new AdEventListener(adPlayCallback, placement) { // from class: com.vungle.ads.internal.AdInternal$renderAd$1
});
companion.setAdvertisement$vungle_ads_release(advertisement);
companion.setBidPayload$vungle_ads_release(this.bidPayload);
WeakReference<Context> weakReference = this.playContext;
if (weakReference == null || (context = weakReference.get()) == null) {
context = this.context;
}
Intrinsics.checkNotNullExpressionValue(context, "playContext?.get() ?: context");
Placement placement2 = this.placement;
if (placement2 == null) {
return;
}
ActivityManager.Companion.startWhenForeground(context, null, companion.createIntent(context, placement2.getReferenceId(), advertisement.eventId()), null);
}
@Override // com.vungle.ads.internal.load.AdLoaderCallback
public void onSuccess(AdPayload advertisement) {
Lazy lazy;
Lazy lazy2;
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
this.advertisement = advertisement;
setAdState(AdState.READY);
adLoadedAndUpdateConfigure$vungle_ads_release(advertisement);
AdLoaderCallback adLoaderCallback = this.adLoaderCallback;
if (adLoaderCallback != null) {
adLoaderCallback.onSuccess(advertisement);
}
TimeIntervalMetric timeIntervalMetric = this.requestMetric;
if (timeIntervalMetric != null) {
if (!advertisement.adLoadOptimizationEnabled()) {
timeIntervalMetric.setMetricType(Sdk.SDKMetric.SDKMetricType.AD_REQUEST_TO_CALLBACK_DURATION_MS);
}
timeIntervalMetric.markEnd();
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
Placement placement = this.placement;
AnalyticsClient.logMetric$vungle_ads_release$default(analyticsClient, timeIntervalMetric, placement != null ? placement.getReferenceId() : null, advertisement.getCreativeId(), advertisement.eventId(), (String) null, 16, (Object) null);
long calculateIntervalDuration = timeIntervalMetric.calculateIntervalDuration();
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$onSuccess$lambda-9$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.SDKExecutors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SDKExecutors invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SDKExecutors.class);
}
});
final Context context2 = this.context;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.AdInternal$onSuccess$lambda-9$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.util.PathProvider, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final PathProvider invoke() {
return ServiceLocator.Companion.getInstance(context2).getService(PathProvider.class);
}
});
List tpatUrls$default = AdPayload.getTpatUrls$default(advertisement, Constants.AD_LOAD_DURATION_TPAT_KEY, String.valueOf(calculateIntervalDuration), null, 4, null);
if (tpatUrls$default != null) {
new TpatSender(getVungleApiClient(), advertisement.placementId(), advertisement.getCreativeId(), advertisement.eventId(), m3840onSuccess$lambda9$lambda6(lazy).getIoExecutor(), m3841onSuccess$lambda9$lambda7(lazy2), getSignalManager()).sendTpats(tpatUrls$default, m3840onSuccess$lambda9$lambda6(lazy).getJobExecutor());
}
}
}
/* renamed from: onSuccess$lambda-9$lambda-6, reason: not valid java name */
private static final SDKExecutors m3840onSuccess$lambda9$lambda6(Lazy lazy) {
return (SDKExecutors) lazy.getValue();
}
/* renamed from: onSuccess$lambda-9$lambda-7, reason: not valid java name */
private static final PathProvider m3841onSuccess$lambda9$lambda7(Lazy lazy) {
return (PathProvider) lazy.getValue();
}
@Override // com.vungle.ads.internal.load.AdLoaderCallback
public void onFailure(VungleError error) {
Intrinsics.checkNotNullParameter(error, "error");
setAdState(AdState.ERROR);
AdLoaderCallback adLoaderCallback = this.adLoaderCallback;
if (adLoaderCallback != null) {
adLoaderCallback.onFailure(error);
}
}
public final boolean isErrorTerminal$vungle_ads_release(int i) {
return this.adState == AdState.READY && i == 304;
}
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
public static final class AdState {
public static final AdState NEW = new NEW("NEW", 0);
public static final AdState LOADING = new LOADING("LOADING", 1);
public static final AdState READY = new READY("READY", 2);
public static final AdState PLAYING = new PLAYING("PLAYING", 3);
public static final AdState FINISHED = new FINISHED("FINISHED", 4);
public static final AdState ERROR = new ERROR("ERROR", 5);
private static final /* synthetic */ AdState[] $VALUES = $values();
private static final /* synthetic */ AdState[] $values() {
return new AdState[]{NEW, LOADING, READY, PLAYING, FINISHED, ERROR};
}
public /* synthetic */ AdState(String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, i);
}
public static AdState valueOf(String str) {
return (AdState) Enum.valueOf(AdState.class, str);
}
public static AdState[] values() {
return (AdState[]) $VALUES.clone();
}
public abstract boolean canTransitionTo(AdState adState);
public static final class NEW extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return adState == AdState.LOADING || adState == AdState.READY || adState == AdState.ERROR;
}
public NEW(String str, int i) {
super(str, i, null);
}
}
private AdState(String str, int i) {
}
public static final class LOADING extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return adState == AdState.READY || adState == AdState.ERROR;
}
public LOADING(String str, int i) {
super(str, i, null);
}
}
public static final class READY extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return adState == AdState.PLAYING || adState == AdState.FINISHED || adState == AdState.ERROR;
}
public READY(String str, int i) {
super(str, i, null);
}
}
public static final class PLAYING extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return adState == AdState.FINISHED || adState == AdState.ERROR;
}
public PLAYING(String str, int i) {
super(str, i, null);
}
}
public static final class FINISHED extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return false;
}
public FINISHED(String str, int i) {
super(str, i, null);
}
}
public static final class ERROR extends AdState {
@Override // com.vungle.ads.internal.AdInternal.AdState
public boolean canTransitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
return adState == AdState.FINISHED;
}
public ERROR(String str, int i) {
super(str, i, null);
}
}
public final AdState transitionTo(AdState adState) {
Intrinsics.checkNotNullParameter(adState, "adState");
if (this != adState && !canTransitionTo(adState)) {
String str = "Cannot transition from " + name() + " to " + adState.name();
if (AdInternal.THROW_ON_ILLEGAL_TRANSITION) {
throw new IllegalStateException(str);
}
Logger.Companion.e(AdInternal.TAG, "Illegal state transition", new IllegalStateException(str));
}
return adState;
}
public final boolean isTerminalState() {
List listOf;
listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new AdState[]{FINISHED, ERROR});
return listOf.contains(this);
}
}
}

View File

@@ -0,0 +1,168 @@
package com.vungle.ads.internal;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.BaseAdListener;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.presenter.AdPlayCallback;
import com.vungle.ads.internal.util.ThreadUtil;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class BannerAdImpl$adPlayCallback$1 implements AdPlayCallback {
final /* synthetic */ String $placementId;
final /* synthetic */ BannerAdImpl this$0;
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdRewarded(String str) {
}
public BannerAdImpl$adPlayCallback$1(BannerAdImpl bannerAdImpl, String str) {
this.this$0 = bannerAdImpl;
this.$placementId = str;
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdStart(String str) {
this.this$0.getSignalManager$vungle_ads_release().increaseSessionDepthCounter();
this.this$0.getShowToPresentMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, this.this$0.getShowToPresentMetric$vungle_ads_release(), this.$placementId, this.this$0.getCreativeId(), this.this$0.getEventId(), (String) null, 16, (Object) null);
this.this$0.getPresentToDisplayMetric$vungle_ads_release().markStart();
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3851onAdStart$lambda0(BannerAdImpl.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdStart$lambda-0, reason: not valid java name */
public static final void m3851onAdStart$lambda0(BannerAdImpl this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdStart(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdImpression(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3849onAdImpression$lambda1(BannerAdImpl.this);
}
});
this.this$0.getPresentToDisplayMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, this.this$0.getPresentToDisplayMetric$vungle_ads_release(), this.$placementId, this.this$0.getCreativeId(), this.this$0.getEventId(), (String) null, 16, (Object) null);
this.this$0.getDisplayToClickMetric$vungle_ads_release().markStart();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdImpression$lambda-1, reason: not valid java name */
public static final void m3849onAdImpression$lambda1(BannerAdImpl this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdImpression(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdEnd(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3848onAdEnd$lambda2(BannerAdImpl.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdEnd$lambda-2, reason: not valid java name */
public static final void m3848onAdEnd$lambda2(BannerAdImpl this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdEnd(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdClick(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3847onAdClick$lambda3(BannerAdImpl.this);
}
});
this.this$0.getDisplayToClickMetric$vungle_ads_release().markEnd();
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(this.this$0.getDisplayToClickMetric$vungle_ads_release(), (r13 & 2) != 0 ? null : this.$placementId, (r13 & 4) != 0 ? null : this.this$0.getCreativeId(), (r13 & 8) != 0 ? null : this.this$0.getEventId(), (r13 & 16) != 0 ? null : null);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdClick$lambda-3, reason: not valid java name */
public static final void m3847onAdClick$lambda3(BannerAdImpl this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdClicked(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdLeftApplication(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3850onAdLeftApplication$lambda4(BannerAdImpl.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdLeftApplication$lambda-4, reason: not valid java name */
public static final void m3850onAdLeftApplication$lambda4(BannerAdImpl this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdLeftApplication(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onFailure(final VungleError error) {
Intrinsics.checkNotNullParameter(error, "error");
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAdImpl bannerAdImpl = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.BannerAdImpl$adPlayCallback$1$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
BannerAdImpl$adPlayCallback$1.m3852onFailure$lambda5(BannerAdImpl.this, error);
}
});
this.this$0.getShowToFailMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, this.this$0.getShowToFailMetric$vungle_ads_release(), this.$placementId, this.this$0.getCreativeId(), this.this$0.getEventId(), (String) null, 16, (Object) null);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onFailure$lambda-5, reason: not valid java name */
public static final void m3852onFailure$lambda5(BannerAdImpl this$0, VungleError error) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(error, "$error");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdFailedToPlay(this$0, error);
}
}
}

View File

@@ -0,0 +1,44 @@
package com.vungle.ads.internal;
import android.content.Context;
import com.vungle.ads.AdConfig;
import com.vungle.ads.BaseAd;
import com.vungle.ads.VungleAdSize;
import com.vungle.ads.internal.presenter.AdPlayCallbackWrapper;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class BannerAdImpl extends BaseAd {
private final AdPlayCallbackWrapper adPlayCallback;
private final VungleAdSize adSize;
public final AdPlayCallbackWrapper getAdPlayCallback$vungle_ads_release() {
return this.adPlayCallback;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BannerAdImpl(Context context, String placementId, VungleAdSize adSize, AdConfig adConfig) {
super(context, placementId, adConfig);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adSize, "adSize");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
this.adSize = adSize;
AdInternal adInternal$vungle_ads_release = getAdInternal$vungle_ads_release();
Intrinsics.checkNotNull(adInternal$vungle_ads_release, "null cannot be cast to non-null type com.vungle.ads.internal.BannerAdInternal");
this.adPlayCallback = ((BannerAdInternal) adInternal$vungle_ads_release).wrapCallback$vungle_ads_release(new BannerAdImpl$adPlayCallback$1(this, placementId));
}
@Override // com.vungle.ads.BaseAd
public BannerAdInternal constructAdInternal$vungle_ads_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new BannerAdInternal(context, this.adSize);
}
public final VungleAdSize getAdViewSize() {
AdInternal adInternal$vungle_ads_release = getAdInternal$vungle_ads_release();
Intrinsics.checkNotNull(adInternal$vungle_ads_release, "null cannot be cast to non-null type com.vungle.ads.internal.BannerAdInternal");
VungleAdSize updatedAdSize$vungle_ads_release = ((BannerAdInternal) adInternal$vungle_ads_release).getUpdatedAdSize$vungle_ads_release();
return updatedAdSize$vungle_ads_release == null ? this.adSize : updatedAdSize$vungle_ads_release;
}
}

View File

@@ -0,0 +1,104 @@
package com.vungle.ads.internal;
import android.content.Context;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.VungleAdSize;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.presenter.AdPlayCallback;
import com.vungle.ads.internal.presenter.AdPlayCallbackWrapper;
import com.vungle.ads.internal.util.ViewUtility;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class BannerAdInternal extends AdInternal {
private final VungleAdSize adSize;
private VungleAdSize updatedAdSize;
@Override // com.vungle.ads.internal.AdInternal
public VungleAdSize getAdSizeForAdRequest() {
return this.adSize;
}
public final VungleAdSize getUpdatedAdSize$vungle_ads_release() {
return this.updatedAdSize;
}
public final void setUpdatedAdSize$vungle_ads_release(VungleAdSize vungleAdSize) {
this.updatedAdSize = vungleAdSize;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BannerAdInternal(Context context, VungleAdSize adSize) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(adSize, "adSize");
this.adSize = adSize;
}
public final AdPlayCallbackWrapper wrapCallback$vungle_ads_release(final AdPlayCallback adPlayCallback) {
Intrinsics.checkNotNullParameter(adPlayCallback, "adPlayCallback");
return new AdPlayCallbackWrapper(adPlayCallback) { // from class: com.vungle.ads.internal.BannerAdInternal$wrapCallback$1
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdStart(String str) {
this.setAdState(AdInternal.AdState.PLAYING);
super.onAdStart(str);
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdEnd(String str) {
this.setAdState(AdInternal.AdState.FINISHED);
super.onAdEnd(str);
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallbackWrapper, com.vungle.ads.internal.presenter.AdPlayCallback
public void onFailure(VungleError error) {
Intrinsics.checkNotNullParameter(error, "error");
this.setAdState(AdInternal.AdState.ERROR);
super.onFailure(error);
}
};
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdTypeForPlacement(Placement placement) {
Intrinsics.checkNotNullParameter(placement, "placement");
return placement.isBanner() || placement.isMREC() || placement.isInline();
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdSize(VungleAdSize vungleAdSize) {
boolean isValidSize$vungle_ads_release = vungleAdSize != null ? vungleAdSize.isValidSize$vungle_ads_release() : false;
if (!isValidSize$vungle_ads_release) {
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
String str = "Invalidate size " + vungleAdSize + " for banner ad";
Placement placement = getPlacement();
String referenceId = placement != null ? placement.getReferenceId() : null;
AdPayload advertisement = getAdvertisement();
analyticsClient.logError$vungle_ads_release(500, str, (r13 & 4) != 0 ? null : referenceId, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : advertisement != null ? advertisement.eventId() : null);
}
return isValidSize$vungle_ads_release;
}
@Override // com.vungle.ads.internal.AdInternal
public void adLoadedAndUpdateConfigure$vungle_ads_release(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
super.adLoadedAndUpdateConfigure$vungle_ads_release(advertisement);
if (this.adSize.isAdaptiveWidth$vungle_ads_release() || this.adSize.isAdaptiveHeight$vungle_ads_release()) {
Pair deviceWidthAndHeightWithOrientation = ViewUtility.INSTANCE.getDeviceWidthAndHeightWithOrientation(getContext(), 0);
int intValue = ((Number) deviceWidthAndHeightWithOrientation.component1()).intValue();
int intValue2 = ((Number) deviceWidthAndHeightWithOrientation.component2()).intValue();
int adWidth = this.adSize.isAdaptiveWidth$vungle_ads_release() ? advertisement.adWidth() : this.adSize.getWidth();
int adHeight = this.adSize.isAdaptiveHeight$vungle_ads_release() ? advertisement.adHeight() : this.adSize.getHeight();
int min = Math.min(intValue, adWidth);
int min2 = Math.min(intValue2, adHeight);
if (this.adSize.isAdaptiveHeight$vungle_ads_release() && this.adSize.getHeight() > 0) {
min2 = Math.min(this.adSize.getHeight(), min2);
}
this.updatedAdSize = new VungleAdSize(min, min2);
}
}
}

View File

@@ -0,0 +1,427 @@
package com.vungle.ads.internal;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.MotionEvent;
import android.view.WindowManager;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.network.TpatSender;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.util.PathProvider;
import com.vungle.ads.internal.util.ViewUtility;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.regex.Pattern;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
/* loaded from: classes4.dex */
public final class ClickCoordinateTracker {
private static final String TAG = "ClickCoordinateTracker";
private final AdPayload advertisement;
private final Context context;
private final ClickCoordinate currentClick;
private final Executor executor;
private final Lazy executors$delegate;
private final Lazy vungleApiClient$delegate;
public static final Companion Companion = new Companion(null);
private static final String MACRO_REQ_WIDTH = Pattern.quote("{{{req_width}}}");
private static final String MACRO_REQ_HEIGHT = Pattern.quote("{{{req_height}}}");
private static final String MACRO_WIDTH = Pattern.quote("{{{width}}}");
private static final String MACRO_HEIGHT = Pattern.quote("{{{height}}}");
private static final String MACRO_DOWN_X = Pattern.quote("{{{down_x}}}");
private static final String MACRO_DOWN_Y = Pattern.quote("{{{down_y}}}");
private static final String MACRO_UP_X = Pattern.quote("{{{up_x}}}");
private static final String MACRO_UP_Y = Pattern.quote("{{{up_y}}}");
@VisibleForTesting
public static /* synthetic */ void getCurrentClick$vungle_ads_release$annotations() {
}
public final ClickCoordinate getCurrentClick$vungle_ads_release() {
return this.currentClick;
}
public ClickCoordinateTracker(final Context context, AdPayload advertisement, Executor executor) {
Lazy lazy;
Lazy lazy2;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
Intrinsics.checkNotNullParameter(executor, "executor");
this.context = context;
this.advertisement = advertisement;
this.executor = executor;
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ClickCoordinateTracker$special$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
this.vungleApiClient$delegate = lazy;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ClickCoordinateTracker$special$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.Executors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Executors invoke() {
return ServiceLocator.Companion.getInstance(context).getService(Executors.class);
}
});
this.executors$delegate = lazy2;
this.currentClick = new ClickCoordinate(new Coordinate(Integer.MIN_VALUE, Integer.MIN_VALUE), new Coordinate(Integer.MIN_VALUE, Integer.MIN_VALUE));
}
private final VungleApiClient getVungleApiClient() {
return (VungleApiClient) this.vungleApiClient$delegate.getValue();
}
private final Executors getExecutors() {
return (Executors) this.executors$delegate.getValue();
}
public final void trackCoordinate(MotionEvent event) {
Intrinsics.checkNotNullParameter(event, "event");
if (this.advertisement.isClickCoordinatesTrackingEnabled()) {
int action = event.getAction();
if (action == 0) {
this.currentClick.setDownCoordinate(new Coordinate((int) event.getX(), (int) event.getY()));
} else {
if (action != 1) {
return;
}
this.currentClick.setUpCoordinate(new Coordinate((int) event.getX(), (int) event.getY()));
if (this.currentClick.ready()) {
sendClickCoordinates();
}
}
}
}
private final void sendClickCoordinates() {
Lazy lazy;
Lazy lazy2;
List<String> tpatUrls$default = AdPayload.getTpatUrls$default(this.advertisement, AdPayload.TPAT_CLICK_COORDINATES_URLS, null, null, 6, null);
List list = tpatUrls$default;
if (list == null || list.isEmpty()) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(129, "Empty urls for tpat: video.clickCoordinates", this.advertisement.placementId(), this.advertisement.getCreativeId(), this.advertisement.eventId());
return;
}
int requestedWidth = getRequestedWidth();
int requestedHeight = getRequestedHeight();
int requestedWidth2 = getRequestedWidth();
int requestedHeight2 = getRequestedHeight();
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ClickCoordinateTracker$sendClickCoordinates$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.util.PathProvider, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final PathProvider invoke() {
return ServiceLocator.Companion.getInstance(context).getService(PathProvider.class);
}
});
final Context context2 = this.context;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ClickCoordinateTracker$sendClickCoordinates$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.signals.SignalManager, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(context2).getService(SignalManager.class);
}
});
TpatSender tpatSender = new TpatSender(getVungleApiClient(), this.advertisement.placementId(), this.advertisement.getCreativeId(), this.advertisement.eventId(), getExecutors().getIoExecutor(), m3853sendClickCoordinates$lambda0(lazy), m3854sendClickCoordinates$lambda1(lazy2));
for (String str : tpatUrls$default) {
String MACRO_REQ_WIDTH2 = MACRO_REQ_WIDTH;
Intrinsics.checkNotNullExpressionValue(MACRO_REQ_WIDTH2, "MACRO_REQ_WIDTH");
String replace = new Regex(MACRO_REQ_WIDTH2).replace(str, String.valueOf(requestedWidth));
String MACRO_REQ_HEIGHT2 = MACRO_REQ_HEIGHT;
Intrinsics.checkNotNullExpressionValue(MACRO_REQ_HEIGHT2, "MACRO_REQ_HEIGHT");
String replace2 = new Regex(MACRO_REQ_HEIGHT2).replace(replace, String.valueOf(requestedHeight));
String MACRO_WIDTH2 = MACRO_WIDTH;
Intrinsics.checkNotNullExpressionValue(MACRO_WIDTH2, "MACRO_WIDTH");
String replace3 = new Regex(MACRO_WIDTH2).replace(replace2, String.valueOf(requestedWidth2));
String MACRO_HEIGHT2 = MACRO_HEIGHT;
Intrinsics.checkNotNullExpressionValue(MACRO_HEIGHT2, "MACRO_HEIGHT");
String replace4 = new Regex(MACRO_HEIGHT2).replace(replace3, String.valueOf(requestedHeight2));
String MACRO_DOWN_X2 = MACRO_DOWN_X;
Intrinsics.checkNotNullExpressionValue(MACRO_DOWN_X2, "MACRO_DOWN_X");
String replace5 = new Regex(MACRO_DOWN_X2).replace(replace4, String.valueOf(this.currentClick.getDownCoordinate().getX()));
String MACRO_DOWN_Y2 = MACRO_DOWN_Y;
Intrinsics.checkNotNullExpressionValue(MACRO_DOWN_Y2, "MACRO_DOWN_Y");
String replace6 = new Regex(MACRO_DOWN_Y2).replace(replace5, String.valueOf(this.currentClick.getDownCoordinate().getY()));
String MACRO_UP_X2 = MACRO_UP_X;
Intrinsics.checkNotNullExpressionValue(MACRO_UP_X2, "MACRO_UP_X");
String replace7 = new Regex(MACRO_UP_X2).replace(replace6, String.valueOf(this.currentClick.getUpCoordinate().getX()));
String MACRO_UP_Y2 = MACRO_UP_Y;
Intrinsics.checkNotNullExpressionValue(MACRO_UP_Y2, "MACRO_UP_Y");
tpatSender.sendTpat(new Regex(MACRO_UP_Y2).replace(replace7, String.valueOf(this.currentClick.getUpCoordinate().getY())), this.executor);
}
}
/* renamed from: sendClickCoordinates$lambda-0, reason: not valid java name */
private static final PathProvider m3853sendClickCoordinates$lambda0(Lazy lazy) {
return (PathProvider) lazy.getValue();
}
/* renamed from: sendClickCoordinates$lambda-1, reason: not valid java name */
private static final SignalManager m3854sendClickCoordinates$lambda1(Lazy lazy) {
return (SignalManager) lazy.getValue();
}
public static final class Coordinate {
private final int x;
private final int y;
public static /* synthetic */ Coordinate copy$default(Coordinate coordinate, int i, int i2, int i3, Object obj) {
if ((i3 & 1) != 0) {
i = coordinate.x;
}
if ((i3 & 2) != 0) {
i2 = coordinate.y;
}
return coordinate.copy(i, i2);
}
public final int component1() {
return this.x;
}
public final int component2() {
return this.y;
}
public final Coordinate copy(int i, int i2) {
return new Coordinate(i, i2);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Coordinate)) {
return false;
}
Coordinate coordinate = (Coordinate) obj;
return this.x == coordinate.x && this.y == coordinate.y;
}
public final int getX() {
return this.x;
}
public final int getY() {
return this.y;
}
public int hashCode() {
return (Integer.hashCode(this.x) * 31) + Integer.hashCode(this.y);
}
public String toString() {
return "Coordinate(x=" + this.x + ", y=" + this.y + ')';
}
public Coordinate(int i, int i2) {
this.x = i;
this.y = i2;
}
}
public static final class ClickCoordinate {
private Coordinate downCoordinate;
private Coordinate upCoordinate;
public static /* synthetic */ ClickCoordinate copy$default(ClickCoordinate clickCoordinate, Coordinate coordinate, Coordinate coordinate2, int i, Object obj) {
if ((i & 1) != 0) {
coordinate = clickCoordinate.downCoordinate;
}
if ((i & 2) != 0) {
coordinate2 = clickCoordinate.upCoordinate;
}
return clickCoordinate.copy(coordinate, coordinate2);
}
public final Coordinate component1() {
return this.downCoordinate;
}
public final Coordinate component2() {
return this.upCoordinate;
}
public final ClickCoordinate copy(Coordinate downCoordinate, Coordinate upCoordinate) {
Intrinsics.checkNotNullParameter(downCoordinate, "downCoordinate");
Intrinsics.checkNotNullParameter(upCoordinate, "upCoordinate");
return new ClickCoordinate(downCoordinate, upCoordinate);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ClickCoordinate)) {
return false;
}
ClickCoordinate clickCoordinate = (ClickCoordinate) obj;
return Intrinsics.areEqual(this.downCoordinate, clickCoordinate.downCoordinate) && Intrinsics.areEqual(this.upCoordinate, clickCoordinate.upCoordinate);
}
public final Coordinate getDownCoordinate() {
return this.downCoordinate;
}
public final Coordinate getUpCoordinate() {
return this.upCoordinate;
}
public int hashCode() {
return (this.downCoordinate.hashCode() * 31) + this.upCoordinate.hashCode();
}
public final void setDownCoordinate(Coordinate coordinate) {
Intrinsics.checkNotNullParameter(coordinate, "<set-?>");
this.downCoordinate = coordinate;
}
public final void setUpCoordinate(Coordinate coordinate) {
Intrinsics.checkNotNullParameter(coordinate, "<set-?>");
this.upCoordinate = coordinate;
}
public String toString() {
return "ClickCoordinate(downCoordinate=" + this.downCoordinate + ", upCoordinate=" + this.upCoordinate + ')';
}
public ClickCoordinate(Coordinate downCoordinate, Coordinate upCoordinate) {
Intrinsics.checkNotNullParameter(downCoordinate, "downCoordinate");
Intrinsics.checkNotNullParameter(upCoordinate, "upCoordinate");
this.downCoordinate = downCoordinate;
this.upCoordinate = upCoordinate;
}
public final boolean ready() {
return (this.downCoordinate.getX() == Integer.MIN_VALUE || this.downCoordinate.getY() == Integer.MIN_VALUE || this.upCoordinate.getX() == Integer.MIN_VALUE || this.upCoordinate.getY() == Integer.MIN_VALUE) ? false : true;
}
}
private final int getRequestedWidth() {
int adWidth = this.advertisement.adWidth();
if (adWidth == 0) {
return getDeviceWidth();
}
return ViewUtility.INSTANCE.dpToPixels(this.context, adWidth);
}
private final int getRequestedHeight() {
int adHeight = this.advertisement.adHeight();
if (adHeight == 0) {
return getDeviceHeight();
}
return ViewUtility.INSTANCE.dpToPixels(this.context, adHeight);
}
private final int getDeviceWidth() {
return new DeviceScreenInfo(this.context).getDeviceWidth();
}
private final int getDeviceHeight() {
return new DeviceScreenInfo(this.context).getDeviceHeight();
}
public static final class DeviceScreenInfo {
private final Context context;
private final DisplayMetrics dm;
public static /* synthetic */ DeviceScreenInfo copy$default(DeviceScreenInfo deviceScreenInfo, Context context, int i, Object obj) {
if ((i & 1) != 0) {
context = deviceScreenInfo.context;
}
return deviceScreenInfo.copy(context);
}
public final Context component1() {
return this.context;
}
public final DeviceScreenInfo copy(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new DeviceScreenInfo(context);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof DeviceScreenInfo) && Intrinsics.areEqual(this.context, ((DeviceScreenInfo) obj).context);
}
public final Context getContext() {
return this.context;
}
public int hashCode() {
return this.context.hashCode();
}
public String toString() {
return "DeviceScreenInfo(context=" + this.context + ')';
}
public DeviceScreenInfo(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
DisplayMetrics displayMetrics = new DisplayMetrics();
this.dm = displayMetrics;
Object systemService = context.getSystemService("window");
Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.view.WindowManager");
((WindowManager) systemService).getDefaultDisplay().getMetrics(displayMetrics);
}
public final int getDeviceWidth() {
return this.dm.widthPixels;
}
public final int getDeviceHeight() {
return this.dm.heightPixels;
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,676 @@
package com.vungle.ads.internal;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.ConfigurationError;
import com.vungle.ads.Metric;
import com.vungle.ads.NetworkUnreachable;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.SingleValueMetric;
import com.vungle.ads.TimeIntervalMetric;
import com.vungle.ads.internal.model.ConfigPayload;
import com.vungle.ads.internal.model.Cookie;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.Call;
import com.vungle.ads.internal.network.Callback;
import com.vungle.ads.internal.network.Response;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.persistence.FilePreferences;
import com.vungle.ads.internal.privacy.PrivacyManager;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.util.Logger;
import java.net.UnknownHostException;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.text.StringsKt__StringsJVMKt;
import kotlinx.serialization.DeserializationStrategy;
import kotlinx.serialization.SerializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
/* loaded from: classes4.dex */
public final class ConfigManager {
private static final int CONFIG_ALL_DATA = 2;
private static final int CONFIG_LAST_VALIDATED_TIMESTAMP_ONLY = 1;
public static final long CONFIG_LAST_VALIDATE_TS_DEFAULT = -1;
private static final int CONFIG_NOT_AVAILABLE = 0;
private static final int DEFAULT_SESSION_TIMEOUT_SECONDS = 900;
private static final int DEFAULT_SIGNALS_SESSION_TIMEOUT_SECONDS = 1800;
public static final String TAG = "ConfigManager";
private static String applicationId;
private static ConfigPayload config;
private static String configExt;
private static ConfigPayload.Endpoints endpoints;
private static List<Placement> placements;
public static final ConfigManager INSTANCE = new ConfigManager();
private static final Json json = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.ConfigManager$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
@VisibleForTesting
public final void clearConfig$vungle_ads_release() {
endpoints = null;
placements = null;
config = null;
}
public final String getConfigExtension() {
String str = configExt;
return str == null ? "" : str;
}
public final List<Placement> placements() {
return placements;
}
public final void setAppId$vungle_ads_release(String applicationId2) {
Intrinsics.checkNotNullParameter(applicationId2, "applicationId");
applicationId = applicationId2;
}
private ConfigManager() {
}
/* renamed from: fetchConfigAsync$lambda-0, reason: not valid java name */
private static final VungleApiClient m3855fetchConfigAsync$lambda0(Lazy lazy) {
return (VungleApiClient) lazy.getValue();
}
public final void fetchConfigAsync$vungle_ads_release(final Context context, final Function1 onComplete) {
Lazy lazy;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(onComplete, "onComplete");
ServiceLocator.Companion companion = ServiceLocator.Companion;
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.ConfigManager$fetchConfigAsync$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
try {
final TimeIntervalMetric timeIntervalMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.INIT_REQUEST_TO_RESPONSE_DURATION_MS);
timeIntervalMetric.markStart();
Call<ConfigPayload> config2 = m3855fetchConfigAsync$lambda0(lazy).config();
if (config2 != null) {
config2.enqueue(new Callback<ConfigPayload>() { // from class: com.vungle.ads.internal.ConfigManager$fetchConfigAsync$1
@Override // com.vungle.ads.internal.network.Callback
public void onResponse(Call<ConfigPayload> call, Response<ConfigPayload> response) {
TimeIntervalMetric.this.markEnd();
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release((Metric) TimeIntervalMetric.this, (r13 & 2) != 0 ? null : null, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : VungleApiClient.Companion.getBASE_URL$vungle_ads_release());
if (response == null || !response.isSuccessful() || response.body() == null) {
new ConfigurationError().logErrorNoReturnValue$vungle_ads_release();
return;
}
ConfigManager.INSTANCE.initWithConfig$vungle_ads_release(context, response.body(), false, new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.CONFIG_LOADED_FROM_INIT));
onComplete.invoke(Boolean.TRUE);
}
@Override // com.vungle.ads.internal.network.Callback
public void onFailure(Call<ConfigPayload> call, Throwable th) {
TimeIntervalMetric.this.markEnd();
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release((Metric) TimeIntervalMetric.this, (r13 & 2) != 0 ? null : null, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : VungleApiClient.Companion.getBASE_URL$vungle_ads_release());
new ConfigurationError().logErrorNoReturnValue$vungle_ads_release();
Logger.Companion companion2 = Logger.Companion;
StringBuilder sb = new StringBuilder();
sb.append("Error while fetching config: ");
sb.append(th != null ? th.getMessage() : null);
companion2.e(ConfigManager.TAG, sb.toString());
onComplete.invoke(Boolean.FALSE);
}
});
}
} catch (Throwable th) {
if ((th instanceof UnknownHostException) || (th instanceof SecurityException)) {
new NetworkUnreachable().logErrorNoReturnValue$vungle_ads_release();
} else {
new ConfigurationError().logErrorNoReturnValue$vungle_ads_release();
}
onComplete.invoke(Boolean.FALSE);
}
}
/* renamed from: updateConfigExtension$lambda-1, reason: not valid java name */
private static final FilePreferences m3858updateConfigExtension$lambda1(Lazy lazy) {
return (FilePreferences) lazy.getValue();
}
@VisibleForTesting
public final void updateConfigExtension$vungle_ads_release(final Context context, String ext) {
Lazy lazy;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(ext, "ext");
configExt = ext;
ServiceLocator.Companion companion = ServiceLocator.Companion;
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.ConfigManager$updateConfigExtension$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.persistence.FilePreferences, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final FilePreferences invoke() {
return ServiceLocator.Companion.getInstance(context).getService(FilePreferences.class);
}
});
m3858updateConfigExtension$lambda1(lazy).put(Cookie.CONFIG_EXTENSION, ext).apply();
}
public static /* synthetic */ void initWithConfig$vungle_ads_release$default(ConfigManager configManager, Context context, ConfigPayload configPayload, boolean z, SingleValueMetric singleValueMetric, int i, Object obj) {
if ((i & 8) != 0) {
singleValueMetric = null;
}
configManager.initWithConfig$vungle_ads_release(context, configPayload, z, singleValueMetric);
}
/* renamed from: initWithConfig$lambda-2, reason: not valid java name */
private static final FilePreferences m3856initWithConfig$lambda2(Lazy lazy) {
return (FilePreferences) lazy.getValue();
}
public final synchronized void initWithConfig$vungle_ads_release(final Context context, ConfigPayload configPayload, boolean z, SingleValueMetric singleValueMetric) {
Lazy lazy;
Lazy lazy2;
try {
Intrinsics.checkNotNullParameter(context, "context");
try {
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ConfigManager$initWithConfig$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.persistence.FilePreferences, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final FilePreferences invoke() {
return ServiceLocator.Companion.getInstance(context).getService(FilePreferences.class);
}
});
int checkConfigPayload$vungle_ads_release = checkConfigPayload$vungle_ads_release(configPayload);
if (checkConfigPayload$vungle_ads_release == 0) {
Logger.Companion.e(TAG, "Config is not available.");
return;
}
if (checkConfigPayload$vungle_ads_release == 1) {
if (!z && configPayload != null) {
Long configLastValidatedTimestamp = configPayload.getConfigLastValidatedTimestamp();
long longValue = configLastValidatedTimestamp != null ? configLastValidatedTimestamp.longValue() : -1L;
ConfigPayload configPayload2 = config;
if (configPayload2 != null) {
configPayload2.setConfigLastValidatedTimestamp(Long.valueOf(longValue));
}
ConfigPayload configPayload3 = config;
if (configPayload3 != null) {
INSTANCE.updateCachedConfig(configPayload3, m3856initWithConfig$lambda2(lazy));
}
}
return;
}
config = configPayload;
endpoints = configPayload != null ? configPayload.getEndpoints() : null;
placements = configPayload != null ? configPayload.getPlacements() : null;
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.updateErrorLevelAndMetricEnabled$vungle_ads_release(getLogLevel(), getMetricsEnabled());
if (!z && configPayload != null) {
updateCachedConfig(configPayload, m3856initWithConfig$lambda2(lazy));
String configExtension = configPayload.getConfigExtension();
if (configExtension != null) {
INSTANCE.updateConfigExtension$vungle_ads_release(context, configExtension);
}
}
if (omEnabled()) {
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.ConfigManager$initWithConfig$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.omsdk.OMInjector, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final OMInjector invoke() {
return ServiceLocator.Companion.getInstance(context).getService(OMInjector.class);
}
});
m3857initWithConfig$lambda5(lazy2).init();
}
if (singleValueMetric != null) {
analyticsClient.logMetric$vungle_ads_release(singleValueMetric, (r13 & 2) != 0 ? null : null, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
}
PrivacyManager.INSTANCE.updateDisableAdId(shouldDisableAdId());
} catch (Exception e) {
Logger.Companion.e(TAG, "Error while validating config: " + e.getMessage());
}
} catch (Throwable th) {
throw th;
}
}
/* renamed from: initWithConfig$lambda-5, reason: not valid java name */
private static final OMInjector m3857initWithConfig$lambda5(Lazy lazy) {
return (OMInjector) lazy.getValue();
}
public final Placement getPlacement(String id) {
Intrinsics.checkNotNullParameter(id, "id");
List<Placement> list = placements;
Object obj = null;
if (list == null) {
return null;
}
Iterator<T> it = list.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Object next = it.next();
if (Intrinsics.areEqual(((Placement) next).getReferenceId(), id)) {
obj = next;
break;
}
}
return (Placement) obj;
}
public final String getAdsEndpoint() {
ConfigPayload.Endpoints endpoints2 = endpoints;
String str = null;
String adsEndpoint = endpoints2 != null ? endpoints2.getAdsEndpoint() : null;
if (adsEndpoint != null && adsEndpoint.length() != 0) {
str = adsEndpoint;
}
return str == null ? Constants.DEFAULT_ADS_ENDPOINT : str;
}
public final String getRiEndpoint() {
ConfigPayload.Endpoints endpoints2 = endpoints;
if (endpoints2 != null) {
return endpoints2.getRiEndpoint();
}
return null;
}
public final String getMraidEndpoint() {
ConfigPayload.Endpoints endpoints2 = endpoints;
if (endpoints2 != null) {
return endpoints2.getMraidEndpoint();
}
return null;
}
public final String getMraidJsVersion() {
String mraidEndpoint = getMraidEndpoint();
if (mraidEndpoint != null) {
String str = "mraid_" + Uri.parse(mraidEndpoint).getLastPathSegment();
if (str != null) {
return str;
}
}
return "mraid_1";
}
public final String getGDPRConsentMessage() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
ConfigPayload configPayload = config;
if (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null) {
return null;
}
return gdpr.getConsentMessage();
}
public final String getGDPRConsentTitle() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
ConfigPayload configPayload = config;
if (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null) {
return null;
}
return gdpr.getConsentTitle();
}
public final String getGDPRButtonAccept() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
ConfigPayload configPayload = config;
if (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null) {
return null;
}
return gdpr.getButtonAccept();
}
public final String getGDPRButtonDeny() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
ConfigPayload configPayload = config;
if (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null) {
return null;
}
return gdpr.getButtonDeny();
}
public final String getGDPRConsentMessageVersion() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
String consentMessageVersion;
ConfigPayload configPayload = config;
return (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null || (consentMessageVersion = gdpr.getConsentMessageVersion()) == null) ? "" : consentMessageVersion;
}
public final boolean getGDPRIsCountryDataProtected() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.GDPRSettings gdpr;
Boolean isCountryDataProtected;
ConfigPayload configPayload = config;
if (configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (gdpr = userPrivacy.getGdpr()) == null || (isCountryDataProtected = gdpr.isCountryDataProtected()) == null) {
return false;
}
return isCountryDataProtected.booleanValue();
}
public final ConfigPayload.IABSettings.TcfStatus getTcfStatus() {
ConfigPayload.UserPrivacy userPrivacy;
ConfigPayload.IABSettings iab;
ConfigPayload.IABSettings.TcfStatus.Companion companion = ConfigPayload.IABSettings.TcfStatus.Companion;
ConfigPayload configPayload = config;
return companion.fromRawValue((configPayload == null || (userPrivacy = configPayload.getUserPrivacy()) == null || (iab = userPrivacy.getIab()) == null) ? null : iab.getTcfStatus());
}
public final boolean shouldDisableAdId() {
Boolean disableAdId;
ConfigPayload configPayload = config;
if (configPayload == null || (disableAdId = configPayload.getDisableAdId()) == null) {
return true;
}
return disableAdId.booleanValue();
}
public final boolean isReportIncentivizedEnabled() {
Boolean isReportIncentivizedEnabled;
ConfigPayload configPayload = config;
if (configPayload == null || (isReportIncentivizedEnabled = configPayload.isReportIncentivizedEnabled()) == null) {
return false;
}
return isReportIncentivizedEnabled.booleanValue();
}
public final long configLastValidatedTimestamp() {
Long configLastValidatedTimestamp;
ConfigPayload configPayload = config;
if (configPayload == null || (configLastValidatedTimestamp = configPayload.getConfigLastValidatedTimestamp()) == null) {
return -1L;
}
return configLastValidatedTimestamp.longValue();
}
public final boolean omEnabled() {
ConfigPayload.ViewAbilitySettings viewAbility;
Boolean om;
ConfigPayload configPayload = config;
if (configPayload == null || (viewAbility = configPayload.getViewAbility()) == null || (om = viewAbility.getOm()) == null) {
return false;
}
return om.booleanValue();
}
public final String getMetricsEndpoint() {
ConfigPayload.Endpoints endpoints2 = endpoints;
String str = null;
String metricsEndpoint = endpoints2 != null ? endpoints2.getMetricsEndpoint() : null;
if (metricsEndpoint != null && metricsEndpoint.length() != 0) {
str = metricsEndpoint;
}
return str == null ? Constants.DEFAULT_METRICS_ENDPOINT : str;
}
public final String getErrorLoggingEndpoint() {
ConfigPayload.Endpoints endpoints2 = endpoints;
String str = null;
String errorLogsEndpoint = endpoints2 != null ? endpoints2.getErrorLogsEndpoint() : null;
if (errorLogsEndpoint != null && errorLogsEndpoint.length() != 0) {
str = errorLogsEndpoint;
}
return str == null ? Constants.DEFAULT_ERROR_LOGS_ENDPOINT : str;
}
public final boolean getMetricsEnabled() {
ConfigPayload.LogMetricsSettings logMetricsSettings;
Boolean metricsEnabled;
ConfigPayload configPayload = config;
if (configPayload == null || (logMetricsSettings = configPayload.getLogMetricsSettings()) == null || (metricsEnabled = logMetricsSettings.getMetricsEnabled()) == null) {
return false;
}
return metricsEnabled.booleanValue();
}
public final int getLogLevel() {
ConfigPayload.LogMetricsSettings logMetricsSettings;
Integer errorLogLevel;
ConfigPayload configPayload = config;
return (configPayload == null || (logMetricsSettings = configPayload.getLogMetricsSettings()) == null || (errorLogLevel = logMetricsSettings.getErrorLogLevel()) == null) ? AnalyticsClient.LogLevel.ERROR_LOG_LEVEL_ERROR.getLevel() : errorLogLevel.intValue();
}
public final long getSessionTimeout() {
Integer sessionTimeout;
ConfigPayload configPayload = config;
return ((configPayload == null || (sessionTimeout = configPayload.getSessionTimeout()) == null) ? DEFAULT_SESSION_TIMEOUT_SECONDS : sessionTimeout.intValue()) * 1000;
}
public final long getSignalsSessionTimeout() {
Integer signalSessionTimeout;
ConfigPayload configPayload = config;
return ((configPayload == null || (signalSessionTimeout = configPayload.getSignalSessionTimeout()) == null) ? DEFAULT_SIGNALS_SESSION_TIMEOUT_SECONDS : signalSessionTimeout.intValue()) * 1000;
}
public final boolean rtaDebuggingEnabled() {
Boolean rtaDebugging;
ConfigPayload configPayload = config;
if (configPayload == null || (rtaDebugging = configPayload.getRtaDebugging()) == null) {
return false;
}
return rtaDebugging.booleanValue();
}
public final boolean isCacheableAssetsRequired() {
Boolean isCacheableAssetsRequired;
ConfigPayload configPayload = config;
if (configPayload == null || (isCacheableAssetsRequired = configPayload.isCacheableAssetsRequired()) == null) {
return false;
}
return isCacheableAssetsRequired.booleanValue();
}
public final boolean signalsDisabled() {
Boolean signalsDisabled;
ConfigPayload configPayload = config;
if (configPayload == null || (signalsDisabled = configPayload.getSignalsDisabled()) == null) {
return false;
}
return signalsDisabled.booleanValue();
}
public final boolean fpdEnabled() {
Boolean fpdEnabled;
ConfigPayload configPayload = config;
if (configPayload == null || (fpdEnabled = configPayload.getFpdEnabled()) == null) {
return true;
}
return fpdEnabled.booleanValue();
}
@VisibleForTesting
public final int checkConfigPayload$vungle_ads_release(ConfigPayload configPayload) {
if (configPayload == null || configPayload.getConfigLastValidatedTimestamp() == null) {
return 0;
}
Long configLastValidatedTimestamp = configPayload.getConfigLastValidatedTimestamp();
if (configLastValidatedTimestamp != null && configLastValidatedTimestamp.longValue() == -1) {
return 0;
}
return configPayload.getEndpoints() == null ? 1 : 2;
}
@VisibleForTesting
public final boolean validateConfig$vungle_ads_release(ConfigPayload configPayload) {
return ((configPayload != null ? configPayload.getEndpoints() : null) == null || !validateEndpoints$vungle_ads_release(configPayload.getEndpoints()) || configPayload.getPlacements() == null) ? false : true;
}
public static /* synthetic */ boolean validateEndpoints$vungle_ads_release$default(ConfigManager configManager, ConfigPayload.Endpoints endpoints2, int i, Object obj) {
if ((i & 1) != 0) {
endpoints2 = endpoints;
}
return configManager.validateEndpoints$vungle_ads_release(endpoints2);
}
@VisibleForTesting
public final boolean validateEndpoints$vungle_ads_release(ConfigPayload.Endpoints endpoints2) {
boolean z;
String adsEndpoint = endpoints2 != null ? endpoints2.getAdsEndpoint() : null;
boolean z2 = false;
if (adsEndpoint == null || adsEndpoint.length() == 0) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(122, "The ads endpoint was not provided in the config.", (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
z = false;
} else {
z = true;
}
String riEndpoint = endpoints2 != null ? endpoints2.getRiEndpoint() : null;
if (riEndpoint == null || riEndpoint.length() == 0) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(123, "The ri endpoint was not provided in the config.", (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
}
String mraidEndpoint = endpoints2 != null ? endpoints2.getMraidEndpoint() : null;
if (mraidEndpoint == null || mraidEndpoint.length() == 0) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(130, "The mraid endpoint was not provided in the config.", (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
} else {
z2 = z;
}
String metricsEndpoint = endpoints2 != null ? endpoints2.getMetricsEndpoint() : null;
if (metricsEndpoint == null || metricsEndpoint.length() == 0) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(125, "The metrics endpoint was not provided in the config.", (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
}
String errorLogsEndpoint = endpoints2 != null ? endpoints2.getErrorLogsEndpoint() : null;
if (errorLogsEndpoint == null || errorLogsEndpoint.length() == 0) {
Logger.Companion.e(TAG, "The error logging endpoint was not provided in the config.");
}
return z2;
}
public final boolean isCleverCacheEnabled() {
ConfigPayload.CleverCache cleverCache;
Boolean enabled;
ConfigPayload configPayload = config;
if (configPayload == null || (cleverCache = configPayload.getCleverCache()) == null || (enabled = cleverCache.getEnabled()) == null) {
return false;
}
return enabled.booleanValue();
}
public final long getCleverCacheDiskSize() {
ConfigPayload.CleverCache cleverCache;
Long diskSize;
ConfigPayload configPayload = config;
if (configPayload == null || (cleverCache = configPayload.getCleverCache()) == null || (diskSize = cleverCache.getDiskSize()) == null) {
return 1048576000L;
}
long j = 1024;
return diskSize.longValue() * j * j;
}
public final int getCleverCacheDiskPercentage() {
ConfigPayload.CleverCache cleverCache;
Integer diskPercentage;
ConfigPayload configPayload = config;
if (configPayload == null || (cleverCache = configPayload.getCleverCache()) == null || (diskPercentage = cleverCache.getDiskPercentage()) == null) {
return 3;
}
return diskPercentage.intValue();
}
public final ConfigPayload getCachedConfig(FilePreferences filePreferences, String appId) {
boolean equals;
Long refreshTime;
Intrinsics.checkNotNullParameter(filePreferences, "filePreferences");
Intrinsics.checkNotNullParameter(appId, "appId");
try {
String string = filePreferences.getString(Cookie.CONFIG_APP_ID);
if (string != null && string.length() != 0) {
equals = StringsKt__StringsJVMKt.equals(string, appId, true);
if (equals) {
String string2 = filePreferences.getString(Cookie.CONFIG_RESPONSE);
if (string2 == null) {
return null;
}
long j = filePreferences.getLong(Cookie.CONFIG_UPDATE_TIME, 0L);
StringFormat stringFormat = json;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(ConfigPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
ConfigPayload configPayload = (ConfigPayload) stringFormat.decodeFromString(serializer, string2);
ConfigPayload.ConfigSettings configSettings = configPayload.getConfigSettings();
if (((configSettings == null || (refreshTime = configSettings.getRefreshTime()) == null) ? -1L : refreshTime.longValue()) + j < System.currentTimeMillis()) {
Logger.Companion.w(TAG, "cache config expired. re-config");
return null;
}
Logger.Companion.w(TAG, "use cache config.");
return configPayload;
}
}
Logger.Companion.w(TAG, "app id mismatch, re-config");
return null;
} catch (Exception e) {
Logger.Companion.e(TAG, "Error while parsing cached config: " + e.getMessage());
return null;
}
}
public final void updateCachedConfig(ConfigPayload config2, FilePreferences filePreferences) {
Intrinsics.checkNotNullParameter(config2, "config");
Intrinsics.checkNotNullParameter(filePreferences, "filePreferences");
try {
String str = applicationId;
if (str == null) {
Intrinsics.throwUninitializedPropertyAccessException("applicationId");
str = null;
}
filePreferences.put(Cookie.CONFIG_APP_ID, str);
filePreferences.put(Cookie.CONFIG_UPDATE_TIME, System.currentTimeMillis());
StringFormat stringFormat = json;
SerializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(ConfigPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
filePreferences.put(Cookie.CONFIG_RESPONSE, stringFormat.encodeToString(serializer, config2));
filePreferences.apply();
} catch (Exception e) {
Logger.Companion.e(TAG, "Exception: " + e.getMessage() + " for updating cached config");
}
}
}

View File

@@ -0,0 +1,39 @@
package com.vungle.ads.internal;
/* loaded from: classes4.dex */
public final class Constants {
public static final String AD_CLOSE_TPAT_KEY = "ad.close";
public static final String AD_DURATION_KEY = "{{{dur}}}";
public static final String AD_INDEX_FILE_NAME = "index.html";
public static final String AD_LOAD_DURATION_KEY = "{{{time_dl}}}";
public static final String AD_LOAD_DURATION_TPAT_KEY = "ad.loadDuration";
public static final String AD_MRAID_JS_FILE_NAME = "mraid.js";
public static final String CHECKPOINT_0 = "checkpoint.0";
public static final String DEEPLINK_CLICK = "deeplink.click";
public static final String DEEPLINK_SUCCESS_KEY = "{{{is_success}}}";
public static final String DEVICE_VOLUME_KEY = "{{{vol}}}";
public static final String KEY_MAIN_VIDEO = "MAIN_VIDEO";
public static final String MRAID_JS_FILE_NAME = "mraid.min.js";
public static final String NETWORK_OPERATOR_KEY = "{{{carrier}}}";
public static final String PLACEMENT_TYPE_APP_OPEN = "appopen";
public static final String PLACEMENT_TYPE_BANNER = "banner";
public static final String PLACEMENT_TYPE_INTERSTITIAL = "interstitial";
public static final String PLACEMENT_TYPE_IN_LINE = "in_line";
public static final String PLACEMENT_TYPE_MREC = "mrec";
public static final String PLACEMENT_TYPE_NATIVE = "native";
public static final String PLACEMENT_TYPE_REWARDED = "rewarded";
public static final String REMOTE_PLAY_KEY = "{{{remote_play}}}";
public static final String SESSION_ID = "{{{session_id}}}";
public static final String TEMPLATE_TYPE_BANNER = "banner";
public static final String TEMPLATE_TYPE_FULLSCREEN = "fullscreen";
public static final String TEMPLATE_TYPE_IN_LINE = "in_line";
public static final String TEMPLATE_TYPE_MREC = "mrec";
public static final String TEMPLATE_TYPE_NATIVE = "native";
public static final Constants INSTANCE = new Constants();
public static final String DEFAULT_ADS_ENDPOINT = "https://adx.ads.vungle.com/api/ads";
public static final String DEFAULT_ERROR_LOGS_ENDPOINT = "https://events.ads.vungle.com/sdk/error_logs";
public static final String DEFAULT_METRICS_ENDPOINT = "https://events.ads.vungle.com/sdk/metrics";
private Constants() {
}
}

View File

@@ -0,0 +1,272 @@
package com.vungle.ads.internal;
import android.R;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.os.Handler;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import androidx.annotation.VisibleForTesting;
import androidx.core.view.ViewCompat;
import com.vungle.ads.internal.util.Logger;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.WeakHashMap;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class ImpressionTracker {
private static final int MIN_VISIBILITY_PERCENTAGE = 1;
private static final int VISIBILITY_THROTTLE_MILLIS = 100;
private final Rect clipRect;
private boolean isVisibilityScheduled;
private final ViewTreeObserver.OnPreDrawListener onPreDrawListener;
private boolean setViewTreeObserverSucceed;
private final Map<View, TrackingInfo> trackedViews;
private final Handler visibilityHandler;
private final VisibilityRunnable visibilityRunnable;
private WeakReference<ViewTreeObserver> weakViewTreeObserver;
public static final Companion Companion = new Companion(null);
private static final String TAG = ImpressionTracker.class.getSimpleName();
public interface ImpressionListener {
void onImpression(View view);
}
@VisibleForTesting
public static final class TrackingInfo {
private ImpressionListener impressionListener;
private int minViewablePercent;
public final ImpressionListener getImpressionListener() {
return this.impressionListener;
}
public final int getMinViewablePercent() {
return this.minViewablePercent;
}
public final void setImpressionListener(ImpressionListener impressionListener) {
this.impressionListener = impressionListener;
}
public final void setMinViewablePercent(int i) {
this.minViewablePercent = i;
}
}
@VisibleForTesting
public static /* synthetic */ void getOnPreDrawListener$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getWeakViewTreeObserver$annotations() {
}
public final ViewTreeObserver.OnPreDrawListener getOnPreDrawListener() {
return this.onPreDrawListener;
}
public final WeakReference<ViewTreeObserver> getWeakViewTreeObserver() {
return this.weakViewTreeObserver;
}
public final void setWeakViewTreeObserver(WeakReference<ViewTreeObserver> weakReference) {
Intrinsics.checkNotNullParameter(weakReference, "<set-?>");
this.weakViewTreeObserver = weakReference;
}
@VisibleForTesting
public ImpressionTracker(Context context, Map<View, TrackingInfo> trackedViews, Handler visibilityHandler) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(trackedViews, "trackedViews");
Intrinsics.checkNotNullParameter(visibilityHandler, "visibilityHandler");
this.trackedViews = trackedViews;
this.visibilityHandler = visibilityHandler;
this.clipRect = new Rect();
this.visibilityRunnable = new VisibilityRunnable();
this.onPreDrawListener = new ViewTreeObserver.OnPreDrawListener() { // from class: com.vungle.ads.internal.ImpressionTracker$$ExternalSyntheticLambda0
@Override // android.view.ViewTreeObserver.OnPreDrawListener
public final boolean onPreDraw() {
boolean m3859_init_$lambda0;
m3859_init_$lambda0 = ImpressionTracker.m3859_init_$lambda0(ImpressionTracker.this);
return m3859_init_$lambda0;
}
};
this.weakViewTreeObserver = new WeakReference<>(null);
this.setViewTreeObserverSucceed = setViewTreeObserver(context, null);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public ImpressionTracker(Context context) {
this(context, new WeakHashMap(10), new Handler());
Intrinsics.checkNotNullParameter(context, "context");
}
private final boolean setViewTreeObserver(Context context, View view) {
ViewTreeObserver viewTreeObserver = this.weakViewTreeObserver.get();
if (viewTreeObserver != null && viewTreeObserver.isAlive()) {
return true;
}
View topView = getTopView(context, view);
if (topView == null) {
Logger.Companion companion = Logger.Companion;
String TAG2 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
companion.d(TAG2, "Unable to set ViewTreeObserver due to no available root view.");
return false;
}
ViewTreeObserver viewTreeObserver2 = topView.getViewTreeObserver();
if (!viewTreeObserver2.isAlive()) {
Logger.Companion companion2 = Logger.Companion;
String TAG3 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
companion2.d(TAG3, "The root view tree observer was not alive");
return false;
}
this.weakViewTreeObserver = new WeakReference<>(viewTreeObserver2);
viewTreeObserver2.addOnPreDrawListener(this.onPreDrawListener);
return true;
}
public final void addView(View view, ImpressionListener impressionListener) {
Intrinsics.checkNotNullParameter(view, "view");
this.setViewTreeObserverSucceed = setViewTreeObserver(view.getContext(), view);
TrackingInfo trackingInfo = this.trackedViews.get(view);
if (trackingInfo == null) {
trackingInfo = new TrackingInfo();
this.trackedViews.put(view, trackingInfo);
scheduleVisibilityCheck();
}
trackingInfo.setMinViewablePercent(1);
trackingInfo.setImpressionListener(impressionListener);
}
@VisibleForTesting
public final void removeView(View view) {
Intrinsics.checkNotNullParameter(view, "view");
this.trackedViews.remove(view);
}
public final void clear() {
this.trackedViews.clear();
this.visibilityHandler.removeMessages(0);
this.isVisibilityScheduled = false;
}
public final void destroy() {
clear();
ViewTreeObserver viewTreeObserver = this.weakViewTreeObserver.get();
if (viewTreeObserver != null && viewTreeObserver.isAlive()) {
viewTreeObserver.removeOnPreDrawListener(this.onPreDrawListener);
}
this.weakViewTreeObserver.clear();
}
private final View getTopView(Context context, View view) {
View findViewById = context instanceof Activity ? ((Activity) context).getWindow().getDecorView().findViewById(R.id.content) : null;
if (findViewById != null || view == null) {
return findViewById;
}
if (!ViewCompat.isAttachedToWindow(view)) {
Logger.Companion companion = Logger.Companion;
String TAG2 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
companion.w(TAG2, "Trying to call View#rootView() on an unattached View.");
}
View rootView = view.getRootView();
if (rootView != null) {
findViewById = rootView.findViewById(R.id.content);
}
return findViewById == null ? rootView : findViewById;
}
/* JADX INFO: Access modifiers changed from: private */
public final void scheduleVisibilityCheck() {
if (this.isVisibilityScheduled) {
return;
}
this.isVisibilityScheduled = true;
this.visibilityHandler.postDelayed(this.visibilityRunnable, 100L);
}
@VisibleForTesting
public final class VisibilityRunnable implements Runnable {
private final ArrayList<View> visibleViews = new ArrayList<>();
public VisibilityRunnable() {
}
@Override // java.lang.Runnable
public void run() {
ImpressionListener impressionListener;
ImpressionTracker.this.isVisibilityScheduled = false;
for (Map.Entry entry : ImpressionTracker.this.trackedViews.entrySet()) {
View view = (View) entry.getKey();
if (ImpressionTracker.this.isVisible(view, ((TrackingInfo) entry.getValue()).getMinViewablePercent())) {
this.visibleViews.add(view);
}
}
Iterator<View> it = this.visibleViews.iterator();
while (it.hasNext()) {
View view2 = it.next();
TrackingInfo trackingInfo = (TrackingInfo) ImpressionTracker.this.trackedViews.get(view2);
if (trackingInfo != null && (impressionListener = trackingInfo.getImpressionListener()) != null) {
impressionListener.onImpression(view2);
}
ImpressionTracker impressionTracker = ImpressionTracker.this;
Intrinsics.checkNotNullExpressionValue(view2, "view");
impressionTracker.removeView(view2);
}
this.visibleViews.clear();
if (!(!ImpressionTracker.this.trackedViews.isEmpty()) || ImpressionTracker.this.setViewTreeObserverSucceed) {
return;
}
ImpressionTracker.this.scheduleVisibilityCheck();
}
}
/* JADX INFO: Access modifiers changed from: private */
public final boolean isVisible(View view, int i) {
if (view == null || view.getVisibility() != 0 || view.getParent() == null) {
return false;
}
ViewParent parent = view.getParent();
while (parent instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) parent;
if (viewGroup.getVisibility() != 0) {
Logger.Companion.w("ImpressionTracker", "Parent visibility is not visible: " + parent);
return false;
}
parent = viewGroup.getParent();
}
if (!view.getGlobalVisibleRect(this.clipRect)) {
return false;
}
long height = view.getHeight() * view.getWidth();
return height > 0 && ((long) 100) * (this.clipRect.height() * this.clipRect.width()) >= ((long) i) * height;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: _init_$lambda-0, reason: not valid java name */
public static final boolean m3859_init_$lambda0(ImpressionTracker this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.scheduleVisibilityCheck();
return true;
}
}

View File

@@ -0,0 +1,432 @@
package com.vungle.ads.internal;
import android.content.Context;
import androidx.annotation.VisibleForTesting;
import androidx.core.content.PermissionChecker;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.InitializationListener;
import com.vungle.ads.InvalidAppId;
import com.vungle.ads.NetworkPermissionsNotGranted;
import com.vungle.ads.OutOfMemory;
import com.vungle.ads.SdkVersionTooLow;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.load.MraidJsLoader;
import com.vungle.ads.internal.model.ConfigPayload;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.persistence.FilePreferences;
import com.vungle.ads.internal.platform.Platform;
import com.vungle.ads.internal.privacy.PrivacyManager;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.task.CleanupJob;
import com.vungle.ads.internal.task.JobRunner;
import com.vungle.ads.internal.task.ResendTpatJob;
import com.vungle.ads.internal.util.ActivityManager;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import com.vungle.ads.internal.util.ThreadUtil;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
/* loaded from: classes4.dex */
public final class VungleInitializer {
public static final Companion Companion = new Companion(null);
private static final String TAG = "VungleInitializer";
private AtomicBoolean isInitialized = new AtomicBoolean(false);
private final CopyOnWriteArrayList<InitializationListener> initializationCallbackArray = new CopyOnWriteArrayList<>();
@VisibleForTesting
public static /* synthetic */ void isInitialized$vungle_ads_release$annotations() {
}
public final AtomicBoolean isInitialized$vungle_ads_release() {
return this.isInitialized;
}
public final void setInitialized$vungle_ads_release(AtomicBoolean atomicBoolean) {
Intrinsics.checkNotNullParameter(atomicBoolean, "<set-?>");
this.isInitialized = atomicBoolean;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public final void init(final String appId, final Context context, final InitializationListener initializationCallback) {
Lazy lazy;
Lazy lazy2;
final Lazy lazy3;
Intrinsics.checkNotNullParameter(appId, "appId");
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(initializationCallback, "initializationCallback");
this.initializationCallbackArray.add(initializationCallback);
ActivityManager.Companion.init(context);
if (isAppIdInvalid(appId)) {
onInitError(new InvalidAppId().logError$vungle_ads_release());
return;
}
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$init$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.platform.Platform, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Platform invoke() {
return ServiceLocator.Companion.getInstance(context).getService(Platform.class);
}
});
if (!m3868init$lambda0(lazy).isAtLeastMinimumSDK()) {
Logger.Companion.e(TAG, "SDK is supported only for API versions 21 and above");
onInitError(new SdkVersionTooLow().logError$vungle_ads_release());
return;
}
ConfigManager.INSTANCE.setAppId$vungle_ads_release(appId);
if (this.isInitialized.get()) {
Logger.Companion.d(TAG, "init already complete");
onInitSuccess();
} else if (PermissionChecker.checkCallingOrSelfPermission(context, "android.permission.ACCESS_NETWORK_STATE") != 0 || PermissionChecker.checkCallingOrSelfPermission(context, "android.permission.INTERNET") != 0) {
Logger.Companion.e(TAG, "Network permissions not granted");
onInitError(new NetworkPermissionsNotGranted());
} else {
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$init$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.Executors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Executors invoke() {
return ServiceLocator.Companion.getInstance(context).getService(Executors.class);
}
});
lazy3 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$init$$inlined$inject$3
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
m3869init$lambda1(lazy2).getBackgroundExecutor().execute(new Runnable() { // from class: com.vungle.ads.internal.VungleInitializer$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
VungleInitializer.m3871init$lambda3(context, appId, this, initializationCallback, lazy3);
}
}, new Runnable() { // from class: com.vungle.ads.internal.VungleInitializer$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
VungleInitializer.m3872init$lambda4(VungleInitializer.this);
}
});
}
}
/* renamed from: init$lambda-0, reason: not valid java name */
private static final Platform m3868init$lambda0(Lazy lazy) {
return (Platform) lazy.getValue();
}
/* renamed from: init$lambda-1, reason: not valid java name */
private static final Executors m3869init$lambda1(Lazy lazy) {
return (Executors) lazy.getValue();
}
/* renamed from: init$lambda-2, reason: not valid java name */
private static final VungleApiClient m3870init$lambda2(Lazy lazy) {
return (VungleApiClient) lazy.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: init$lambda-3, reason: not valid java name */
public static final void m3871init$lambda3(Context context, String appId, VungleInitializer this$0, InitializationListener initializationCallback, Lazy vungleApiClient$delegate) {
Intrinsics.checkNotNullParameter(context, "$context");
Intrinsics.checkNotNullParameter(appId, "$appId");
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(initializationCallback, "$initializationCallback");
Intrinsics.checkNotNullParameter(vungleApiClient$delegate, "$vungleApiClient$delegate");
PrivacyManager.INSTANCE.init(context);
m3870init$lambda2(vungleApiClient$delegate).initialize(appId);
this$0.configure(context, appId, initializationCallback);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: init$lambda-4, reason: not valid java name */
public static final void m3872init$lambda4(VungleInitializer this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.onInitError(new OutOfMemory("Config: Out of Memory").logError$vungle_ads_release());
}
private final boolean isAppIdInvalid(String str) {
return StringsKt__StringsJVMKt.isBlank(str);
}
private final void configure(final Context context, String str, InitializationListener initializationListener) {
Lazy lazy;
Lazy lazy2;
boolean z;
final Lazy lazy3;
Lazy lazy4;
Lazy lazy5;
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
try {
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.persistence.FilePreferences, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final FilePreferences invoke() {
return ServiceLocator.Companion.getInstance(context).getService(FilePreferences.class);
}
});
ConfigManager configManager = ConfigManager.INSTANCE;
ConfigPayload cachedConfig = configManager.getCachedConfig(m3864configure$lambda6(lazy2), str);
if (cachedConfig != null) {
ConfigManager.initWithConfig$vungle_ads_release$default(configManager, context, cachedConfig, true, null, 8, null);
z = true;
} else {
z = false;
}
lazy3 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$$inlined$inject$3
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.Executors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Executors invoke() {
return ServiceLocator.Companion.getInstance(context).getService(Executors.class);
}
});
lazy4 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$$inlined$inject$4
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.signals.SignalManager, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SignalManager.class);
}
});
AnalyticsClient.INSTANCE.init$vungle_ads_release(m3863configure$lambda5(lazy), m3865configure$lambda7(lazy3).getLoggerExecutor(), configManager.getLogLevel(), configManager.getMetricsEnabled(), m3866configure$lambda8(lazy4));
try {
this.isInitialized.set(true);
onInitSuccess();
Logger.Companion.d(TAG, "Running cleanup and resend tpat jobs. " + Thread.currentThread().getId());
lazy5 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$$inlined$inject$5
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.task.JobRunner, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final JobRunner invoke() {
return ServiceLocator.Companion.getInstance(context).getService(JobRunner.class);
}
});
m3867configure$lambda9(lazy5).execute(CleanupJob.Companion.makeJobInfo$default(CleanupJob.Companion, null, 1, null));
m3867configure$lambda9(lazy5).execute(ResendTpatJob.Companion.makeJobInfo());
if (z) {
return;
}
configManager.fetchConfigAsync$vungle_ads_release(context, new Function1() { // from class: com.vungle.ads.internal.VungleInitializer$configure$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke(((Boolean) obj).booleanValue());
return Unit.INSTANCE;
}
/* renamed from: invoke$lambda-0, reason: not valid java name */
private static final PathProvider m3875invoke$lambda0(Lazy lazy6) {
return (PathProvider) lazy6.getValue();
}
public final void invoke(boolean z2) {
Lazy lazy6;
Lazy lazy7;
Executors m3865configure$lambda7;
if (z2) {
ServiceLocator.Companion companion2 = ServiceLocator.Companion;
final Context context2 = context;
LazyThreadSafetyMode lazyThreadSafetyMode2 = LazyThreadSafetyMode.SYNCHRONIZED;
lazy6 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode2, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$1$invoke$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.util.PathProvider, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final PathProvider invoke() {
return ServiceLocator.Companion.getInstance(context2).getService(PathProvider.class);
}
});
final Context context3 = context;
lazy7 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode2, new Function0() { // from class: com.vungle.ads.internal.VungleInitializer$configure$1$invoke$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.downloader.Downloader, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Downloader invoke() {
return ServiceLocator.Companion.getInstance(context3).getService(Downloader.class);
}
});
MraidJsLoader mraidJsLoader = MraidJsLoader.INSTANCE;
PathProvider m3875invoke$lambda0 = m3875invoke$lambda0(lazy6);
Downloader m3876invoke$lambda1 = m3876invoke$lambda1(lazy7);
m3865configure$lambda7 = VungleInitializer.m3865configure$lambda7(lazy3);
MraidJsLoader.downloadJs$default(mraidJsLoader, m3875invoke$lambda0, m3876invoke$lambda1, m3865configure$lambda7.getBackgroundExecutor(), null, 8, null);
}
}
/* renamed from: invoke$lambda-1, reason: not valid java name */
private static final Downloader m3876invoke$lambda1(Lazy lazy6) {
return (Downloader) lazy6.getValue();
}
});
} catch (Throwable th) {
th = th;
Logger.Companion.e(TAG, "Cannot get config", th);
}
} catch (Throwable th2) {
th = th2;
}
}
/* renamed from: configure$lambda-5, reason: not valid java name */
private static final VungleApiClient m3863configure$lambda5(Lazy lazy) {
return (VungleApiClient) lazy.getValue();
}
/* renamed from: configure$lambda-6, reason: not valid java name */
private static final FilePreferences m3864configure$lambda6(Lazy lazy) {
return (FilePreferences) lazy.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: configure$lambda-7, reason: not valid java name */
public static final Executors m3865configure$lambda7(Lazy lazy) {
return (Executors) lazy.getValue();
}
/* renamed from: configure$lambda-8, reason: not valid java name */
private static final SignalManager m3866configure$lambda8(Lazy lazy) {
return (SignalManager) lazy.getValue();
}
/* renamed from: configure$lambda-9, reason: not valid java name */
private static final JobRunner m3867configure$lambda9(Lazy lazy) {
return (JobRunner) lazy.getValue();
}
private final void onInitError(final VungleError vungleError) {
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.VungleInitializer$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
VungleInitializer.m3873onInitError$lambda11(VungleInitializer.this, vungleError);
}
});
String localizedMessage = vungleError.getLocalizedMessage();
if (localizedMessage == null) {
localizedMessage = "Exception code is " + vungleError.getCode();
}
Logger.Companion.e(TAG, localizedMessage);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onInitError$lambda-11, reason: not valid java name */
public static final void m3873onInitError$lambda11(VungleInitializer this$0, VungleError exception) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(exception, "$exception");
Logger.Companion.e(TAG, "onError");
Iterator<T> it = this$0.initializationCallbackArray.iterator();
while (it.hasNext()) {
((InitializationListener) it.next()).onError(exception);
}
this$0.initializationCallbackArray.clear();
}
private final void onInitSuccess() {
Logger.Companion.d(TAG, "onSuccess " + Thread.currentThread().getId());
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.internal.VungleInitializer$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
VungleInitializer.m3874onInitSuccess$lambda13(VungleInitializer.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onInitSuccess$lambda-13, reason: not valid java name */
public static final void m3874onInitSuccess$lambda13(VungleInitializer this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Iterator<T> it = this$0.initializationCallbackArray.iterator();
while (it.hasNext()) {
((InitializationListener) it.next()).onSuccess();
}
this$0.initializationCallbackArray.clear();
}
public final boolean isInitialized() {
return this.isInitialized.get();
}
public final void deInit$vungle_ads_release() {
ServiceLocator.Companion.deInit();
VungleApiClient.Companion.reset$vungle_ads_release();
this.isInitialized.set(false);
}
}

View File

@@ -0,0 +1,106 @@
package com.vungle.ads.internal;
import android.content.Context;
import com.vungle.ads.BuildConfig;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.VungleAds;
import com.vungle.ads.internal.bidding.BidTokenEncoder;
import com.vungle.ads.internal.executor.FutureResult;
import com.vungle.ads.internal.executor.SDKExecutors;
import com.vungle.ads.internal.privacy.PrivacyManager;
import com.vungle.ads.internal.util.ConcurrencyTimeoutProvider;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class VungleInternal {
public final String getSdkVersion() {
return BuildConfig.VERSION_NAME;
}
public final String getAvailableBidTokens(final Context context) {
Lazy lazy;
Lazy lazy2;
final Lazy lazy3;
Intrinsics.checkNotNullParameter(context, "context");
if (!VungleAds.Companion.isInitialized()) {
PrivacyManager privacyManager = PrivacyManager.INSTANCE;
Context applicationContext = context.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "context.applicationContext");
privacyManager.init(applicationContext);
}
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInternal$getAvailableBidTokens$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.util.ConcurrencyTimeoutProvider, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final ConcurrencyTimeoutProvider invoke() {
return ServiceLocator.Companion.getInstance(context).getService(ConcurrencyTimeoutProvider.class);
}
});
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInternal$getAvailableBidTokens$$inlined$inject$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.executor.SDKExecutors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SDKExecutors invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SDKExecutors.class);
}
});
lazy3 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.internal.VungleInternal$getAvailableBidTokens$$inlined$inject$3
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.bidding.BidTokenEncoder, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final BidTokenEncoder invoke() {
return ServiceLocator.Companion.getInstance(context).getService(BidTokenEncoder.class);
}
});
return (String) new FutureResult(m3878getAvailableBidTokens$lambda1(lazy2).getApiExecutor().submit(new Callable() { // from class: com.vungle.ads.internal.VungleInternal$$ExternalSyntheticLambda0
@Override // java.util.concurrent.Callable
public final Object call() {
String m3880getAvailableBidTokens$lambda3;
m3880getAvailableBidTokens$lambda3 = VungleInternal.m3880getAvailableBidTokens$lambda3(Lazy.this);
return m3880getAvailableBidTokens$lambda3;
}
})).get(m3877getAvailableBidTokens$lambda0(lazy).getTimeout(), TimeUnit.MILLISECONDS);
}
/* renamed from: getAvailableBidTokens$lambda-0, reason: not valid java name */
private static final ConcurrencyTimeoutProvider m3877getAvailableBidTokens$lambda0(Lazy lazy) {
return (ConcurrencyTimeoutProvider) lazy.getValue();
}
/* renamed from: getAvailableBidTokens$lambda-1, reason: not valid java name */
private static final SDKExecutors m3878getAvailableBidTokens$lambda1(Lazy lazy) {
return (SDKExecutors) lazy.getValue();
}
/* renamed from: getAvailableBidTokens$lambda-2, reason: not valid java name */
private static final BidTokenEncoder m3879getAvailableBidTokens$lambda2(Lazy lazy) {
return (BidTokenEncoder) lazy.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getAvailableBidTokens$lambda-3, reason: not valid java name */
public static final String m3880getAvailableBidTokens$lambda3(Lazy bidTokenEncoder$delegate) {
Intrinsics.checkNotNullParameter(bidTokenEncoder$delegate, "$bidTokenEncoder$delegate");
return m3879getAvailableBidTokens$lambda2(bidTokenEncoder$delegate).encode();
}
}

View File

@@ -0,0 +1,173 @@
package com.vungle.ads.internal.bidding;
import android.content.Context;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.model.CommonRequestBody;
import com.vungle.ads.internal.model.RtbRequest;
import com.vungle.ads.internal.model.RtbToken;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.util.ActivityManager;
import com.vungle.ads.internal.util.InputOutputUtils;
import com.vungle.ads.internal.util.Logger;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.serialization.SerializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
/* loaded from: classes4.dex */
public final class BidTokenEncoder {
public static final Companion Companion = new Companion(null);
public static final int TOKEN_VERSION = 6;
private final Context context;
private long enterBackgroundTime;
private final Json json;
private int ordinalView;
@VisibleForTesting(otherwise = 2)
public static /* synthetic */ void getEnterBackgroundTime$vungle_ads_release$annotations() {
}
private static /* synthetic */ void getJson$annotations() {
}
@VisibleForTesting(otherwise = 2)
public static /* synthetic */ void getOrdinalView$vungle_ads_release$annotations() {
}
public final long getEnterBackgroundTime$vungle_ads_release() {
return this.enterBackgroundTime;
}
public final int getOrdinalView$vungle_ads_release() {
return this.ordinalView;
}
public final void setEnterBackgroundTime$vungle_ads_release(long j) {
this.enterBackgroundTime = j;
}
public final void setOrdinalView$vungle_ads_release(int i) {
this.ordinalView = i;
}
public BidTokenEncoder(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.context = context;
this.json = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.bidding.BidTokenEncoder$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
ActivityManager.Companion.addLifecycleListener(new ActivityManager.LifeCycleCallback() { // from class: com.vungle.ads.internal.bidding.BidTokenEncoder.1
@Override // com.vungle.ads.internal.util.ActivityManager.LifeCycleCallback
public void onResume() {
super.onResume();
BidTokenEncoder.this.onResume$vungle_ads_release();
}
@Override // com.vungle.ads.internal.util.ActivityManager.LifeCycleCallback
public void onPause() {
super.onPause();
BidTokenEncoder.this.onPause$vungle_ads_release();
}
});
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@VisibleForTesting(otherwise = 2)
public final void onResume$vungle_ads_release() {
if (this.enterBackgroundTime == 0) {
Logger.Companion.d("BidTokenEncoder", "BidTokenEncoder#onResume skipped");
return;
}
if (System.currentTimeMillis() > this.enterBackgroundTime + ConfigManager.INSTANCE.getSessionTimeout()) {
this.ordinalView = 0;
this.enterBackgroundTime = 0L;
}
}
@VisibleForTesting(otherwise = 2)
public final void onPause$vungle_ads_release() {
this.enterBackgroundTime = System.currentTimeMillis();
}
public final String encode() {
this.ordinalView++;
return generateBidToken();
}
private final String generateBidToken() {
try {
String constructV6Token$vungle_ads_release = constructV6Token$vungle_ads_release();
Logger.Companion companion = Logger.Companion;
companion.d("BidTokenEncoder", "BidToken: " + constructV6Token$vungle_ads_release);
String convertForSending = InputOutputUtils.INSTANCE.convertForSending(constructV6Token$vungle_ads_release);
companion.d("BidTokenEncoder", "After conversion: 6:" + convertForSending);
return "6:" + convertForSending;
} catch (Exception e) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(116, "Fail to gzip bidtoken " + e.getLocalizedMessage(), (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
return null;
}
}
/* renamed from: constructV6Token$lambda-0, reason: not valid java name */
private static final VungleApiClient m3881constructV6Token$lambda0(Lazy lazy) {
return (VungleApiClient) lazy.getValue();
}
@VisibleForTesting
public final String constructV6Token$vungle_ads_release() {
Lazy lazy;
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.bidding.BidTokenEncoder$constructV6Token$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
CommonRequestBody requestBody = m3881constructV6Token$lambda0(lazy).requestBody(!r1.signalsDisabled(), ConfigManager.INSTANCE.fpdEnabled());
RtbToken rtbToken = new RtbToken(requestBody.getDevice(), requestBody.getUser(), requestBody.getExt(), new RtbRequest(VungleApiClient.Companion.getHeaderUa()), this.ordinalView);
StringFormat stringFormat = this.json;
SerializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(RtbToken.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
return stringFormat.encodeToString(serializer, rtbToken);
}
}

View File

@@ -0,0 +1,6 @@
package com.vungle.ads.internal.bidding;
/* loaded from: classes4.dex */
public final class BidTokenEncoderKt {
private static final String TAG = "BidTokenEncoder";
}

View File

@@ -0,0 +1,266 @@
package com.vungle.ads.internal.downloader;
import java.io.File;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public interface AssetDownloadListener {
void onError(DownloadError downloadError, DownloadRequest downloadRequest);
void onSuccess(File file, DownloadRequest downloadRequest);
public static final class DownloadError {
public static final Companion Companion = new Companion(null);
public static final int DEFAULT_SERVER_CODE = -1;
private final Throwable cause;
@ErrorReason
private final int reason;
private final int serverCode;
public final Throwable getCause() {
return this.cause;
}
public final int getReason() {
return this.reason;
}
public final int getServerCode() {
return this.serverCode;
}
public DownloadError(int i, Throwable cause, int i2) {
Intrinsics.checkNotNullParameter(cause, "cause");
this.serverCode = i;
this.cause = cause;
this.reason = i2;
}
@Retention(RetentionPolicy.RUNTIME)
public @interface ErrorReason {
public static final Companion Companion = Companion.$$INSTANCE;
public static final class Companion {
private static int CONNECTION_ERROR;
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static int REQUEST_ERROR = 1;
private static int DISK_ERROR = 2;
private static int FILE_NOT_FOUND_ERROR = 3;
private static int INTERNAL_ERROR = 4;
public final int getCONNECTION_ERROR() {
return CONNECTION_ERROR;
}
public final int getDISK_ERROR() {
return DISK_ERROR;
}
public final int getFILE_NOT_FOUND_ERROR() {
return FILE_NOT_FOUND_ERROR;
}
public final int getINTERNAL_ERROR() {
return INTERNAL_ERROR;
}
public final int getREQUEST_ERROR() {
return REQUEST_ERROR;
}
public final void setCONNECTION_ERROR(int i) {
CONNECTION_ERROR = i;
}
public final void setDISK_ERROR(int i) {
DISK_ERROR = i;
}
public final void setFILE_NOT_FOUND_ERROR(int i) {
FILE_NOT_FOUND_ERROR = i;
}
public final void setINTERNAL_ERROR(int i) {
INTERNAL_ERROR = i;
}
public final void setREQUEST_ERROR(int i) {
REQUEST_ERROR = i;
}
private Companion() {
}
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}
public static final class Progress {
public static final Companion Companion = new Companion(null);
private int progressPercent;
private long sizeBytes;
private long startBytes;
private int status;
private long timestampDownloadStart;
@ProgressStatus
public static /* synthetic */ void getStatus$annotations() {
}
public final int getProgressPercent() {
return this.progressPercent;
}
public final long getSizeBytes() {
return this.sizeBytes;
}
public final long getStartBytes() {
return this.startBytes;
}
public final int getStatus() {
return this.status;
}
public final long getTimestampDownloadStart() {
return this.timestampDownloadStart;
}
public final void setProgressPercent(int i) {
this.progressPercent = i;
}
public final void setSizeBytes(long j) {
this.sizeBytes = j;
}
public final void setStartBytes(long j) {
this.startBytes = j;
}
public final void setStatus(int i) {
this.status = i;
}
public final void setTimestampDownloadStart(long j) {
this.timestampDownloadStart = j;
}
@Retention(RetentionPolicy.RUNTIME)
public @interface ProgressStatus {
public static final Companion Companion = Companion.$$INSTANCE;
public static final class Companion {
private static int STARTED;
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static int IN_PROGRESS = 1;
private static int PAUSED = 2;
private static int CANCELLED = 3;
private static int DONE = 4;
private static int LOST_CONNECTION = 5;
private static int STATE_CHANGED = 6;
private static int ERROR = 7;
public final int getCANCELLED() {
return CANCELLED;
}
public final int getDONE() {
return DONE;
}
public final int getERROR() {
return ERROR;
}
public final int getIN_PROGRESS() {
return IN_PROGRESS;
}
public final int getLOST_CONNECTION() {
return LOST_CONNECTION;
}
public final int getPAUSED() {
return PAUSED;
}
public final int getSTARTED() {
return STARTED;
}
public final int getSTATE_CHANGED() {
return STATE_CHANGED;
}
public final void setCANCELLED(int i) {
CANCELLED = i;
}
public final void setDONE(int i) {
DONE = i;
}
public final void setERROR(int i) {
ERROR = i;
}
public final void setIN_PROGRESS(int i) {
IN_PROGRESS = i;
}
public final void setLOST_CONNECTION(int i) {
LOST_CONNECTION = i;
}
public final void setPAUSED(int i) {
PAUSED = i;
}
public final void setSTARTED(int i) {
STARTED = i;
}
public final void setSTATE_CHANGED(int i) {
STATE_CHANGED = i;
}
private Companion() {
}
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final Progress copy(Progress progress) {
Intrinsics.checkNotNullParameter(progress, "progress");
Progress progress2 = new Progress();
progress2.setStatus(progress.getStatus());
progress2.setProgressPercent(progress.getProgressPercent());
progress2.setTimestampDownloadStart(progress.getTimestampDownloadStart());
progress2.setSizeBytes(progress.getSizeBytes());
progress2.setStartBytes(progress.getStartBytes());
return progress2;
}
}
}
}

View File

@@ -0,0 +1,208 @@
package com.vungle.ads.internal.downloader;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.OutOfMemory;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.downloader.AssetDownloadListener;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.task.PriorityRunnable;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
import okhttp3.Cache;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okhttp3.internal.http.RealResponseBody;
import okio.GzipSource;
import okio.Okio;
/* loaded from: classes4.dex */
public final class AssetDownloader implements Downloader {
private static final String CONTENT_ENCODING = "Content-Encoding";
private static final String CONTENT_TYPE = "Content-Type";
public static final Companion Companion = new Companion(null);
private static final int DOWNLOAD_CHUNK_SIZE = 2048;
private static final String GZIP = "gzip";
private static final String IDENTITY = "identity";
private static final int MINIMUM_SPACE_REQUIRED_MB = 20971520;
private static final String TAG = "AssetDownloader";
private static final int TIMEOUT = 30;
private final VungleThreadPoolExecutor downloadExecutor;
private OkHttpClient okHttpClient;
private final PathProvider pathProvider;
private final List<DownloadRequest> transitioning;
public AssetDownloader(VungleThreadPoolExecutor downloadExecutor, PathProvider pathProvider) {
Intrinsics.checkNotNullParameter(downloadExecutor, "downloadExecutor");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
this.downloadExecutor = downloadExecutor;
this.pathProvider = pathProvider;
this.transitioning = new ArrayList();
OkHttpClient.Builder builder = new OkHttpClient.Builder();
TimeUnit timeUnit = TimeUnit.SECONDS;
OkHttpClient.Builder followSslRedirects = builder.readTimeout(30L, timeUnit).connectTimeout(30L, timeUnit).cache(null).followRedirects(true).followSslRedirects(true);
ConfigManager configManager = ConfigManager.INSTANCE;
if (configManager.isCleverCacheEnabled()) {
long cleverCacheDiskSize = configManager.getCleverCacheDiskSize();
int cleverCacheDiskPercentage = configManager.getCleverCacheDiskPercentage();
String absolutePath = pathProvider.getCleverCacheDir().getAbsolutePath();
Intrinsics.checkNotNullExpressionValue(absolutePath, "pathProvider.getCleverCacheDir().absolutePath");
long min = Long.min(cleverCacheDiskSize, (pathProvider.getAvailableBytes(absolutePath) * cleverCacheDiskPercentage) / 100);
if (min > 0) {
followSslRedirects.cache(new Cache(pathProvider.getCleverCacheDir(), min));
} else {
Logger.Companion.w(TAG, "cache disk capacity size <=0, no clever cache active.");
}
}
this.okHttpClient = followSslRedirects.build();
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@Override // com.vungle.ads.internal.downloader.Downloader
public void download(final DownloadRequest downloadRequest, final AssetDownloadListener assetDownloadListener) {
if (downloadRequest == null) {
return;
}
this.transitioning.add(downloadRequest);
this.downloadExecutor.execute(new PriorityRunnable() { // from class: com.vungle.ads.internal.downloader.AssetDownloader$download$1
@Override // java.lang.Runnable
public void run() {
AssetDownloader.this.launchRequest(downloadRequest, assetDownloadListener);
}
@Override // com.vungle.ads.internal.task.PriorityRunnable
public int getPriority() {
return downloadRequest.getPriority();
}
}, new Runnable() { // from class: com.vungle.ads.internal.downloader.AssetDownloader$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
AssetDownloader.m3883download$lambda0(AssetDownloader.this, downloadRequest, assetDownloadListener);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: download$lambda-0, reason: not valid java name */
public static final void m3883download$lambda0(AssetDownloader this$0, DownloadRequest downloadRequest, AssetDownloadListener assetDownloadListener) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
this$0.deliverError(downloadRequest, assetDownloadListener, new AssetDownloadListener.DownloadError(-1, new OutOfMemory("Cannot complete " + downloadRequest + " : Out of Memory"), AssetDownloadListener.DownloadError.ErrorReason.Companion.getINTERNAL_ERROR()));
}
private final void deliverError(DownloadRequest downloadRequest, AssetDownloadListener assetDownloadListener, AssetDownloadListener.DownloadError downloadError) {
if (assetDownloadListener != null) {
assetDownloadListener.onError(downloadError, downloadRequest);
}
}
@Override // com.vungle.ads.internal.downloader.Downloader
public void cancel(DownloadRequest downloadRequest) {
if (downloadRequest == null || downloadRequest.isCancelled()) {
return;
}
downloadRequest.cancel();
}
@Override // com.vungle.ads.internal.downloader.Downloader
public void cancelAll() {
Iterator<T> it = this.transitioning.iterator();
while (it.hasNext()) {
cancel((DownloadRequest) it.next());
}
this.transitioning.clear();
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:105:0x0598 A[EXC_TOP_SPLITTER, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:52:0x05d2 A[Catch: all -> 0x06a5, TRY_ENTER, TRY_LEAVE, TryCatch #3 {all -> 0x06a5, blocks: (B:50:0x058b, B:52:0x05d2, B:101:0x05da), top: B:49:0x058b }] */
/* JADX WARN: Removed duplicated region for block: B:59:0x0617 */
/* JADX WARN: Removed duplicated region for block: B:61:0x0620 */
/* JADX WARN: Removed duplicated region for block: B:65:0x062d */
/* JADX WARN: Removed duplicated region for block: B:68:0x065d */
/* JADX WARN: Removed duplicated region for block: B:72:0x0671 */
/* JADX WARN: Removed duplicated region for block: B:77:0x0686 */
/* JADX WARN: Removed duplicated region for block: B:79:0x061c */
/* JADX WARN: Removed duplicated region for block: B:84:0x06aa */
/* JADX WARN: Removed duplicated region for block: B:86:0x06b2 */
/* JADX WARN: Removed duplicated region for block: B:90:0x06bf */
/* JADX WARN: Removed duplicated region for block: B:93:0x06f0 */
/* JADX WARN: Type inference failed for: r0v108, types: [com.vungle.ads.internal.util.FileUtility] */
/* JADX WARN: Type inference failed for: r18v10 */
/* JADX WARN: Type inference failed for: r18v11 */
/* JADX WARN: Type inference failed for: r18v12 */
/* JADX WARN: Type inference failed for: r18v13 */
/* JADX WARN: Type inference failed for: r18v14 */
/* JADX WARN: Type inference failed for: r18v15 */
/* JADX WARN: Type inference failed for: r18v16 */
/* JADX WARN: Type inference failed for: r18v17 */
/* JADX WARN: Type inference failed for: r18v18 */
/* JADX WARN: Type inference failed for: r18v19 */
/* JADX WARN: Type inference failed for: r18v20 */
/* JADX WARN: Type inference failed for: r18v21 */
/* JADX WARN: Type inference failed for: r18v4, types: [okhttp3.Call] */
/* JADX WARN: Type inference failed for: r18v5, types: [okhttp3.Call] */
/* JADX WARN: Type inference failed for: r18v8, types: [okhttp3.Call] */
/* JADX WARN: Type inference failed for: r4v37, types: [java.io.Closeable, okio.BufferedSink] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void launchRequest(com.vungle.ads.internal.downloader.DownloadRequest r45, com.vungle.ads.internal.downloader.AssetDownloadListener r46) {
/*
Method dump skipped, instructions count: 1818
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.vungle.ads.internal.downloader.AssetDownloader.launchRequest(com.vungle.ads.internal.downloader.DownloadRequest, com.vungle.ads.internal.downloader.AssetDownloadListener):void");
}
private final ResponseBody decodeGzipIfNeeded(Response response) {
boolean equals;
ResponseBody body = response.body();
equals = StringsKt__StringsJVMKt.equals(GZIP, Response.header$default(response, "Content-Encoding", null, 2, null), true);
if (!equals || body == null) {
return body;
}
return new RealResponseBody(Response.header$default(response, "Content-Type", null, 2, null), -1L, Okio.buffer(new GzipSource(body.source())));
}
private final void deliverSuccess(File file, DownloadRequest downloadRequest, AssetDownloadListener assetDownloadListener) {
Logger.Companion.d(TAG, "On success " + downloadRequest);
if (assetDownloadListener != null) {
assetDownloadListener.onSuccess(file, downloadRequest);
}
}
private final boolean checkSpaceAvailable() {
PathProvider pathProvider = this.pathProvider;
String absolutePath = pathProvider.getVungleDir().getAbsolutePath();
Intrinsics.checkNotNullExpressionValue(absolutePath, "pathProvider.getVungleDir().absolutePath");
long availableBytes = pathProvider.getAvailableBytes(absolutePath);
if (availableBytes >= 20971520) {
return true;
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(126, "Insufficient space " + availableBytes, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
return false;
}
private final boolean isValidUrl(String str) {
return (str == null || str.length() == 0 || HttpUrl.Companion.parse(str) == null) ? false : true;
}
}

View File

@@ -0,0 +1,117 @@
package com.vungle.ads.internal.downloader;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.TimeIntervalMetric;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.model.AdAsset;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.protos.Sdk;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class DownloadRequest {
private final AdAsset asset;
private final AtomicBoolean cancelled;
private final String creativeId;
private TimeIntervalMetric downloadDuration;
private final String eventId;
private final String placementId;
private final Priority priority;
public final AdAsset getAsset() {
return this.asset;
}
public final String getCreativeId() {
return this.creativeId;
}
public final String getEventId() {
return this.eventId;
}
public final String getPlacementId() {
return this.placementId;
}
/* renamed from: getPriority, reason: collision with other method in class */
public final Priority m3884getPriority() {
return this.priority;
}
public DownloadRequest(Priority priority, AdAsset asset, String str, String str2, String str3) {
Intrinsics.checkNotNullParameter(priority, "priority");
Intrinsics.checkNotNullParameter(asset, "asset");
this.priority = priority;
this.asset = asset;
this.placementId = str;
this.creativeId = str2;
this.eventId = str3;
this.cancelled = new AtomicBoolean(false);
}
public /* synthetic */ DownloadRequest(Priority priority, AdAsset adAsset, String str, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(priority, adAsset, (i & 4) != 0 ? null : str, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3);
}
public final boolean isTemplate() {
return this.asset.getFileType() == AdAsset.FileType.ZIP || isHtmlTemplate();
}
public final boolean isHtmlTemplate() {
return Intrinsics.areEqual(this.asset.getAdIdentifier(), AdPayload.KEY_VM);
}
public final boolean isMainVideo() {
return Intrinsics.areEqual(this.asset.getAdIdentifier(), Constants.KEY_MAIN_VIDEO);
}
public String toString() {
return "DownloadRequest{, priority=" + this.priority + ", url='" + this.asset.getServerPath() + "', path='" + this.asset.getLocalPath() + "', cancelled=" + this.cancelled + ", placementId=" + this.placementId + ", creativeId=" + this.creativeId + ", eventId=" + this.eventId + '}';
}
public enum Priority {
CRITICAL(-2147483647),
HIGHEST(0),
HIGH(1),
LOWEST(Integer.MAX_VALUE);
private final int priority;
public final int getPriority() {
return this.priority;
}
Priority(int i) {
this.priority = i;
}
}
public final void cancel() {
this.cancelled.set(true);
}
public final boolean isCancelled() {
return this.cancelled.get();
}
public final int getPriority() {
return this.priority.getPriority();
}
public final void startRecord() {
TimeIntervalMetric timeIntervalMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.TEMPLATE_DOWNLOAD_DURATION_MS);
this.downloadDuration = timeIntervalMetric;
timeIntervalMetric.markStart();
}
public final void stopRecord() {
TimeIntervalMetric timeIntervalMetric = this.downloadDuration;
if (timeIntervalMetric != null) {
timeIntervalMetric.markEnd();
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(timeIntervalMetric, this.placementId, this.creativeId, this.eventId, this.asset.getServerPath());
}
}
}

View File

@@ -0,0 +1,58 @@
package com.vungle.ads.internal.downloader;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/* loaded from: classes4.dex */
public interface Downloader {
void cancel(DownloadRequest downloadRequest);
void cancelAll();
void download(DownloadRequest downloadRequest, AssetDownloadListener assetDownloadListener);
@Retention(RetentionPolicy.RUNTIME)
public @interface NetworkType {
public static final Companion Companion = Companion.$$INSTANCE;
public static final class Companion {
static final /* synthetic */ Companion $$INSTANCE = new Companion();
private static int CELLULAR = 1;
private static int WIFI = 2;
private static int ANY = 1 | 2;
public final int getANY() {
return ANY;
}
public final int getCELLULAR() {
return CELLULAR;
}
public final int getWIFI() {
return WIFI;
}
public final void setANY(int i) {
ANY = i;
}
public final void setCELLULAR(int i) {
CELLULAR = i;
}
public final void setWIFI(int i) {
WIFI = i;
}
private Companion() {
}
}
}
public static final class RequestException extends Exception {
public RequestException(String str) {
super(str);
}
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads.internal.executor;
/* loaded from: classes4.dex */
public interface Executors {
VungleThreadPoolExecutor getApiExecutor();
VungleThreadPoolExecutor getBackgroundExecutor();
VungleThreadPoolExecutor getDownloaderExecutor();
VungleThreadPoolExecutor getIoExecutor();
VungleThreadPoolExecutor getJobExecutor();
VungleThreadPoolExecutor getLoggerExecutor();
VungleThreadPoolExecutor getOffloadExecutor();
VungleThreadPoolExecutor getUaExecutor();
}

View File

@@ -0,0 +1,121 @@
package com.vungle.ads.internal.executor;
import com.vungle.ads.internal.util.Logger;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class FutureResult<T> implements Future<T> {
public static final Companion Companion = new Companion(null);
private static final String TAG = FutureResult.class.getSimpleName();
private final Future<T> future;
public final Future<T> getFuture() {
return this.future;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final String getTAG() {
return FutureResult.TAG;
}
}
public FutureResult(Future<T> future) {
this.future = future;
}
@Override // java.util.concurrent.Future
public boolean cancel(boolean z) {
Future<T> future = this.future;
if (future != null) {
return future.cancel(z);
}
return false;
}
@Override // java.util.concurrent.Future
public boolean isCancelled() {
Future<T> future = this.future;
if (future != null) {
return future.isCancelled();
}
return false;
}
@Override // java.util.concurrent.Future
public boolean isDone() {
Future<T> future = this.future;
if (future != null) {
return future.isDone();
}
return false;
}
@Override // java.util.concurrent.Future
public T get() {
try {
Future<T> future = this.future;
if (future != null) {
return future.get();
}
return null;
} catch (InterruptedException unused) {
Logger.Companion companion = Logger.Companion;
String TAG2 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
companion.w(TAG2, "future.get() Interrupted on Thread " + Thread.currentThread().getName());
Thread.currentThread().interrupt();
return null;
} catch (ExecutionException e) {
Logger.Companion companion2 = Logger.Companion;
String TAG3 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
companion2.e(TAG3, "error on execution", e);
return null;
}
}
@Override // java.util.concurrent.Future
public T get(long j, TimeUnit unit) {
Intrinsics.checkNotNullParameter(unit, "unit");
try {
Future<T> future = this.future;
if (future != null) {
return future.get(j, unit);
}
return null;
} catch (InterruptedException unused) {
Logger.Companion companion = Logger.Companion;
String TAG2 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
companion.w(TAG2, "future.get() Interrupted on Thread " + Thread.currentThread().getName());
Thread.currentThread().interrupt();
return null;
} catch (ExecutionException e) {
Logger.Companion companion2 = Logger.Companion;
String TAG3 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG3, "TAG");
companion2.e(TAG3, "error on execution", e);
return null;
} catch (TimeoutException e2) {
Logger.Companion companion3 = Logger.Companion;
String TAG4 = TAG;
Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
companion3.e(TAG4, "error on timeout", e2);
Intrinsics.checkNotNullExpressionValue(TAG4, "TAG");
companion3.w(TAG4, "future.get() Timeout on Thread " + Thread.currentThread().getName());
return null;
}
}
}

View File

@@ -0,0 +1,28 @@
package com.vungle.ads.internal.executor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class NamedThreadFactory implements ThreadFactory {
private final AtomicInteger atomicInteger;
private final String name;
private final ThreadFactory threadFactory;
public NamedThreadFactory(String name) {
Intrinsics.checkNotNullParameter(name, "name");
this.name = name;
this.threadFactory = java.util.concurrent.Executors.defaultThreadFactory();
this.atomicInteger = new AtomicInteger(0);
}
@Override // java.util.concurrent.ThreadFactory
public Thread newThread(Runnable r) {
Intrinsics.checkNotNullParameter(r, "r");
Thread t = this.threadFactory.newThread(r);
t.setName(this.name + "-th-" + this.atomicInteger.incrementAndGet());
Intrinsics.checkNotNullExpressionValue(t, "t");
return t;
}
}

View File

@@ -0,0 +1,85 @@
package com.vungle.ads.internal.executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public final class SDKExecutors implements Executors {
public static final Companion Companion = new Companion(null);
private static final int IO_KEEP_ALIVE_TIME_SECONDS = 5;
private static final int JOBS_KEEP_ALIVE_TIME_SECONDS = 1;
private static final int SINGLE_CORE_POOL_SIZE = 1;
private static final int VUNGLE_KEEP_ALIVE_TIME_SECONDS = 10;
private VungleThreadPoolExecutor API_EXECUTOR;
private VungleThreadPoolExecutor BACKGROUND_EXECUTOR;
private VungleThreadPoolExecutor DOWNLOADER_EXECUTOR;
private VungleThreadPoolExecutor IO_EXECUTOR;
private VungleThreadPoolExecutor JOB_EXECUTOR;
private VungleThreadPoolExecutor LOGGER_EXECUTOR;
private final int NUMBER_OF_CORES = Runtime.getRuntime().availableProcessors();
private VungleThreadPoolExecutor OFFLOAD_EXECUTOR;
private VungleThreadPoolExecutor UA_EXECUTOR;
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getApiExecutor() {
return this.API_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getBackgroundExecutor() {
return this.BACKGROUND_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getDownloaderExecutor() {
return this.DOWNLOADER_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getIoExecutor() {
return this.IO_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getJobExecutor() {
return this.JOB_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getLoggerExecutor() {
return this.LOGGER_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getOffloadExecutor() {
return this.OFFLOAD_EXECUTOR;
}
@Override // com.vungle.ads.internal.executor.Executors
public VungleThreadPoolExecutor getUaExecutor() {
return this.UA_EXECUTOR;
}
public SDKExecutors() {
TimeUnit timeUnit = TimeUnit.SECONDS;
this.JOB_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 1L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_jr"));
this.IO_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 5L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_io"));
this.API_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 10L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_api"));
this.LOGGER_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 10L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_logger"));
this.BACKGROUND_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 10L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_background"));
this.UA_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 10L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_ua"));
this.DOWNLOADER_EXECUTOR = new VungleThreadPoolExecutor(4, 4, 1L, timeUnit, new PriorityBlockingQueue(), new NamedThreadFactory("vng_down"));
this.OFFLOAD_EXECUTOR = new VungleThreadPoolExecutor(1, 1, 10L, timeUnit, new LinkedBlockingQueue(), new NamedThreadFactory("vng_ol"));
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,233 @@
package com.vungle.ads.internal.executor;
import com.vungle.ads.OutOfMemory;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.task.PriorityRunnable;
import com.vungle.ads.internal.util.Logger;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class VungleThreadPoolExecutor extends ThreadPoolExecutor {
public static final Companion Companion = new Companion(null);
private static final String TAG = "VungleThreadPool";
public interface ComparableRunnable extends Comparable<Object>, Runnable {
}
public VungleThreadPoolExecutor(int i, int i2, long j, TimeUnit timeUnit, BlockingQueue<Runnable> blockingQueue, ThreadFactory threadFactory) {
super(i, i2, j, timeUnit, blockingQueue, threadFactory);
allowCoreThreadTimeOut(true);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
/* JADX INFO: Access modifiers changed from: private */
public final void wrapRunnableWithFail(Runnable runnable, Runnable runnable2) {
try {
runnable.run();
} catch (OutOfMemoryError unused) {
runnable2.run();
}
}
/* JADX INFO: Access modifiers changed from: private */
public final ComparableRunnable getWrappedRunnableWithFail(final Runnable runnable, final Runnable runnable2) {
if (runnable instanceof PriorityRunnable) {
return new PriorityRunnable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$Companion$getWrappedRunnableWithFail$1
@Override // com.vungle.ads.internal.task.PriorityRunnable
public int getPriority() {
return ((PriorityRunnable) runnable).getPriority();
}
@Override // java.lang.Runnable
public void run() {
VungleThreadPoolExecutor.Companion.wrapRunnableWithFail(runnable, runnable2);
}
@Override // com.vungle.ads.internal.task.PriorityRunnable, java.lang.Comparable
public int compareTo(Object other) {
Intrinsics.checkNotNullParameter(other, "other");
if (!(other instanceof PriorityRunnable)) {
return 0;
}
return Intrinsics.compare(((PriorityRunnable) other).getPriority(), getPriority());
}
};
}
return new ComparableRunnable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$Companion$getWrappedRunnableWithFail$2
@Override // java.lang.Runnable
public void run() {
VungleThreadPoolExecutor.Companion.wrapRunnableWithFail(runnable, runnable2);
}
@Override // java.lang.Comparable
public int compareTo(Object other) {
Intrinsics.checkNotNullParameter(other, "other");
Runnable runnable3 = runnable;
if (runnable3 instanceof PriorityRunnable) {
return ((PriorityRunnable) runnable3).compareTo(other);
}
return 0;
}
};
}
/* JADX INFO: Access modifiers changed from: private */
public final <T> Callable<T> getWrappedCallableWithFallback(final Callable<T> callable, final Function0 function0) {
return new Callable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$Companion$$ExternalSyntheticLambda0
@Override // java.util.concurrent.Callable
public final Object call() {
Object m3889getWrappedCallableWithFallback$lambda0;
m3889getWrappedCallableWithFallback$lambda0 = VungleThreadPoolExecutor.Companion.m3889getWrappedCallableWithFallback$lambda0(callable, function0);
return m3889getWrappedCallableWithFallback$lambda0;
}
};
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getWrappedCallableWithFallback$lambda-0, reason: not valid java name */
public static final Object m3889getWrappedCallableWithFallback$lambda0(Callable command, Function0 failFallback) {
Intrinsics.checkNotNullParameter(command, "$command");
Intrinsics.checkNotNullParameter(failFallback, "$failFallback");
try {
return command.call();
} catch (OutOfMemoryError unused) {
failFallback.invoke();
return null;
}
}
}
@Override // java.util.concurrent.ThreadPoolExecutor, java.util.concurrent.Executor
public void execute(Runnable command) {
Intrinsics.checkNotNullParameter(command, "command");
try {
super.execute(Companion.getWrappedRunnableWithFail(command, new Runnable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
VungleThreadPoolExecutor.m3886execute$lambda0();
}
}));
} catch (Exception e) {
Logger.Companion.e(TAG, "execute error: " + e);
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: execute$lambda-0, reason: not valid java name */
public static final void m3886execute$lambda0() {
new OutOfMemory("execute error").logErrorNoReturnValue$vungle_ads_release();
}
public final void execute(Runnable command, Runnable fail) {
Intrinsics.checkNotNullParameter(command, "command");
Intrinsics.checkNotNullParameter(fail, "fail");
try {
super.execute(Companion.getWrappedRunnableWithFail(command, fail));
} catch (Exception e) {
Logger.Companion.e(TAG, "execute error with fail: " + e);
fail.run();
}
}
@Override // java.util.concurrent.AbstractExecutorService, java.util.concurrent.ExecutorService
public Future<?> submit(Runnable task) {
Intrinsics.checkNotNullParameter(task, "task");
try {
Future<?> submit = super.submit(Companion.getWrappedRunnableWithFail(task, new Runnable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
VungleThreadPoolExecutor.m3887submit$lambda1();
}
}));
Intrinsics.checkNotNullExpressionValue(submit, "{\n super.subm…\n })\n }");
return submit;
} catch (Exception e) {
Logger.Companion.e(TAG, "submit error: " + e);
return new FutureResult(null);
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: submit$lambda-1, reason: not valid java name */
public static final void m3887submit$lambda1() {
new OutOfMemory("submit error").logErrorNoReturnValue$vungle_ads_release();
}
@Override // java.util.concurrent.AbstractExecutorService, java.util.concurrent.ExecutorService
public <T> Future<T> submit(Runnable task, T t) {
Intrinsics.checkNotNullParameter(task, "task");
try {
Future<T> submit = super.submit((Runnable) Companion.getWrappedRunnableWithFail(task, new Runnable() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
VungleThreadPoolExecutor.m3888submit$lambda2();
}
}), (ComparableRunnable) t);
Intrinsics.checkNotNullExpressionValue(submit, "{\n super.subm… }, result)\n }");
return submit;
} catch (Exception e) {
Logger.Companion.e(TAG, "submit error with result: " + e);
return new FutureResult(null);
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: submit$lambda-2, reason: not valid java name */
public static final void m3888submit$lambda2() {
new OutOfMemory("submit error with error").logErrorNoReturnValue$vungle_ads_release();
}
public final Future<?> submit(Runnable task, Runnable fail) {
Intrinsics.checkNotNullParameter(task, "task");
Intrinsics.checkNotNullParameter(fail, "fail");
try {
Future<?> submit = super.submit(Companion.getWrappedRunnableWithFail(task, fail));
Intrinsics.checkNotNullExpressionValue(submit, "{\n super.subm…il(task, fail))\n }");
return submit;
} catch (Exception e) {
Logger.Companion.e(TAG, "submit error with fail: " + e);
fail.run();
return new FutureResult(null);
}
}
@Override // java.util.concurrent.AbstractExecutorService, java.util.concurrent.ExecutorService
public <T> Future<T> submit(Callable<T> task) {
Intrinsics.checkNotNullParameter(task, "task");
try {
Future<T> submit = super.submit(Companion.getWrappedCallableWithFallback(task, new Function0() { // from class: com.vungle.ads.internal.executor.VungleThreadPoolExecutor$submit$3
@Override // kotlin.jvm.functions.Function0
public /* bridge */ /* synthetic */ Object invoke() {
m3890invoke();
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: collision with other method in class */
public final void m3890invoke() {
new OutOfMemory("submit callable error").logErrorNoReturnValue$vungle_ads_release();
}
}));
Intrinsics.checkNotNullExpressionValue(submit, "{\n super.subm…\n })\n }");
return submit;
} catch (Exception e) {
Logger.Companion.e(TAG, "submit callable: " + e);
return new FutureResult(null);
}
}
}

View File

@@ -0,0 +1,11 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.model.AdPayload;
/* loaded from: classes4.dex */
public interface AdLoaderCallback {
void onFailure(VungleError vungleError);
void onSuccess(AdPayload adPayload);
}

View File

@@ -0,0 +1,61 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.VungleAdSize;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.model.Placement;
import java.io.Serializable;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AdRequest implements Serializable {
private final BidPayload adMarkup;
private final Placement placement;
private final VungleAdSize requestAdSize;
public final BidPayload getAdMarkup() {
return this.adMarkup;
}
public final Placement getPlacement() {
return this.placement;
}
public final VungleAdSize getRequestAdSize() {
return this.requestAdSize;
}
public AdRequest(Placement placement, BidPayload bidPayload, VungleAdSize vungleAdSize) {
Intrinsics.checkNotNullParameter(placement, "placement");
this.placement = placement;
this.adMarkup = bidPayload;
this.requestAdSize = vungleAdSize;
}
public String toString() {
return "AdRequest{placementId='" + this.placement.getReferenceId() + "', adMarkup=" + this.adMarkup + ", requestAdSize=" + this.requestAdSize + '}';
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || !Intrinsics.areEqual(AdRequest.class, obj.getClass())) {
return false;
}
AdRequest adRequest = (AdRequest) obj;
if (!Intrinsics.areEqual(this.placement.getReferenceId(), adRequest.placement.getReferenceId()) || !Intrinsics.areEqual(this.requestAdSize, adRequest.requestAdSize)) {
return false;
}
BidPayload bidPayload = this.adMarkup;
BidPayload bidPayload2 = adRequest.adMarkup;
return bidPayload != null ? Intrinsics.areEqual(bidPayload, bidPayload2) : bidPayload2 == null;
}
public int hashCode() {
int hashCode = this.placement.getReferenceId().hashCode() * 31;
VungleAdSize vungleAdSize = this.requestAdSize;
int hashCode2 = (hashCode + (vungleAdSize != null ? vungleAdSize.hashCode() : 0)) * 31;
BidPayload bidPayload = this.adMarkup;
return hashCode2 + (bidPayload != null ? bidPayload.hashCode() : 0);
}
}

View File

@@ -0,0 +1,173 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.AssetDownloadError;
import com.vungle.ads.SingleValueMetric;
import com.vungle.ads.internal.downloader.AssetDownloadListener;
import com.vungle.ads.internal.downloader.DownloadRequest;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.model.AdAsset;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.util.Logger;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class BaseAdLoader$assetDownloadListener$1 implements AssetDownloadListener {
final /* synthetic */ BaseAdLoader this$0;
public BaseAdLoader$assetDownloadListener$1(BaseAdLoader baseAdLoader) {
this.this$0 = baseAdLoader;
}
@Override // com.vungle.ads.internal.downloader.AssetDownloadListener
public void onError(AssetDownloadListener.DownloadError downloadError, final DownloadRequest downloadRequest) {
Intrinsics.checkNotNullParameter(downloadRequest, "downloadRequest");
Logger.Companion companion = Logger.Companion;
StringBuilder sb = new StringBuilder();
sb.append("onError called: reason ");
sb.append(downloadError != null ? Integer.valueOf(downloadError.getReason()) : null);
sb.append("; cause ");
sb.append(downloadError != null ? downloadError.getCause() : null);
companion.e("BaseAdLoader", sb.toString());
VungleThreadPoolExecutor backgroundExecutor = this.this$0.getSdkExecutors().getBackgroundExecutor();
final BaseAdLoader baseAdLoader = this.this$0;
backgroundExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.BaseAdLoader$assetDownloadListener$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BaseAdLoader$assetDownloadListener$1.m3894onError$lambda0(BaseAdLoader.this, downloadRequest);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onError$lambda-0, reason: not valid java name */
public static final void m3894onError$lambda0(BaseAdLoader this$0, DownloadRequest downloadRequest) {
AtomicBoolean atomicBoolean;
AtomicLong atomicLong;
AtomicLong atomicLong2;
AtomicBoolean atomicBoolean2;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(downloadRequest, "$downloadRequest");
atomicBoolean = this$0.fullyDownloaded;
atomicBoolean.set(false);
if (downloadRequest.getAsset().isRequired()) {
atomicBoolean2 = this$0.requiredAssetDownloaded;
atomicBoolean2.set(false);
}
if (downloadRequest.getAsset().isRequired()) {
atomicLong2 = this$0.downloadRequiredCount;
if (atomicLong2.decrementAndGet() <= 0) {
this$0.onAdLoadFailed(new AssetDownloadError());
this$0.cancel();
return;
}
}
atomicLong = this$0.downloadCount;
if (atomicLong.decrementAndGet() <= 0) {
this$0.onAdLoadFailed(new AssetDownloadError());
}
}
@Override // com.vungle.ads.internal.downloader.AssetDownloadListener
public void onSuccess(final File file, final DownloadRequest downloadRequest) {
Intrinsics.checkNotNullParameter(file, "file");
Intrinsics.checkNotNullParameter(downloadRequest, "downloadRequest");
VungleThreadPoolExecutor backgroundExecutor = this.this$0.getSdkExecutors().getBackgroundExecutor();
final BaseAdLoader baseAdLoader = this.this$0;
backgroundExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.BaseAdLoader$assetDownloadListener$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
BaseAdLoader$assetDownloadListener$1.m3895onSuccess$lambda1(file, this, downloadRequest, baseAdLoader);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onSuccess$lambda-1, reason: not valid java name */
public static final void m3895onSuccess$lambda1(File file, BaseAdLoader$assetDownloadListener$1 this$0, DownloadRequest downloadRequest, BaseAdLoader this$1) {
SingleValueMetric singleValueMetric;
SingleValueMetric singleValueMetric2;
AtomicLong atomicLong;
AtomicBoolean atomicBoolean;
AtomicLong atomicLong2;
AtomicBoolean atomicBoolean2;
boolean processVmTemplate;
AtomicBoolean atomicBoolean3;
AtomicBoolean atomicBoolean4;
Intrinsics.checkNotNullParameter(file, "$file");
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(downloadRequest, "$downloadRequest");
Intrinsics.checkNotNullParameter(this$1, "this$1");
if (!file.exists()) {
this$0.onError(new AssetDownloadListener.DownloadError(-1, new IOException("Downloaded file not found!"), AssetDownloadListener.DownloadError.ErrorReason.Companion.getFILE_NOT_FOUND_ERROR()), downloadRequest);
return;
}
AdAsset asset = downloadRequest.getAsset();
asset.setFileSize(file.length());
asset.setStatus(AdAsset.Status.DOWNLOAD_SUCCESS);
if (downloadRequest.isTemplate()) {
downloadRequest.stopRecord();
SingleValueMetric singleValueMetric3 = downloadRequest.isHtmlTemplate() ? this$1.templateHtmlSizeMetric : this$1.templateSizeMetric;
singleValueMetric3.setValue(Long.valueOf(file.length()));
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
String referenceId = this$1.getAdRequest().getPlacement().getReferenceId();
AdPayload advertisement$vungle_ads_release = this$1.getAdvertisement$vungle_ads_release();
String creativeId = advertisement$vungle_ads_release != null ? advertisement$vungle_ads_release.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release2 = this$1.getAdvertisement$vungle_ads_release();
analyticsClient.logMetric$vungle_ads_release(singleValueMetric3, referenceId, creativeId, advertisement$vungle_ads_release2 != null ? advertisement$vungle_ads_release2.eventId() : null, asset.getServerPath());
} else if (downloadRequest.isMainVideo()) {
singleValueMetric = this$1.mainVideoSizeMetric;
singleValueMetric.setValue(Long.valueOf(file.length()));
AnalyticsClient analyticsClient2 = AnalyticsClient.INSTANCE;
singleValueMetric2 = this$1.mainVideoSizeMetric;
String referenceId2 = this$1.getAdRequest().getPlacement().getReferenceId();
AdPayload advertisement$vungle_ads_release3 = this$1.getAdvertisement$vungle_ads_release();
String creativeId2 = advertisement$vungle_ads_release3 != null ? advertisement$vungle_ads_release3.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release4 = this$1.getAdvertisement$vungle_ads_release();
analyticsClient2.logMetric$vungle_ads_release(singleValueMetric2, referenceId2, creativeId2, advertisement$vungle_ads_release4 != null ? advertisement$vungle_ads_release4.eventId() : null, asset.getServerPath());
}
AdPayload advertisement$vungle_ads_release5 = this$1.getAdvertisement$vungle_ads_release();
if (advertisement$vungle_ads_release5 != null) {
advertisement$vungle_ads_release5.updateAdAssetPath(asset);
}
if (downloadRequest.isTemplate()) {
processVmTemplate = this$1.processVmTemplate(asset, this$1.getAdvertisement$vungle_ads_release());
if (!processVmTemplate) {
atomicBoolean3 = this$1.fullyDownloaded;
atomicBoolean3.set(false);
if (asset.isRequired()) {
atomicBoolean4 = this$1.requiredAssetDownloaded;
atomicBoolean4.set(false);
}
}
}
if (asset.isRequired()) {
atomicLong2 = this$1.downloadRequiredCount;
if (atomicLong2.decrementAndGet() <= 0) {
atomicBoolean2 = this$1.requiredAssetDownloaded;
if (atomicBoolean2.get()) {
this$1.onAdReady();
} else {
this$1.onAdLoadFailed(new AssetDownloadError());
this$1.cancel();
return;
}
}
}
atomicLong = this$1.downloadCount;
if (atomicLong.decrementAndGet() <= 0) {
atomicBoolean = this$1.fullyDownloaded;
if (atomicBoolean.get()) {
AdRequest adRequest = this$1.getAdRequest();
AdPayload advertisement$vungle_ads_release6 = this$1.getAdvertisement$vungle_ads_release();
this$1.onDownloadCompleted(adRequest, advertisement$vungle_ads_release6 != null ? advertisement$vungle_ads_release6.eventId() : null);
return;
}
this$1.onAdLoadFailed(new AssetDownloadError());
}
}
}

View File

@@ -0,0 +1,538 @@
package com.vungle.ads.internal.load;
import android.content.Context;
import android.webkit.URLUtil;
import androidx.annotation.WorkerThread;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.AssetDownloadError;
import com.vungle.ads.InternalError;
import com.vungle.ads.MraidJsError;
import com.vungle.ads.NativeAdInternal;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.SingleValueMetric;
import com.vungle.ads.TimeIntervalMetric;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.downloader.AssetDownloadListener;
import com.vungle.ads.internal.downloader.DownloadRequest;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.load.MraidJsLoader;
import com.vungle.ads.internal.model.AdAsset;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.ConfigPayload;
import com.vungle.ads.internal.network.TpatSender;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.util.FileUtility;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import com.vungle.ads.internal.util.UnzipUtility;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.io.FilesKt__UtilsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
/* loaded from: classes4.dex */
public abstract class BaseAdLoader {
public static final Companion Companion = new Companion(null);
private static final String DOWNLOADED_FILE_NOT_FOUND = "Downloaded file not found!";
private static final String TAG = "BaseAdLoader";
private final List<AdAsset> adAssets;
private AdLoaderCallback adLoaderCallback;
private final AdRequest adRequest;
private AdPayload advertisement;
private TimeIntervalMetric assetDownloadDurationMetric;
private final Context context;
private final AtomicLong downloadCount;
private final AtomicLong downloadRequiredCount;
private final Downloader downloader;
private AtomicBoolean fullyDownloaded;
private SingleValueMetric mainVideoSizeMetric;
private AtomicBoolean notifyFailed;
private AtomicBoolean notifySuccess;
private final OMInjector omInjector;
private final PathProvider pathProvider;
private AtomicBoolean requiredAssetDownloaded;
private final Executors sdkExecutors;
private SingleValueMetric templateHtmlSizeMetric;
private SingleValueMetric templateSizeMetric;
private final VungleApiClient vungleApiClient;
public final AdRequest getAdRequest() {
return this.adRequest;
}
public final AdPayload getAdvertisement$vungle_ads_release() {
return this.advertisement;
}
public final Context getContext() {
return this.context;
}
public final PathProvider getPathProvider() {
return this.pathProvider;
}
public final Executors getSdkExecutors() {
return this.sdkExecutors;
}
public final VungleApiClient getVungleApiClient() {
return this.vungleApiClient;
}
public abstract void onAdLoadReady();
public abstract void requestAd();
public final void setAdvertisement$vungle_ads_release(AdPayload adPayload) {
this.advertisement = adPayload;
}
public BaseAdLoader(Context context, VungleApiClient vungleApiClient, Executors sdkExecutors, OMInjector omInjector, Downloader downloader, PathProvider pathProvider, AdRequest adRequest) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(vungleApiClient, "vungleApiClient");
Intrinsics.checkNotNullParameter(sdkExecutors, "sdkExecutors");
Intrinsics.checkNotNullParameter(omInjector, "omInjector");
Intrinsics.checkNotNullParameter(downloader, "downloader");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
Intrinsics.checkNotNullParameter(adRequest, "adRequest");
this.context = context;
this.vungleApiClient = vungleApiClient;
this.sdkExecutors = sdkExecutors;
this.omInjector = omInjector;
this.downloader = downloader;
this.pathProvider = pathProvider;
this.adRequest = adRequest;
this.downloadCount = new AtomicLong(0L);
this.downloadRequiredCount = new AtomicLong(0L);
this.notifySuccess = new AtomicBoolean(false);
this.notifyFailed = new AtomicBoolean(false);
this.adAssets = new ArrayList();
this.fullyDownloaded = new AtomicBoolean(true);
this.requiredAssetDownloaded = new AtomicBoolean(true);
this.mainVideoSizeMetric = new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.ASSET_FILE_SIZE);
this.templateSizeMetric = new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.TEMPLATE_ZIP_SIZE);
this.templateHtmlSizeMetric = new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.TEMPLATE_HTML_SIZE);
this.assetDownloadDurationMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.ASSET_DOWNLOAD_DURATION_MS);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
private final AssetDownloadListener getAssetDownloadListener() {
return new BaseAdLoader$assetDownloadListener$1(this);
}
public final void loadAd(AdLoaderCallback adLoaderCallback) {
Intrinsics.checkNotNullParameter(adLoaderCallback, "adLoaderCallback");
this.adLoaderCallback = adLoaderCallback;
this.sdkExecutors.getBackgroundExecutor().execute(new Runnable() { // from class: com.vungle.ads.internal.load.BaseAdLoader$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BaseAdLoader.m3892loadAd$lambda0(BaseAdLoader.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: loadAd$lambda-0, reason: not valid java name */
public static final void m3892loadAd$lambda0(BaseAdLoader this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(Sdk.SDKMetric.SDKMetricType.LOAD_AD_API, (r15 & 2) != 0 ? 0L : 0L, (r15 & 4) != 0 ? null : this$0.adRequest.getPlacement().getReferenceId(), (r15 & 8) != 0 ? null : null, (r15 & 16) != 0 ? null : null, (r15 & 32) == 0 ? null : null);
this$0.requestAd();
}
public final void cancel() {
this.downloader.cancelAll();
}
/* JADX INFO: Access modifiers changed from: private */
public final void downloadAssets(AdPayload adPayload) {
this.assetDownloadDurationMetric.markStart();
this.downloadCount.set(this.adAssets.size());
AtomicLong atomicLong = this.downloadRequiredCount;
List<AdAsset> list = this.adAssets;
ArrayList arrayList = new ArrayList();
for (Object obj : list) {
if (((AdAsset) obj).isRequired()) {
arrayList.add(obj);
}
}
atomicLong.set(arrayList.size());
for (AdAsset adAsset : this.adAssets) {
DownloadRequest downloadRequest = new DownloadRequest(getAssetPriority(adAsset), adAsset, this.adRequest.getPlacement().getReferenceId(), adPayload.getCreativeId(), adPayload.eventId());
if (downloadRequest.isTemplate()) {
downloadRequest.startRecord();
}
this.downloader.download(downloadRequest, getAssetDownloadListener());
}
}
public final void onAdLoadFailed(VungleError error) {
AdLoaderCallback adLoaderCallback;
Intrinsics.checkNotNullParameter(error, "error");
if (this.notifySuccess.get() || !this.notifyFailed.compareAndSet(false, true) || (adLoaderCallback = this.adLoaderCallback) == null) {
return;
}
adLoaderCallback.onFailure(error);
}
/* JADX INFO: Access modifiers changed from: private */
public final void onAdReady() {
AdPayload adPayload = this.advertisement;
if (adPayload == null || this.notifyFailed.get() || !this.notifySuccess.compareAndSet(false, true)) {
return;
}
onAdLoadReady();
AdLoaderCallback adLoaderCallback = this.adLoaderCallback;
if (adLoaderCallback != null) {
adLoaderCallback.onSuccess(adPayload);
}
}
private final boolean isUrlValid(String str) {
return (str == null || str.length() == 0 || (!URLUtil.isHttpsUrl(str) && !URLUtil.isHttpUrl(str))) ? false : true;
}
private final boolean fileIsValid(File file, AdAsset adAsset) {
return file.exists() && file.length() == adAsset.getFileSize();
}
private final boolean unzipFile(AdPayload adPayload, File file, File file2) {
final ArrayList arrayList = new ArrayList();
for (AdAsset adAsset : this.adAssets) {
if (adAsset.getFileType() == AdAsset.FileType.ASSET) {
arrayList.add(adAsset.getLocalPath());
}
}
try {
UnzipUtility unzipUtility = UnzipUtility.INSTANCE;
String path = file.getPath();
String path2 = file2.getPath();
Intrinsics.checkNotNullExpressionValue(path2, "destinationDir.path");
unzipUtility.unzip(path, path2, new UnzipUtility.Filter() { // from class: com.vungle.ads.internal.load.BaseAdLoader$unzipFile$1
@Override // com.vungle.ads.internal.util.UnzipUtility.Filter
public boolean matches(String str) {
if (str != null && str.length() != 0) {
File file3 = new File(str);
Iterator<String> it = arrayList.iterator();
while (it.hasNext()) {
File file4 = new File(it.next());
if (Intrinsics.areEqual(file4, file3)) {
return false;
}
String path3 = file3.getPath();
Intrinsics.checkNotNullExpressionValue(path3, "toExtract.path");
if (StringsKt__StringsJVMKt.startsWith$default(path3, file4.getPath() + File.separator, false, 2, null)) {
return false;
}
}
}
return true;
}
});
if (!new File(file2.getPath(), Constants.AD_INDEX_FILE_NAME).exists()) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(115, "Failed to retrieve indexFileUrl from the Ad.", this.adRequest.getPlacement().getReferenceId(), adPayload.getCreativeId(), adPayload.eventId());
return false;
}
FileUtility.delete(file);
return true;
} catch (Exception e) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(109, "Unzip failed: " + e.getMessage(), this.adRequest.getPlacement().getReferenceId(), adPayload.getCreativeId(), adPayload.eventId());
return false;
}
}
private final File getDestinationDir(AdPayload adPayload) {
return this.pathProvider.getDownloadsDirForAd(adPayload.eventId());
}
private final boolean injectMraidJS(File file) {
try {
File file2 = new File(file.getPath(), Constants.AD_MRAID_JS_FILE_NAME);
File file3 = new File(this.pathProvider.getJsAssetDir(ConfigManager.INSTANCE.getMraidJsVersion()), Constants.MRAID_JS_FILE_NAME);
if (!file3.exists()) {
return true;
}
FilesKt__UtilsKt.copyTo$default(file3, file2, true, 0, 4, null);
return true;
} catch (Exception e) {
Logger.Companion.e(TAG, "Failed to inject mraid.js: " + e.getMessage());
return false;
}
}
/* JADX INFO: Access modifiers changed from: private */
public final boolean processVmTemplate(AdAsset adAsset, AdPayload adPayload) {
if (adPayload == null || adAsset.getStatus() != AdAsset.Status.DOWNLOAD_SUCCESS || adAsset.getLocalPath().length() == 0) {
return false;
}
File file = new File(adAsset.getLocalPath());
if (!fileIsValid(file, adAsset)) {
return false;
}
File destinationDir = getDestinationDir(adPayload);
if (destinationDir == null || !destinationDir.isDirectory()) {
Logger.Companion.e(TAG, "Unable to access Destination Directory");
return false;
}
if (adAsset.getFileType() == AdAsset.FileType.ZIP && !unzipFile(adPayload, file, destinationDir)) {
return false;
}
if (adPayload.omEnabled()) {
try {
this.omInjector.injectJsFiles(destinationDir);
} catch (Exception e) {
Logger.Companion.e(TAG, "Failed to inject OMSDK: " + e.getMessage());
return false;
}
}
boolean injectMraidJS = injectMraidJS(destinationDir);
FileUtility.printDirectoryTree(destinationDir);
return injectMraidJS;
}
@WorkerThread
public void onDownloadCompleted(AdRequest request, String str) {
Intrinsics.checkNotNullParameter(request, "request");
Logger.Companion.d(TAG, "download completed " + request);
AdPayload adPayload = this.advertisement;
if (adPayload != null) {
adPayload.setAssetFullyDownloaded();
}
onAdReady();
this.assetDownloadDurationMetric.markEnd();
AdPayload adPayload2 = this.advertisement;
String placementId = adPayload2 != null ? adPayload2.placementId() : null;
AdPayload adPayload3 = this.advertisement;
String creativeId = adPayload3 != null ? adPayload3.getCreativeId() : null;
AdPayload adPayload4 = this.advertisement;
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, this.assetDownloadDurationMetric, placementId, creativeId, adPayload4 != null ? adPayload4.eventId() : null, (String) null, 16, (Object) null);
}
public static /* synthetic */ void handleAdMetaData$vungle_ads_release$default(BaseAdLoader baseAdLoader, AdPayload adPayload, SingleValueMetric singleValueMetric, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: handleAdMetaData");
}
if ((i & 2) != 0) {
singleValueMetric = null;
}
baseAdLoader.handleAdMetaData$vungle_ads_release(adPayload, singleValueMetric);
}
public final void handleAdMetaData$vungle_ads_release(final AdPayload advertisement, SingleValueMetric singleValueMetric) {
Lazy lazy;
List<String> loadAdUrls;
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
this.advertisement = advertisement;
ConfigPayload config = advertisement.config();
if (config != null) {
ConfigManager.INSTANCE.initWithConfig$vungle_ads_release(this.context, config, false, singleValueMetric);
}
ErrorInfo validateAdMetadata = validateAdMetadata(advertisement);
if (validateAdMetadata != null) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(validateAdMetadata.getReason(), validateAdMetadata.getDescription(), this.adRequest.getPlacement().getReferenceId(), advertisement.getCreativeId(), advertisement.eventId());
onAdLoadFailed(new InternalError(validateAdMetadata.getReason(), validateAdMetadata.getDescriptionExternal()));
return;
}
File destinationDir = getDestinationDir(advertisement);
if (destinationDir == null || !destinationDir.isDirectory() || !destinationDir.exists()) {
onAdLoadFailed(new AssetDownloadError());
return;
}
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = this.context;
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.load.BaseAdLoader$handleAdMetaData$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.signals.SignalManager, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SignalManager.class);
}
});
AdPayload.AdUnit adUnit = advertisement.adUnit();
if (adUnit != null && (loadAdUrls = adUnit.getLoadAdUrls()) != null) {
TpatSender tpatSender = new TpatSender(this.vungleApiClient, advertisement.placementId(), advertisement.getCreativeId(), advertisement.eventId(), this.sdkExecutors.getIoExecutor(), this.pathProvider, m3891handleAdMetaData$lambda5(lazy));
Iterator<T> it = loadAdUrls.iterator();
while (it.hasNext()) {
tpatSender.sendTpat((String) it.next(), this.sdkExecutors.getJobExecutor());
}
}
if (!this.adAssets.isEmpty()) {
this.adAssets.clear();
}
this.adAssets.addAll(advertisement.getDownloadableAssets(destinationDir));
if (this.adAssets.isEmpty()) {
onAdLoadFailed(new AssetDownloadError());
} else {
MraidJsLoader.INSTANCE.downloadJs(this.pathProvider, this.downloader, this.sdkExecutors.getBackgroundExecutor(), new MraidJsLoader.DownloadResultListener() { // from class: com.vungle.ads.internal.load.BaseAdLoader$handleAdMetaData$3
@Override // com.vungle.ads.internal.load.MraidJsLoader.DownloadResultListener
public void onDownloadResult(int i) {
AdLoaderCallback adLoaderCallback;
if (i == 10 || i == 13) {
if (i == 10) {
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(Sdk.SDKMetric.SDKMetricType.MRAID_DOWNLOAD_JS_RETRY_SUCCESS, (r15 & 2) != 0 ? 0L : 0L, (r15 & 4) != 0 ? null : BaseAdLoader.this.getAdRequest().getPlacement().getReferenceId(), (r15 & 8) != 0 ? null : null, (r15 & 16) != 0 ? null : null, (r15 & 32) == 0 ? null : null);
}
BaseAdLoader.this.downloadAssets(advertisement);
} else {
adLoaderCallback = BaseAdLoader.this.adLoaderCallback;
if (adLoaderCallback != null) {
adLoaderCallback.onFailure(new MraidJsError(null, 1, null));
}
}
}
});
}
}
/* renamed from: handleAdMetaData$lambda-5, reason: not valid java name */
private static final SignalManager m3891handleAdMetaData$lambda5(Lazy lazy) {
return (SignalManager) lazy.getValue();
}
private final DownloadRequest.Priority getAssetPriority(AdAsset adAsset) {
if (adAsset.isRequired()) {
return DownloadRequest.Priority.CRITICAL;
}
return DownloadRequest.Priority.HIGHEST;
}
private final ErrorInfo validateAdMetadata(AdPayload adPayload) {
AdPayload.AdUnit adUnit = adPayload.adUnit();
if ((adUnit != null ? adUnit.getSleep() : null) != null) {
return getErrorInfo(adPayload);
}
String referenceId = this.adRequest.getPlacement().getReferenceId();
AdPayload adPayload2 = this.advertisement;
if (!Intrinsics.areEqual(referenceId, adPayload2 != null ? adPayload2.placementId() : null)) {
return new ErrorInfo(215, "Requests and responses don't match the placement Id.", null, false, 12, null);
}
AdPayload.AdUnit adUnit2 = adPayload.adUnit();
AdPayload.TemplateSettings templateSettings = adUnit2 != null ? adUnit2.getTemplateSettings() : null;
if (templateSettings == null) {
return new ErrorInfo(113, "Missing template settings", null, false, 12, null);
}
Map<String, AdPayload.CacheableReplacement> cacheableReplacements = templateSettings.getCacheableReplacements();
if (!adPayload.isNativeTemplateType()) {
AdPayload.AdUnit adUnit3 = adPayload.adUnit();
String templateURL = adUnit3 != null ? adUnit3.getTemplateURL() : null;
AdPayload.AdUnit adUnit4 = adPayload.adUnit();
String vmURL = adUnit4 != null ? adUnit4.getVmURL() : null;
if ((templateURL == null || templateURL.length() == 0) && (vmURL == null || vmURL.length() == 0)) {
return new ErrorInfo(105, "Failed to prepare vmURL or templateURL for downloading.", null, false, 12, null);
}
if (templateURL != null && templateURL.length() != 0 && !isUrlValid(templateURL)) {
return new ErrorInfo(112, "Failed to load template asset.", null, false, 12, null);
}
if (vmURL != null && vmURL.length() != 0 && !isUrlValid(vmURL)) {
return new ErrorInfo(112, "Failed to load vm url asset.", null, false, 12, null);
}
} else if (cacheableReplacements != null) {
AdPayload.CacheableReplacement cacheableReplacement = cacheableReplacements.get(NativeAdInternal.TOKEN_MAIN_IMAGE);
if ((cacheableReplacement != null ? cacheableReplacement.getUrl() : null) == null) {
return new ErrorInfo(600, "Unable to load main image.", null, false, 12, null);
}
AdPayload.CacheableReplacement cacheableReplacement2 = cacheableReplacements.get(NativeAdInternal.TOKEN_VUNGLE_PRIVACY_ICON_URL);
if ((cacheableReplacement2 != null ? cacheableReplacement2.getUrl() : null) == null) {
return new ErrorInfo(600, "Unable to load privacy image.", null, false, 12, null);
}
}
if (adPayload.hasExpired()) {
return new ErrorInfo(304, "The ad markup has expired for playback.", null, false, 12, null);
}
String eventId = adPayload.eventId();
if (eventId == null || eventId.length() == 0) {
return new ErrorInfo(200, "Event id is invalid.", null, false, 12, null);
}
if (cacheableReplacements != null) {
Iterator<Map.Entry<String, AdPayload.CacheableReplacement>> it = cacheableReplacements.entrySet().iterator();
while (it.hasNext()) {
String url = it.next().getValue().getUrl();
if (url == null || url.length() == 0) {
return new ErrorInfo(111, "Invalid asset URL " + url, null, false, 12, null);
}
if (!isUrlValid(url)) {
return new ErrorInfo(112, "Invalid asset URL " + url, null, false, 12, null);
}
}
}
return null;
}
private final ErrorInfo getErrorInfo(AdPayload adPayload) {
Integer errorCode;
AdPayload.AdUnit adUnit = adPayload.adUnit();
int intValue = (adUnit == null || (errorCode = adUnit.getErrorCode()) == null) ? 212 : errorCode.intValue();
AdPayload.AdUnit adUnit2 = adPayload.adUnit();
Integer sleep = adUnit2 != null ? adUnit2.getSleep() : null;
AdPayload.AdUnit adUnit3 = adPayload.adUnit();
String info = adUnit3 != null ? adUnit3.getInfo() : null;
if (intValue == 10001 || intValue == 10002 || intValue == 20001 || intValue == 30001 || intValue == 30002) {
return new ErrorInfo(intValue, "Response error: " + sleep, "Request failed with error: " + intValue + ", " + info, false, 8, null);
}
return new ErrorInfo(212, "Response error: " + sleep, "Request failed with error: 212, " + info, false, 8, null);
}
public static final class ErrorInfo {
private final String description;
private final String descriptionExternal;
private final boolean errorIsTerminal;
private final int reason;
public final String getDescription() {
return this.description;
}
public final String getDescriptionExternal() {
return this.descriptionExternal;
}
public final boolean getErrorIsTerminal() {
return this.errorIsTerminal;
}
public final int getReason() {
return this.reason;
}
public ErrorInfo(int i, String description, String descriptionExternal, boolean z) {
Intrinsics.checkNotNullParameter(description, "description");
Intrinsics.checkNotNullParameter(descriptionExternal, "descriptionExternal");
this.reason = i;
this.description = description;
this.descriptionExternal = descriptionExternal;
this.errorIsTerminal = z;
}
public /* synthetic */ ErrorInfo(int i, String str, String str2, boolean z, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(i, str, (i2 & 4) != 0 ? str : str2, (i2 & 8) != 0 ? false : z);
}
}
}

View File

@@ -0,0 +1,111 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.AdRetryError;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.NoServeError;
import com.vungle.ads.SingleValueMetric;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.Call;
import com.vungle.ads.internal.network.Callback;
import com.vungle.ads.internal.network.Response;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class DefaultAdLoader$fetchAdMetadata$1 implements Callback<AdPayload> {
final /* synthetic */ Placement $placement;
final /* synthetic */ DefaultAdLoader this$0;
public DefaultAdLoader$fetchAdMetadata$1(DefaultAdLoader defaultAdLoader, Placement placement) {
this.this$0 = defaultAdLoader;
this.$placement = placement;
}
@Override // com.vungle.ads.internal.network.Callback
public void onResponse(Call<AdPayload> call, final Response<AdPayload> response) {
VungleThreadPoolExecutor backgroundExecutor = this.this$0.getSdkExecutors().getBackgroundExecutor();
final DefaultAdLoader defaultAdLoader = this.this$0;
final Placement placement = this.$placement;
backgroundExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.DefaultAdLoader$fetchAdMetadata$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
DefaultAdLoader$fetchAdMetadata$1.m3898onResponse$lambda0(DefaultAdLoader.this, placement, response);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onResponse$lambda-0, reason: not valid java name */
public static final void m3898onResponse$lambda0(DefaultAdLoader this$0, Placement placement, Response response) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(placement, "$placement");
if (this$0.getVungleApiClient().getRetryAfterHeaderValue(placement.getReferenceId()) > 0) {
this$0.onAdLoadFailed(new AdRetryError().logError$vungle_ads_release());
return;
}
if (response == null || response.isSuccessful()) {
AdPayload adPayload = response != null ? (AdPayload) response.body() : null;
if ((adPayload != null ? adPayload.adUnit() : null) != null) {
this$0.handleAdMetaData$vungle_ads_release(adPayload, new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.CONFIG_LOADED_FROM_AD_LOAD));
return;
} else {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(215, "Ad response is empty.", (r13 & 4) != 0 ? null : placement.getReferenceId(), (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
this$0.onAdLoadFailed(new NoServeError());
return;
}
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(104, "Failed to get a successful response from the API call", (r13 & 4) != 0 ? null : placement.getReferenceId(), (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
this$0.onAdLoadFailed(new NoServeError());
}
@Override // com.vungle.ads.internal.network.Callback
public void onFailure(Call<AdPayload> call, final Throwable th) {
VungleThreadPoolExecutor backgroundExecutor = this.this$0.getSdkExecutors().getBackgroundExecutor();
final DefaultAdLoader defaultAdLoader = this.this$0;
final Placement placement = this.$placement;
backgroundExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.DefaultAdLoader$fetchAdMetadata$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
DefaultAdLoader$fetchAdMetadata$1.m3897onFailure$lambda1(DefaultAdLoader.this, th, placement);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onFailure$lambda-1, reason: not valid java name */
public static final void m3897onFailure$lambda1(DefaultAdLoader this$0, Throwable th, Placement placement) {
VungleError retrofitToVungleError;
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(placement, "$placement");
retrofitToVungleError = this$0.retrofitToVungleError(th);
this$0.onAdLoadFailed(retrofitToVungleError);
int code = retrofitToVungleError.getCode();
if (code == 10020) {
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
String referenceId = placement.getReferenceId();
AdPayload advertisement$vungle_ads_release = this$0.getAdvertisement$vungle_ads_release();
String creativeId = advertisement$vungle_ads_release != null ? advertisement$vungle_ads_release.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release2 = this$0.getAdvertisement$vungle_ads_release();
analyticsClient.logError$vungle_ads_release(101, "Ads request error.", referenceId, creativeId, advertisement$vungle_ads_release2 != null ? advertisement$vungle_ads_release2.eventId() : null);
return;
}
if (code == 10047) {
AnalyticsClient analyticsClient2 = AnalyticsClient.INSTANCE;
String referenceId2 = placement.getReferenceId();
AdPayload advertisement$vungle_ads_release3 = this$0.getAdvertisement$vungle_ads_release();
String creativeId2 = advertisement$vungle_ads_release3 != null ? advertisement$vungle_ads_release3.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release4 = this$0.getAdvertisement$vungle_ads_release();
analyticsClient2.logError$vungle_ads_release(217, "Timeout for ads call.", referenceId2, creativeId2, advertisement$vungle_ads_release4 != null ? advertisement$vungle_ads_release4.eventId() : null);
return;
}
AnalyticsClient analyticsClient3 = AnalyticsClient.INSTANCE;
String referenceId3 = placement.getReferenceId();
AdPayload advertisement$vungle_ads_release5 = this$0.getAdvertisement$vungle_ads_release();
String creativeId3 = advertisement$vungle_ads_release5 != null ? advertisement$vungle_ads_release5.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release6 = this$0.getAdvertisement$vungle_ads_release();
analyticsClient3.logError$vungle_ads_release(103, "Unable to decode ads response.", referenceId3, creativeId3, advertisement$vungle_ads_release6 != null ? advertisement$vungle_ads_release6.eventId() : null);
}
}

View File

@@ -0,0 +1,71 @@
package com.vungle.ads.internal.load;
import android.content.Context;
import com.vungle.ads.AdFailedToDownloadError;
import com.vungle.ads.AdRetryActiveError;
import com.vungle.ads.InternalError;
import com.vungle.ads.VungleAdSize;
import com.vungle.ads.VungleError;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.Call;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.util.PathProvider;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class DefaultAdLoader extends BaseAdLoader {
@Override // com.vungle.ads.internal.load.BaseAdLoader
public void onAdLoadReady() {
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DefaultAdLoader(Context context, VungleApiClient vungleApiClient, Executors sdkExecutors, OMInjector omInjector, Downloader downloader, PathProvider pathProvider, AdRequest adRequest) {
super(context, vungleApiClient, sdkExecutors, omInjector, downloader, pathProvider, adRequest);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(vungleApiClient, "vungleApiClient");
Intrinsics.checkNotNullParameter(sdkExecutors, "sdkExecutors");
Intrinsics.checkNotNullParameter(omInjector, "omInjector");
Intrinsics.checkNotNullParameter(downloader, "downloader");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
Intrinsics.checkNotNullParameter(adRequest, "adRequest");
}
@Override // com.vungle.ads.internal.load.BaseAdLoader
public void requestAd() {
fetchAdMetadata(getAdRequest().getRequestAdSize(), getAdRequest().getPlacement());
}
private final void fetchAdMetadata(VungleAdSize vungleAdSize, Placement placement) {
if (getVungleApiClient().checkIsRetryAfterActive(placement.getReferenceId())) {
onAdLoadFailed(new AdRetryActiveError().logError$vungle_ads_release());
return;
}
Call<AdPayload> requestAd = getVungleApiClient().requestAd(placement.getReferenceId(), vungleAdSize);
if (requestAd == null) {
onAdLoadFailed(new AdFailedToDownloadError());
} else {
requestAd.enqueue(new DefaultAdLoader$fetchAdMetadata$1(this, placement));
}
}
/* JADX INFO: Access modifiers changed from: private */
public final VungleError retrofitToVungleError(Throwable th) {
if (th instanceof UnknownHostException) {
return new AdFailedToDownloadError();
}
if (th instanceof SocketTimeoutException) {
return new InternalError(VungleError.NETWORK_TIMEOUT, null, 2, null);
}
if (th instanceof IOException) {
return new InternalError(VungleError.NETWORK_ERROR, null, 2, null);
}
return new AdFailedToDownloadError();
}
}

View File

@@ -0,0 +1,98 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.MraidJsError;
import com.vungle.ads.internal.downloader.AssetDownloadListener;
import com.vungle.ads.internal.downloader.DownloadRequest;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.util.FileUtility;
import com.vungle.ads.internal.util.Logger;
import java.io.File;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class MraidJsLoader$downloadJs$1$2 implements AssetDownloadListener {
final /* synthetic */ VungleThreadPoolExecutor $executor;
final /* synthetic */ File $jsPath;
final /* synthetic */ File $mraidJsFile;
public MraidJsLoader$downloadJs$1$2(VungleThreadPoolExecutor vungleThreadPoolExecutor, File file, File file2) {
this.$executor = vungleThreadPoolExecutor;
this.$jsPath = file;
this.$mraidJsFile = file2;
}
@Override // com.vungle.ads.internal.downloader.AssetDownloadListener
public void onError(final AssetDownloadListener.DownloadError downloadError, final DownloadRequest downloadRequest) {
Intrinsics.checkNotNullParameter(downloadRequest, "downloadRequest");
VungleThreadPoolExecutor vungleThreadPoolExecutor = this.$executor;
final File file = this.$jsPath;
vungleThreadPoolExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.MraidJsLoader$downloadJs$1$2$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
MraidJsLoader$downloadJs$1$2.m3901onError$lambda0(AssetDownloadListener.DownloadError.this, downloadRequest, file);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onError$lambda-0, reason: not valid java name */
public static final void m3901onError$lambda0(AssetDownloadListener.DownloadError downloadError, DownloadRequest downloadRequest, File jsPath) {
Intrinsics.checkNotNullParameter(downloadRequest, "$downloadRequest");
Intrinsics.checkNotNullParameter(jsPath, "$jsPath");
try {
try {
StringBuilder sb = new StringBuilder();
sb.append("download mraid js error: ");
sb.append(downloadError != null ? Integer.valueOf(downloadError.getServerCode()) : null);
sb.append(". Failed to load asset ");
sb.append(downloadRequest.getAsset().getServerPath());
String sb2 = sb.toString();
Logger.Companion.d("MraidJsLoader", sb2);
new MraidJsError(sb2).logErrorNoReturnValue$vungle_ads_release();
FileUtility.deleteContents(jsPath);
} catch (Exception e) {
Logger.Companion.e("MraidJsLoader", "Failed to delete js assets", e);
}
MraidJsLoader.INSTANCE.notifyListeners(12);
} catch (Throwable th) {
MraidJsLoader.INSTANCE.notifyListeners(12);
throw th;
}
}
@Override // com.vungle.ads.internal.downloader.AssetDownloadListener
public void onSuccess(final File file, DownloadRequest downloadRequest) {
Intrinsics.checkNotNullParameter(file, "file");
Intrinsics.checkNotNullParameter(downloadRequest, "downloadRequest");
VungleThreadPoolExecutor vungleThreadPoolExecutor = this.$executor;
final File file2 = this.$mraidJsFile;
final File file3 = this.$jsPath;
vungleThreadPoolExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.MraidJsLoader$downloadJs$1$2$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
MraidJsLoader$downloadJs$1$2.m3902onSuccess$lambda1(file, file2, file3);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onSuccess$lambda-1, reason: not valid java name */
public static final void m3902onSuccess$lambda1(File file, File mraidJsFile, File jsPath) {
Intrinsics.checkNotNullParameter(file, "$file");
Intrinsics.checkNotNullParameter(mraidJsFile, "$mraidJsFile");
Intrinsics.checkNotNullParameter(jsPath, "$jsPath");
try {
if (file.exists() && file.length() > 0) {
MraidJsLoader.INSTANCE.notifyListeners(10);
} else {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(131, "Mraid js downloaded but write failure: " + mraidJsFile.getAbsolutePath(), (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
FileUtility.deleteContents(jsPath);
MraidJsLoader.INSTANCE.notifyListeners(12);
}
} catch (Exception e) {
Logger.Companion.e("MraidJsLoader", "Failed to delete js assets", e);
MraidJsLoader.INSTANCE.notifyListeners(12);
}
}
}

View File

@@ -0,0 +1,102 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.downloader.DownloadRequest;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.load.MraidJsLoader;
import com.vungle.ads.internal.model.AdAsset;
import com.vungle.ads.internal.util.FileUtility;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import java.io.File;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class MraidJsLoader {
public static final int MRAID_AVAILABLE = 13;
public static final int MRAID_DOWNLOADED = 10;
public static final int MRAID_DOWNLOAD_FAILED = 12;
public static final int MRAID_INVALID_ENDPOINT = 11;
private static final String TAG = "MraidJsLoader";
public static final MraidJsLoader INSTANCE = new MraidJsLoader();
private static final AtomicBoolean isDownloading = new AtomicBoolean(false);
private static final CopyOnWriteArrayList<DownloadResultListener> listeners = new CopyOnWriteArrayList<>();
public interface DownloadResultListener {
void onDownloadResult(int i);
}
private MraidJsLoader() {
}
public static /* synthetic */ void downloadJs$default(MraidJsLoader mraidJsLoader, PathProvider pathProvider, Downloader downloader, VungleThreadPoolExecutor vungleThreadPoolExecutor, DownloadResultListener downloadResultListener, int i, Object obj) {
if ((i & 8) != 0) {
downloadResultListener = null;
}
mraidJsLoader.downloadJs(pathProvider, downloader, vungleThreadPoolExecutor, downloadResultListener);
}
public final void downloadJs(final PathProvider pathProvider, final Downloader downloader, final VungleThreadPoolExecutor executor, final DownloadResultListener downloadResultListener) {
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
Intrinsics.checkNotNullParameter(downloader, "downloader");
Intrinsics.checkNotNullParameter(executor, "executor");
executor.execute(new Runnable() { // from class: com.vungle.ads.internal.load.MraidJsLoader$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
MraidJsLoader.m3899downloadJs$lambda1(MraidJsLoader.DownloadResultListener.this, pathProvider, downloader, executor);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: downloadJs$lambda-1, reason: not valid java name */
public static final void m3899downloadJs$lambda1(DownloadResultListener downloadResultListener, PathProvider pathProvider, Downloader downloader, VungleThreadPoolExecutor executor) {
Intrinsics.checkNotNullParameter(pathProvider, "$pathProvider");
Intrinsics.checkNotNullParameter(downloader, "$downloader");
Intrinsics.checkNotNullParameter(executor, "$executor");
if (downloadResultListener != null) {
try {
listeners.add(downloadResultListener);
} catch (Exception e) {
Logger.Companion.e(TAG, "Failed to download mraid js", e);
return;
}
}
if (isDownloading.getAndSet(true)) {
Logger.Companion.w(TAG, "mraid js is downloading, waiting for the previous request.");
return;
}
ConfigManager configManager = ConfigManager.INSTANCE;
String mraidEndpoint = configManager.getMraidEndpoint();
if (mraidEndpoint != null && mraidEndpoint.length() != 0) {
File file = new File(pathProvider.getJsAssetDir(configManager.getMraidJsVersion()), Constants.MRAID_JS_FILE_NAME);
if (file.exists()) {
Logger.Companion.w(TAG, "mraid js already downloaded");
INSTANCE.notifyListeners(13);
return;
}
File jsDir = pathProvider.getJsDir();
FileUtility.deleteContents(jsDir);
String absolutePath = file.getAbsolutePath();
Intrinsics.checkNotNullExpressionValue(absolutePath, "mraidJsFile.absolutePath");
downloader.download(new DownloadRequest(DownloadRequest.Priority.HIGH, new AdAsset(Constants.MRAID_JS_FILE_NAME, mraidEndpoint + "/mraid.min.js", absolutePath, AdAsset.FileType.ASSET, true), null, null, null, 28, null), new MraidJsLoader$downloadJs$1$2(executor, jsDir, file));
return;
}
INSTANCE.notifyListeners(11);
}
/* JADX INFO: Access modifiers changed from: private */
public final void notifyListeners(int i) {
Iterator<T> it = listeners.iterator();
while (it.hasNext()) {
((DownloadResultListener) it.next()).onDownloadResult(i);
}
listeners.clear();
isDownloading.set(false);
}
}

View File

@@ -0,0 +1,31 @@
package com.vungle.ads.internal.load;
import com.vungle.ads.internal.network.VungleApiClient;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class RTADebugger {
public static final Companion Companion = new Companion(null);
public static final String RTA_DEBUG_ENDPOINT = "https://events.ads.vungle.com/rtadebugging";
private final VungleApiClient apiClient;
public RTADebugger(VungleApiClient apiClient) {
Intrinsics.checkNotNullParameter(apiClient, "apiClient");
this.apiClient = apiClient;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public final void reportAdMarkup(String adm) {
Intrinsics.checkNotNullParameter(adm, "adm");
this.apiClient.sendAdMarkup(adm, RTA_DEBUG_ENDPOINT);
}
}

View File

@@ -0,0 +1,133 @@
package com.vungle.ads.internal.load;
import android.content.Context;
import com.vungle.ads.AdMarkupInvalidError;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.SingleValueMetric;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.network.TpatSender;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class RealtimeAdLoader extends BaseAdLoader {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RealtimeAdLoader(Context context, VungleApiClient vungleApiClient, Executors sdkExecutors, OMInjector omInjector, Downloader downloader, PathProvider pathProvider, AdRequest adRequest) {
super(context, vungleApiClient, sdkExecutors, omInjector, downloader, pathProvider, adRequest);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(vungleApiClient, "vungleApiClient");
Intrinsics.checkNotNullParameter(sdkExecutors, "sdkExecutors");
Intrinsics.checkNotNullParameter(omInjector, "omInjector");
Intrinsics.checkNotNullParameter(downloader, "downloader");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
Intrinsics.checkNotNullParameter(adRequest, "adRequest");
}
@Override // com.vungle.ads.internal.load.BaseAdLoader
public void requestAd() {
Lazy lazy;
BidPayload adMarkup = getAdRequest().getAdMarkup();
if (adMarkup != null) {
if (ConfigManager.INSTANCE.rtaDebuggingEnabled()) {
try {
String decodedAdsResponse = adMarkup.getDecodedAdsResponse();
Logger.Companion.d("RTA_DEBUGGER", String.valueOf(decodedAdsResponse));
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = getContext();
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.load.RealtimeAdLoader$requestAd$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.network.VungleApiClient, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final VungleApiClient invoke() {
return ServiceLocator.Companion.getInstance(context).getService(VungleApiClient.class);
}
});
if (decodedAdsResponse != null) {
new RTADebugger(m3903requestAd$lambda0(lazy)).reportAdMarkup(decodedAdsResponse);
}
} catch (Throwable unused) {
}
}
AdPayload adPayload = adMarkup.getAdPayload();
Integer version = adMarkup.getVersion();
if (version != null && version.intValue() == 2 && adPayload != null) {
handleAdMetaData$vungle_ads_release(adPayload, new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.CONFIG_LOADED_FROM_ADM_LOAD));
return;
} else {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(213, "The ad response did not contain valid ad markup.", (r13 & 4) != 0 ? null : getAdRequest().getPlacement().getReferenceId(), (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : adMarkup.getEventId());
onAdLoadFailed(new AdMarkupInvalidError());
return;
}
}
AnalyticsClient.INSTANCE.logError$vungle_ads_release(208, "Unable to create data object from payload string.", (r13 & 4) != 0 ? null : getAdRequest().getPlacement().getReferenceId(), (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
onAdLoadFailed(new AdMarkupInvalidError());
}
/* renamed from: requestAd$lambda-0, reason: not valid java name */
private static final VungleApiClient m3903requestAd$lambda0(Lazy lazy) {
return (VungleApiClient) lazy.getValue();
}
@Override // com.vungle.ads.internal.load.BaseAdLoader
public void onAdLoadReady() {
AdPayload advertisement$vungle_ads_release = getAdvertisement$vungle_ads_release();
sendWinNotification(advertisement$vungle_ads_release != null ? advertisement$vungle_ads_release.getWinNotifications() : null);
}
private final void sendWinNotification(List<String> list) {
Lazy lazy;
if (list == null || !list.isEmpty()) {
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = getContext();
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.internal.load.RealtimeAdLoader$sendWinNotification$$inlined$inject$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
/* JADX WARN: Type inference failed for: r0v2, types: [com.vungle.ads.internal.signals.SignalManager, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final SignalManager invoke() {
return ServiceLocator.Companion.getInstance(context).getService(SignalManager.class);
}
});
VungleApiClient vungleApiClient = getVungleApiClient();
String referenceId = getAdRequest().getPlacement().getReferenceId();
AdPayload advertisement$vungle_ads_release = getAdvertisement$vungle_ads_release();
String creativeId = advertisement$vungle_ads_release != null ? advertisement$vungle_ads_release.getCreativeId() : null;
AdPayload advertisement$vungle_ads_release2 = getAdvertisement$vungle_ads_release();
TpatSender tpatSender = new TpatSender(vungleApiClient, referenceId, creativeId, advertisement$vungle_ads_release2 != null ? advertisement$vungle_ads_release2.eventId() : null, getSdkExecutors().getIoExecutor(), getPathProvider(), m3904sendWinNotification$lambda2(lazy));
if (list != null) {
Iterator<T> it = list.iterator();
while (it.hasNext()) {
tpatSender.sendWinNotification((String) it.next(), getSdkExecutors().getJobExecutor());
}
}
}
}
/* renamed from: sendWinNotification$lambda-2, reason: not valid java name */
private static final SignalManager m3904sendWinNotification$lambda2(Lazy lazy) {
return (SignalManager) lazy.getValue();
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads.internal.locale;
/* loaded from: classes4.dex */
public interface LocaleInfo {
String getLanguage();
String getTimeZoneId();
}

View File

@@ -0,0 +1,22 @@
package com.vungle.ads.internal.locale;
import java.util.Locale;
import java.util.TimeZone;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class SystemLocaleInfo implements LocaleInfo {
@Override // com.vungle.ads.internal.locale.LocaleInfo
public String getTimeZoneId() {
String id = TimeZone.getDefault().getID();
Intrinsics.checkNotNullExpressionValue(id, "getDefault().id");
return id;
}
@Override // com.vungle.ads.internal.locale.LocaleInfo
public String getLanguage() {
String language = Locale.getDefault().getLanguage();
Intrinsics.checkNotNullExpressionValue(language, "getDefault().language");
return language;
}
}

View File

@@ -0,0 +1,101 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AdAsset {
private final String adIdentifier;
private long fileSize;
private final FileType fileType;
private final boolean isRequired;
private final String localPath;
private final String serverPath;
private Status status;
public enum FileType {
ZIP,
ASSET
}
public enum Status {
NEW,
DOWNLOAD_RUNNING,
DOWNLOAD_FAILED,
DOWNLOAD_SUCCESS,
PROCESSED
}
public final String getAdIdentifier() {
return this.adIdentifier;
}
public final long getFileSize() {
return this.fileSize;
}
public final FileType getFileType() {
return this.fileType;
}
public final String getLocalPath() {
return this.localPath;
}
public final String getServerPath() {
return this.serverPath;
}
public final Status getStatus() {
return this.status;
}
public final boolean isRequired() {
return this.isRequired;
}
public final void setFileSize(long j) {
this.fileSize = j;
}
public final void setStatus(Status status) {
Intrinsics.checkNotNullParameter(status, "<set-?>");
this.status = status;
}
public AdAsset(String adIdentifier, String serverPath, String localPath, FileType fileType, boolean z) {
Intrinsics.checkNotNullParameter(adIdentifier, "adIdentifier");
Intrinsics.checkNotNullParameter(serverPath, "serverPath");
Intrinsics.checkNotNullParameter(localPath, "localPath");
Intrinsics.checkNotNullParameter(fileType, "fileType");
this.adIdentifier = adIdentifier;
this.serverPath = serverPath;
this.localPath = localPath;
this.fileType = fileType;
this.isRequired = z;
this.status = Status.NEW;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || !Intrinsics.areEqual(AdAsset.class, obj.getClass())) {
return false;
}
AdAsset adAsset = (AdAsset) obj;
if (this.status == adAsset.status && this.fileType == adAsset.fileType && this.fileSize == adAsset.fileSize && this.isRequired == adAsset.isRequired && Intrinsics.areEqual(this.adIdentifier, adAsset.adIdentifier) && Intrinsics.areEqual(this.serverPath, adAsset.serverPath)) {
return Intrinsics.areEqual(this.localPath, adAsset.localPath);
}
return false;
}
public int hashCode() {
int hashCode = ((((((((this.adIdentifier.hashCode() * 31) + this.serverPath.hashCode()) * 31) + this.localPath.hashCode()) * 31) + this.status.hashCode()) * 31) + this.fileType.hashCode()) * 31;
long j = this.fileSize;
return ((hashCode + ((int) (j ^ (j >>> 32)))) * 31) + Boolean.hashCode(this.isRequired);
}
public String toString() {
return "AdAsset{, adIdentifier='" + this.adIdentifier + "', serverPath='" + this.serverPath + "', localPath='" + this.localPath + "', status=" + this.status + ", fileType=" + this.fileType + ", fileSize=" + this.fileSize + ", isRequired=" + this.isRequired + '}';
}
}

View File

@@ -0,0 +1,137 @@
package com.vungle.ads.internal.model;
import com.mbridge.msdk.foundation.entity.b;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.serialization.ContextualSerializer;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.ArrayListSerializer;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LinkedHashMapSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$$serializer implements GeneratedSerializer<AdPayload> {
public static final AdPayload$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$$serializer adPayload$$serializer = new AdPayload$$serializer();
INSTANCE = adPayload$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload", adPayload$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement(b.JSON_KEY_ADS, true);
pluginGeneratedSerialDescriptor.addElement("config", true);
pluginGeneratedSerialDescriptor.addElement("mraidFiles", true);
pluginGeneratedSerialDescriptor.addElement("incentivizedTextSettings", true);
pluginGeneratedSerialDescriptor.addElement("assetsFullyDownloaded", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(new ArrayListSerializer(AdPayload$PlacementAdUnit$$serializer.INSTANCE)), BuiltinSerializersKt.getNullable(ConfigPayload$$serializer.INSTANCE), (KSerializer) new ContextualSerializer(Reflection.getOrCreateKotlinClass(ConcurrentHashMap.class), (KSerializer) null, new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE}), (KSerializer) new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), (KSerializer) BooleanSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload m3905deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
boolean z;
int i;
Object obj4;
Object obj5;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i2 = 3;
int i3 = 4;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new ArrayListSerializer(AdPayload$PlacementAdUnit$$serializer.INSTANCE), (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeSerializableElement(descriptor2, 2, new ContextualSerializer(Reflection.getOrCreateKotlinClass(ConcurrentHashMap.class), (KSerializer) null, new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE}), (Object) null);
obj3 = beginStructure.decodeSerializableElement(descriptor2, 3, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), (Object) null);
i = 31;
z = beginStructure.decodeBooleanElement(descriptor2, 4);
} else {
boolean z2 = true;
boolean z3 = false;
int i4 = 0;
obj = null;
Object obj6 = null;
Object obj7 = null;
Object obj8 = null;
while (z2) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z2 = false;
} else if (decodeElementIndex != 0) {
if (decodeElementIndex == 1) {
obj5 = null;
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$$serializer.INSTANCE, obj8);
i4 |= 2;
} else if (decodeElementIndex == 2) {
obj5 = null;
obj6 = beginStructure.decodeSerializableElement(descriptor2, 2, new ContextualSerializer(Reflection.getOrCreateKotlinClass(ConcurrentHashMap.class), (KSerializer) null, new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE}), obj6);
i4 |= 4;
} else if (decodeElementIndex == i2) {
obj7 = beginStructure.decodeSerializableElement(descriptor2, i2, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), obj7);
i4 |= 8;
i3 = 4;
} else {
if (decodeElementIndex != i3) {
throw new UnknownFieldException(decodeElementIndex);
}
z3 = beginStructure.decodeBooleanElement(descriptor2, i3);
i4 |= 16;
}
i2 = 3;
i3 = 4;
} else {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new ArrayListSerializer(AdPayload$PlacementAdUnit$$serializer.INSTANCE), obj);
i4 |= 1;
i2 = 3;
i3 = 4;
}
}
obj2 = obj6;
obj3 = obj7;
z = z3;
i = i4;
obj4 = obj8;
}
beginStructure.endStructure(descriptor2);
return new AdPayload(i, (List) obj, (ConfigPayload) obj4, (ConcurrentHashMap) obj2, (Map) obj3, z, null);
}
public void serialize(Encoder encoder, AdPayload value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,94 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.AdPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class AdPayload$AdSizeInfo$$serializer implements GeneratedSerializer<AdPayload.AdSizeInfo> {
public static final AdPayload$AdSizeInfo$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$AdSizeInfo$$serializer adPayload$AdSizeInfo$$serializer = new AdPayload$AdSizeInfo$$serializer();
INSTANCE = adPayload$AdSizeInfo$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.AdSizeInfo", adPayload$AdSizeInfo$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("w", true);
pluginGeneratedSerialDescriptor.addElement("h", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$AdSizeInfo$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.AdSizeInfo m3906deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, IntSerializer.INSTANCE, (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, IntSerializer.INSTANCE, obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.AdSizeInfo(i, (Integer) obj, (Integer) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.AdSizeInfo value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.AdSizeInfo.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,411 @@
package com.vungle.ads.internal.model;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.vungle.ads.internal.model.AdPayload;
import java.util.List;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.ArrayListSerializer;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$AdUnit$$serializer implements GeneratedSerializer<AdPayload.AdUnit> {
public static final AdPayload$AdUnit$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$AdUnit$$serializer adPayload$AdUnit$$serializer = new AdPayload$AdUnit$$serializer();
INSTANCE = adPayload$AdUnit$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.AdUnit", adPayload$AdUnit$$serializer, 25);
pluginGeneratedSerialDescriptor.addElement("id", true);
pluginGeneratedSerialDescriptor.addElement("ad_type", true);
pluginGeneratedSerialDescriptor.addElement("ad_source", true);
pluginGeneratedSerialDescriptor.addElement("expiry", true);
pluginGeneratedSerialDescriptor.addElement("deeplink_url", true);
pluginGeneratedSerialDescriptor.addElement("click_coordinates_enabled", true);
pluginGeneratedSerialDescriptor.addElement("ad_load_optimization", true);
pluginGeneratedSerialDescriptor.addElement("template_heartbeat_check", true);
pluginGeneratedSerialDescriptor.addElement("info", true);
pluginGeneratedSerialDescriptor.addElement("sleep", true);
pluginGeneratedSerialDescriptor.addElement("error_code", true);
pluginGeneratedSerialDescriptor.addElement("tpat", true);
pluginGeneratedSerialDescriptor.addElement("vm_url", true);
pluginGeneratedSerialDescriptor.addElement("ad_market_id", true);
pluginGeneratedSerialDescriptor.addElement("notification", true);
pluginGeneratedSerialDescriptor.addElement("load_ad", true);
pluginGeneratedSerialDescriptor.addElement("viewability", true);
pluginGeneratedSerialDescriptor.addElement("template_url", true);
pluginGeneratedSerialDescriptor.addElement("template_type", true);
pluginGeneratedSerialDescriptor.addElement("template_settings", true);
pluginGeneratedSerialDescriptor.addElement(CampaignEx.JSON_KEY_CREATIVE_ID, true);
pluginGeneratedSerialDescriptor.addElement("app_id", true);
pluginGeneratedSerialDescriptor.addElement("show_close", true);
pluginGeneratedSerialDescriptor.addElement("show_close_incentivized", true);
pluginGeneratedSerialDescriptor.addElement("ad_size", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$AdUnit$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(AdPayload.TpatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(new ArrayListSerializer(StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(new ArrayListSerializer(StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(AdPayload$ViewAbility$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(AdPayload$TemplateSettings$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(AdPayload$AdSizeInfo$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.AdUnit m3907deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
Object obj6;
Object obj7;
Object obj8;
Object obj9;
Object obj10;
Object obj11;
Object obj12;
Object obj13;
Object obj14;
int i;
Object obj15;
Object obj16;
Object obj17;
Object obj18;
Object obj19;
Object obj20;
Object obj21;
Object obj22;
Object obj23;
Object obj24;
Object obj25;
Object obj26;
int i2;
Object obj27;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
Object decodeNullableSerializableElement = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj24 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, (Object) null);
obj18 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, (Object) null);
obj19 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, (Object) null);
obj20 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, BooleanSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement3 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, BooleanSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement4 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, BooleanSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement5 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, (Object) null);
obj25 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, IntSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement6 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement7 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, AdPayload.TpatSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement8 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement9 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement10 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, new ArrayListSerializer(StringSerializer.INSTANCE), (Object) null);
Object decodeNullableSerializableElement11 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, new ArrayListSerializer(StringSerializer.INSTANCE), (Object) null);
obj22 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, AdPayload$ViewAbility$$serializer.INSTANCE, (Object) null);
obj13 = beginStructure.decodeNullableSerializableElement(descriptor2, 17, StringSerializer.INSTANCE, (Object) null);
obj14 = beginStructure.decodeNullableSerializableElement(descriptor2, 18, StringSerializer.INSTANCE, (Object) null);
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, 19, AdPayload$TemplateSettings$$serializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement12 = beginStructure.decodeNullableSerializableElement(descriptor2, 20, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement13 = beginStructure.decodeNullableSerializableElement(descriptor2, 21, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement14 = beginStructure.decodeNullableSerializableElement(descriptor2, 22, IntSerializer.INSTANCE, (Object) null);
obj23 = beginStructure.decodeNullableSerializableElement(descriptor2, 23, IntSerializer.INSTANCE, (Object) null);
obj4 = decodeNullableSerializableElement12;
obj9 = decodeNullableSerializableElement5;
i = 33554431;
obj11 = decodeNullableSerializableElement7;
obj10 = decodeNullableSerializableElement6;
obj8 = decodeNullableSerializableElement4;
obj17 = decodeNullableSerializableElement2;
obj5 = decodeNullableSerializableElement9;
obj6 = decodeNullableSerializableElement8;
obj3 = decodeNullableSerializableElement13;
obj = decodeNullableSerializableElement14;
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 24, AdPayload$AdSizeInfo$$serializer.INSTANCE, (Object) null);
obj15 = decodeNullableSerializableElement10;
obj7 = decodeNullableSerializableElement;
obj16 = decodeNullableSerializableElement11;
obj21 = decodeNullableSerializableElement3;
} else {
boolean z = true;
Object obj28 = null;
Object obj29 = null;
Object obj30 = null;
Object obj31 = null;
obj = null;
Object obj32 = null;
Object obj33 = null;
Object obj34 = null;
obj2 = null;
Object obj35 = null;
obj3 = null;
obj4 = null;
Object obj36 = null;
Object obj37 = null;
Object obj38 = null;
Object obj39 = null;
Object obj40 = null;
Object obj41 = null;
Object obj42 = null;
Object obj43 = null;
Object obj44 = null;
Object obj45 = null;
Object obj46 = null;
Object obj47 = null;
int i3 = 0;
Object obj48 = null;
while (z) {
Object obj49 = obj34;
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
obj27 = obj28;
z = false;
obj28 = obj27;
obj34 = obj49;
case 0:
obj26 = obj33;
obj36 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj36);
i3 |= 1;
obj28 = obj28;
obj37 = obj37;
obj34 = obj49;
obj33 = obj26;
case 1:
obj26 = obj33;
obj37 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj37);
i3 |= 2;
obj28 = obj28;
obj38 = obj38;
obj34 = obj49;
obj33 = obj26;
case 2:
obj26 = obj33;
obj38 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, obj38);
i3 |= 4;
obj28 = obj28;
obj39 = obj39;
obj34 = obj49;
obj33 = obj26;
case 3:
obj26 = obj33;
obj39 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, obj39);
i3 |= 8;
obj28 = obj28;
obj40 = obj40;
obj34 = obj49;
obj33 = obj26;
case 4:
obj26 = obj33;
obj40 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, obj40);
i3 |= 16;
obj28 = obj28;
obj41 = obj41;
obj34 = obj49;
obj33 = obj26;
case 5:
obj26 = obj33;
obj41 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, BooleanSerializer.INSTANCE, obj41);
i3 |= 32;
obj28 = obj28;
obj42 = obj42;
obj34 = obj49;
obj33 = obj26;
case 6:
obj26 = obj33;
obj42 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, BooleanSerializer.INSTANCE, obj42);
i3 |= 64;
obj28 = obj28;
obj43 = obj43;
obj34 = obj49;
obj33 = obj26;
case 7:
obj26 = obj33;
obj43 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, BooleanSerializer.INSTANCE, obj43);
i3 |= 128;
obj28 = obj28;
obj44 = obj44;
obj34 = obj49;
obj33 = obj26;
case 8:
obj26 = obj33;
obj44 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, obj44);
i3 |= 256;
obj28 = obj28;
obj45 = obj45;
obj34 = obj49;
obj33 = obj26;
case 9:
obj26 = obj33;
obj45 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, IntSerializer.INSTANCE, obj45);
i3 |= 512;
obj28 = obj28;
obj46 = obj46;
obj34 = obj49;
obj33 = obj26;
case 10:
obj26 = obj33;
obj46 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, obj46);
i3 |= 1024;
obj28 = obj28;
obj47 = obj47;
obj34 = obj49;
obj33 = obj26;
case 11:
obj26 = obj33;
obj47 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, AdPayload.TpatSerializer.INSTANCE, obj47);
i3 |= 2048;
obj28 = obj28;
obj34 = obj49;
obj33 = obj26;
case 12:
obj26 = obj33;
i3 |= 4096;
obj34 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, StringSerializer.INSTANCE, obj49);
obj28 = obj28;
obj33 = obj26;
case 13:
obj27 = obj28;
obj33 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, StringSerializer.INSTANCE, obj33);
i3 |= 8192;
obj28 = obj27;
obj34 = obj49;
case 14:
obj26 = obj33;
obj48 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, new ArrayListSerializer(StringSerializer.INSTANCE), obj48);
i3 |= 16384;
obj34 = obj49;
obj33 = obj26;
case 15:
obj26 = obj33;
obj28 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, new ArrayListSerializer(StringSerializer.INSTANCE), obj28);
i2 = 32768;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 16:
obj26 = obj33;
obj32 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, AdPayload$ViewAbility$$serializer.INSTANCE, obj32);
i2 = 65536;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 17:
obj26 = obj33;
obj30 = beginStructure.decodeNullableSerializableElement(descriptor2, 17, StringSerializer.INSTANCE, obj30);
i2 = 131072;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 18:
obj26 = obj33;
obj31 = beginStructure.decodeNullableSerializableElement(descriptor2, 18, StringSerializer.INSTANCE, obj31);
i2 = 262144;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 19:
obj26 = obj33;
obj29 = beginStructure.decodeNullableSerializableElement(descriptor2, 19, AdPayload$TemplateSettings$$serializer.INSTANCE, obj29);
i2 = 524288;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 20:
obj26 = obj33;
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 20, StringSerializer.INSTANCE, obj4);
i2 = 1048576;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 21:
obj26 = obj33;
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 21, StringSerializer.INSTANCE, obj3);
i2 = 2097152;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 22:
obj26 = obj33;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 22, IntSerializer.INSTANCE, obj);
i2 = 4194304;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 23:
obj26 = obj33;
obj35 = beginStructure.decodeNullableSerializableElement(descriptor2, 23, IntSerializer.INSTANCE, obj35);
i2 = 8388608;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
case 24:
obj26 = obj33;
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 24, AdPayload$AdSizeInfo$$serializer.INSTANCE, obj2);
i2 = 16777216;
i3 |= i2;
obj34 = obj49;
obj33 = obj26;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
Object obj50 = obj28;
obj5 = obj33;
obj6 = obj34;
obj7 = obj36;
obj8 = obj43;
obj9 = obj44;
obj10 = obj46;
obj11 = obj47;
obj12 = obj29;
obj13 = obj30;
obj14 = obj31;
i = i3;
obj15 = obj48;
obj16 = obj50;
obj17 = obj37;
obj18 = obj39;
obj19 = obj40;
obj20 = obj41;
obj21 = obj42;
obj22 = obj32;
obj23 = obj35;
obj24 = obj38;
obj25 = obj45;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.AdUnit(i, (String) obj7, (String) obj17, (String) obj24, (Integer) obj18, (String) obj19, (Boolean) obj20, (Boolean) obj21, (Boolean) obj8, (String) obj9, (Integer) obj25, (Integer) obj10, (Map) obj11, (String) obj6, (String) obj5, (List) obj15, (List) obj16, (AdPayload.ViewAbility) obj22, (String) obj13, (String) obj14, (AdPayload.TemplateSettings) obj12, (String) obj4, (String) obj3, (Integer) obj, (Integer) obj23, (AdPayload.AdSizeInfo) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.AdUnit value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.AdUnit.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,106 @@
package com.vungle.ads.internal.model;
import com.facebook.share.internal.ShareConstants;
import com.vungle.ads.internal.model.AdPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$CacheableReplacement$$serializer implements GeneratedSerializer<AdPayload.CacheableReplacement> {
public static final AdPayload$CacheableReplacement$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$CacheableReplacement$$serializer adPayload$CacheableReplacement$$serializer = new AdPayload$CacheableReplacement$$serializer();
INSTANCE = adPayload$CacheableReplacement$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.CacheableReplacement", adPayload$CacheableReplacement$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement("url", true);
pluginGeneratedSerialDescriptor.addElement(ShareConstants.MEDIA_EXTENSION, true);
pluginGeneratedSerialDescriptor.addElement("required", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$CacheableReplacement$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.CacheableReplacement m3908deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Object obj3;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj4 = null;
if (beginStructure.decodeSequentially()) {
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, BooleanSerializer.INSTANCE, (Object) null);
i = 7;
} else {
boolean z = true;
int i2 = 0;
Object obj5 = null;
Object obj6 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj4);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj5);
i2 |= 2;
} else {
if (decodeElementIndex != 2) {
throw new UnknownFieldException(decodeElementIndex);
}
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, BooleanSerializer.INSTANCE, obj6);
i2 |= 4;
}
}
obj = obj5;
obj2 = obj6;
Object obj7 = obj4;
i = i2;
obj3 = obj7;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.CacheableReplacement(i, (String) obj3, (String) obj, (Boolean) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.CacheableReplacement value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.CacheableReplacement.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,94 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.AdPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$PlacementAdUnit$$serializer implements GeneratedSerializer<AdPayload.PlacementAdUnit> {
public static final AdPayload$PlacementAdUnit$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$PlacementAdUnit$$serializer adPayload$PlacementAdUnit$$serializer = new AdPayload$PlacementAdUnit$$serializer();
INSTANCE = adPayload$PlacementAdUnit$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.PlacementAdUnit", adPayload$PlacementAdUnit$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("placement_reference_id", true);
pluginGeneratedSerialDescriptor.addElement("ad_markup", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$PlacementAdUnit$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(AdPayload$AdUnit$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.PlacementAdUnit m3909deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, AdPayload$AdUnit$$serializer.INSTANCE, (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, AdPayload$AdUnit$$serializer.INSTANCE, obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.PlacementAdUnit(i, (String) obj, (AdPayload.AdUnit) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.PlacementAdUnit value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.PlacementAdUnit.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,96 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.AdPayload;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LinkedHashMapSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$TemplateSettings$$serializer implements GeneratedSerializer<AdPayload.TemplateSettings> {
public static final AdPayload$TemplateSettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$TemplateSettings$$serializer adPayload$TemplateSettings$$serializer = new AdPayload$TemplateSettings$$serializer();
INSTANCE = adPayload$TemplateSettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.TemplateSettings", adPayload$TemplateSettings$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("normal_replacements", true);
pluginGeneratedSerialDescriptor.addElement("cacheable_replacements", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$TemplateSettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(new LinkedHashMapSerializer(StringSerializer.INSTANCE, AdPayload$CacheableReplacement$$serializer.INSTANCE))};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.TemplateSettings m3910deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, new LinkedHashMapSerializer(StringSerializer.INSTANCE, AdPayload$CacheableReplacement$$serializer.INSTANCE), (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, new LinkedHashMapSerializer(StringSerializer.INSTANCE, AdPayload$CacheableReplacement$$serializer.INSTANCE), obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.TemplateSettings(i, (Map) obj, (Map) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.TemplateSettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.TemplateSettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,83 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.AdPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class AdPayload$ViewAbility$$serializer implements GeneratedSerializer<AdPayload.ViewAbility> {
public static final AdPayload$ViewAbility$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$ViewAbility$$serializer adPayload$ViewAbility$$serializer = new AdPayload$ViewAbility$$serializer();
INSTANCE = adPayload$ViewAbility$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.ViewAbility", adPayload$ViewAbility$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("om", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$ViewAbility$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(AdPayload$ViewAbilityInfo$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.ViewAbility m3911deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, AdPayload$ViewAbilityInfo$$serializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, AdPayload$ViewAbilityInfo$$serializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.ViewAbility(i, (AdPayload.ViewAbilityInfo) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, AdPayload.ViewAbility value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.ViewAbility.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,96 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.AdPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AdPayload$ViewAbilityInfo$$serializer implements GeneratedSerializer<AdPayload.ViewAbilityInfo> {
public static final AdPayload$ViewAbilityInfo$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AdPayload$ViewAbilityInfo$$serializer adPayload$ViewAbilityInfo$$serializer = new AdPayload$ViewAbilityInfo$$serializer();
INSTANCE = adPayload$ViewAbilityInfo$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AdPayload.ViewAbilityInfo", adPayload$ViewAbilityInfo$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("is_enabled", true);
pluginGeneratedSerialDescriptor.addElement("extra_vast", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private AdPayload$ViewAbilityInfo$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AdPayload.ViewAbilityInfo m3912deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
SerializationConstructorMarker serializationConstructorMarker = null;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AdPayload.ViewAbilityInfo(i, (Boolean) obj, (String) obj2, serializationConstructorMarker);
}
public void serialize(Encoder encoder, AdPayload.ViewAbilityInfo value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AdPayload.ViewAbilityInfo.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
package com.vungle.ads.internal.model;
/* loaded from: classes4.dex */
public final class AdvertisingInfo {
private String advertisingId;
private boolean limitAdTracking;
public final String getAdvertisingId() {
return this.advertisingId;
}
public final boolean getLimitAdTracking() {
return this.limitAdTracking;
}
public final void setAdvertisingId(String str) {
this.advertisingId = str;
}
public final void setLimitAdTracking(boolean z) {
this.limitAdTracking = z;
}
}

View File

@@ -0,0 +1,103 @@
package com.vungle.ads.internal.model;
import com.tapjoy.TJAdUnitConstants;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class AppNode$$serializer implements GeneratedSerializer<AppNode> {
public static final AppNode$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
AppNode$$serializer appNode$$serializer = new AppNode$$serializer();
INSTANCE = appNode$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.AppNode", appNode$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement(TJAdUnitConstants.String.BUNDLE, false);
pluginGeneratedSerialDescriptor.addElement("ver", false);
pluginGeneratedSerialDescriptor.addElement("id", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private AppNode$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public AppNode m3913deserialize(Decoder decoder) {
String str;
String str2;
String str3;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
String decodeStringElement = beginStructure.decodeStringElement(descriptor2, 0);
String decodeStringElement2 = beginStructure.decodeStringElement(descriptor2, 1);
str = decodeStringElement;
str2 = beginStructure.decodeStringElement(descriptor2, 2);
str3 = decodeStringElement2;
i = 7;
} else {
String str4 = null;
String str5 = null;
String str6 = null;
boolean z = true;
int i2 = 0;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
str4 = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
} else if (decodeElementIndex == 1) {
str6 = beginStructure.decodeStringElement(descriptor2, 1);
i2 |= 2;
} else {
if (decodeElementIndex != 2) {
throw new UnknownFieldException(decodeElementIndex);
}
str5 = beginStructure.decodeStringElement(descriptor2, 2);
i2 |= 4;
}
}
str = str4;
str2 = str5;
str3 = str6;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new AppNode(i, str, str3, str2, null);
}
public void serialize(Encoder encoder, AppNode value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
AppNode.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,127 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
@Serializable
/* loaded from: classes4.dex */
public final class AppNode {
public static final Companion Companion = new Companion(null);
private final String appId;
private final String bundle;
private final String ver;
public static /* synthetic */ AppNode copy$default(AppNode appNode, String str, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str = appNode.bundle;
}
if ((i & 2) != 0) {
str2 = appNode.ver;
}
if ((i & 4) != 0) {
str3 = appNode.appId;
}
return appNode.copy(str, str2, str3);
}
@SerialName("id")
public static /* synthetic */ void getAppId$annotations() {
}
public final String component1() {
return this.bundle;
}
public final String component2() {
return this.ver;
}
public final String component3() {
return this.appId;
}
public final AppNode copy(String bundle, String ver, String appId) {
Intrinsics.checkNotNullParameter(bundle, "bundle");
Intrinsics.checkNotNullParameter(ver, "ver");
Intrinsics.checkNotNullParameter(appId, "appId");
return new AppNode(bundle, ver, appId);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof AppNode)) {
return false;
}
AppNode appNode = (AppNode) obj;
return Intrinsics.areEqual(this.bundle, appNode.bundle) && Intrinsics.areEqual(this.ver, appNode.ver) && Intrinsics.areEqual(this.appId, appNode.appId);
}
public final String getAppId() {
return this.appId;
}
public final String getBundle() {
return this.bundle;
}
public final String getVer() {
return this.ver;
}
public int hashCode() {
return (((this.bundle.hashCode() * 31) + this.ver.hashCode()) * 31) + this.appId.hashCode();
}
public String toString() {
return "AppNode(bundle=" + this.bundle + ", ver=" + this.ver + ", appId=" + this.appId + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<AppNode> serializer() {
return AppNode$$serializer.INSTANCE;
}
}
public /* synthetic */ AppNode(int i, String str, String str2, @SerialName("id") String str3, SerializationConstructorMarker serializationConstructorMarker) {
if (7 != (i & 7)) {
PluginExceptionsKt.throwMissingFieldException(i, 7, AppNode$$serializer.INSTANCE.getDescriptor());
}
this.bundle = str;
this.ver = str2;
this.appId = str3;
}
public AppNode(String bundle, String ver, String appId) {
Intrinsics.checkNotNullParameter(bundle, "bundle");
Intrinsics.checkNotNullParameter(ver, "ver");
Intrinsics.checkNotNullParameter(appId, "appId");
this.bundle = bundle;
this.ver = ver;
this.appId = appId;
}
public static final void write$Self(AppNode self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
output.encodeStringElement(serialDesc, 0, self.bundle);
output.encodeStringElement(serialDesc, 1, self.ver);
output.encodeStringElement(serialDesc, 2, self.appId);
}
}

View File

@@ -0,0 +1,290 @@
package com.vungle.ads.internal.model;
import android.util.Base64;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.zip.GZIPInputStream;
import kotlin.Unit;
import kotlin.io.CloseableKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.serialization.DeserializationStrategy;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.Transient;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.ArrayListSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
@Serializable
/* loaded from: classes4.dex */
public final class BidPayload {
public static final Companion Companion = new Companion(null);
private final AdPayload ad;
private final String adunit;
private final List<String> impression;
private final Json json;
private final Integer version;
public BidPayload() {
this(null, null, null, 7, null);
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ BidPayload copy$default(BidPayload bidPayload, Integer num, String str, List list, int i, Object obj) {
if ((i & 1) != 0) {
num = bidPayload.version;
}
if ((i & 2) != 0) {
str = bidPayload.adunit;
}
if ((i & 4) != 0) {
list = bidPayload.impression;
}
return bidPayload.copy(num, str, list);
}
@Transient
private static /* synthetic */ void getJson$annotations() {
}
public final Integer component1() {
return this.version;
}
public final String component2() {
return this.adunit;
}
public final List<String> component3() {
return this.impression;
}
public final BidPayload copy(Integer num, String str, List<String> list) {
return new BidPayload(num, str, list);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof BidPayload)) {
return false;
}
BidPayload bidPayload = (BidPayload) obj;
return Intrinsics.areEqual(this.version, bidPayload.version) && Intrinsics.areEqual(this.adunit, bidPayload.adunit) && Intrinsics.areEqual(this.impression, bidPayload.impression);
}
public final AdPayload getAdPayload() {
return this.ad;
}
public final String getAdunit() {
return this.adunit;
}
public final List<String> getImpression() {
return this.impression;
}
public final Integer getVersion() {
return this.version;
}
public int hashCode() {
Integer num = this.version;
int hashCode = (num == null ? 0 : num.hashCode()) * 31;
String str = this.adunit;
int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
List<String> list = this.impression;
return hashCode2 + (list != null ? list.hashCode() : 0);
}
public String toString() {
return "BidPayload(version=" + this.version + ", adunit=" + this.adunit + ", impression=" + this.impression + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<BidPayload> serializer() {
return BidPayload$$serializer.INSTANCE;
}
}
public /* synthetic */ BidPayload(int i, Integer num, String str, List list, AdPayload adPayload, SerializationConstructorMarker serializationConstructorMarker) {
String decodedAdsResponse;
AdPayload adPayload2 = null;
if ((i & 1) == 0) {
this.version = null;
} else {
this.version = num;
}
if ((i & 2) == 0) {
this.adunit = null;
} else {
this.adunit = str;
}
if ((i & 4) == 0) {
this.impression = null;
} else {
this.impression = list;
}
StringFormat Json$default = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.model.BidPayload.1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
this.json = Json$default;
if ((i & 8) != 0) {
this.ad = adPayload;
return;
}
if (this.adunit != null && (decodedAdsResponse = getDecodedAdsResponse()) != null) {
StringFormat stringFormat = Json$default;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(AdPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
adPayload2 = (AdPayload) stringFormat.decodeFromString(serializer, decodedAdsResponse);
}
this.ad = adPayload2;
}
public BidPayload(Integer num, String str, List<String> list) {
String decodedAdsResponse;
this.version = num;
this.adunit = str;
this.impression = list;
AdPayload adPayload = null;
StringFormat Json$default = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.model.BidPayload$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
this.json = Json$default;
if (str != null && (decodedAdsResponse = getDecodedAdsResponse()) != null) {
StringFormat stringFormat = Json$default;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(AdPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
adPayload = (AdPayload) stringFormat.decodeFromString(serializer, decodedAdsResponse);
}
this.ad = adPayload;
}
public static final void write$Self(BidPayload self, CompositeEncoder output, SerialDescriptor serialDesc) {
String decodedAdsResponse;
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.version != null) {
output.encodeNullableSerializableElement(serialDesc, 0, IntSerializer.INSTANCE, self.version);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.adunit != null) {
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.adunit);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.impression != null) {
output.encodeNullableSerializableElement(serialDesc, 2, new ArrayListSerializer(StringSerializer.INSTANCE), self.impression);
}
if (!output.shouldEncodeElementDefault(serialDesc, 3)) {
AdPayload adPayload = self.ad;
AdPayload adPayload2 = null;
if (self.adunit != null && (decodedAdsResponse = self.getDecodedAdsResponse()) != null) {
StringFormat stringFormat = self.json;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(AdPayload.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
adPayload2 = (AdPayload) stringFormat.decodeFromString(serializer, decodedAdsResponse);
}
if (Intrinsics.areEqual(adPayload, adPayload2)) {
return;
}
}
output.encodeNullableSerializableElement(serialDesc, 3, AdPayload$$serializer.INSTANCE, self.ad);
}
public /* synthetic */ BidPayload(Integer num, String str, List list, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : num, (i & 2) != 0 ? null : str, (i & 4) != 0 ? null : list);
}
public final String getPlacementId() {
AdPayload adPayload = this.ad;
if (adPayload != null) {
return adPayload.placementId();
}
return null;
}
public final String getEventId() {
AdPayload adPayload = this.ad;
if (adPayload != null) {
return adPayload.eventId();
}
return null;
}
public final String getDecodedAdsResponse() throws Throwable {
byte[] decode = Base64.decode(this.adunit, 0);
if (decode != null) {
return gzipDecode(decode);
}
return null;
}
private final String gzipDecode(byte[] bArr) throws Throwable {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bArr);
try {
GZIPInputStream gZIPInputStream = new GZIPInputStream(byteArrayInputStream, 1024);
try {
byte[] bArr2 = new byte[1024];
while (true) {
int read = gZIPInputStream.read(bArr2);
if (read != -1) {
byteArrayOutputStream.write(bArr2, 0, read);
} else {
Unit unit = Unit.INSTANCE;
CloseableKt.closeFinally(gZIPInputStream, null);
CloseableKt.closeFinally(byteArrayInputStream, null);
String byteArrayOutputStream2 = byteArrayOutputStream.toString();
Intrinsics.checkNotNullExpressionValue(byteArrayOutputStream2, "result.toString()");
return byteArrayOutputStream2;
}
}
} finally {
}
} finally {
}
}
}

View File

@@ -0,0 +1,120 @@
package com.vungle.ads.internal.model;
import com.mbridge.msdk.MBridgeConstans;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class CommonRequestBody$$serializer implements GeneratedSerializer<CommonRequestBody> {
public static final CommonRequestBody$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$$serializer commonRequestBody$$serializer = new CommonRequestBody$$serializer();
INSTANCE = commonRequestBody$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody", commonRequestBody$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement("device", false);
pluginGeneratedSerialDescriptor.addElement(MBridgeConstans.DYNAMIC_VIEW_WX_APP, true);
pluginGeneratedSerialDescriptor.addElement("user", true);
pluginGeneratedSerialDescriptor.addElement("ext", true);
pluginGeneratedSerialDescriptor.addElement("request", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) DeviceNode$$serializer.INSTANCE, BuiltinSerializersKt.getNullable(AppNode$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$User$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$RequestExt$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$RequestParam$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody m3915deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
int i;
Object obj5;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj6 = null;
if (beginStructure.decodeSequentially()) {
obj5 = beginStructure.decodeSerializableElement(descriptor2, 0, DeviceNode$$serializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, AppNode$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$User$$serializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, CommonRequestBody$RequestExt$$serializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, CommonRequestBody$RequestParam$$serializer.INSTANCE, (Object) null);
i = 31;
} else {
boolean z = true;
int i2 = 0;
Object obj7 = null;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj6 = beginStructure.decodeSerializableElement(descriptor2, 0, DeviceNode$$serializer.INSTANCE, obj6);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, AppNode$$serializer.INSTANCE, obj7);
i2 |= 2;
} else if (decodeElementIndex == 2) {
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$User$$serializer.INSTANCE, obj8);
i2 |= 4;
} else if (decodeElementIndex == 3) {
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, CommonRequestBody$RequestExt$$serializer.INSTANCE, obj9);
i2 |= 8;
} else {
if (decodeElementIndex != 4) {
throw new UnknownFieldException(decodeElementIndex);
}
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, CommonRequestBody$RequestParam$$serializer.INSTANCE, obj10);
i2 |= 16;
}
}
obj = obj7;
obj2 = obj8;
obj3 = obj9;
obj4 = obj10;
Object obj11 = obj6;
i = i2;
obj5 = obj11;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody(i, (DeviceNode) obj5, (AppNode) obj, (CommonRequestBody.User) obj2, (CommonRequestBody.RequestExt) obj3, (CommonRequestBody.RequestParam) obj4, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, CommonRequestBody value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,92 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
/* loaded from: classes4.dex */
public final class CommonRequestBody$AdSizeParam$$serializer implements GeneratedSerializer<CommonRequestBody.AdSizeParam> {
public static final CommonRequestBody$AdSizeParam$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$AdSizeParam$$serializer commonRequestBody$AdSizeParam$$serializer = new CommonRequestBody$AdSizeParam$$serializer();
INSTANCE = commonRequestBody$AdSizeParam$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.AdSizeParam", commonRequestBody$AdSizeParam$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("w", false);
pluginGeneratedSerialDescriptor.addElement("h", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$AdSizeParam$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) IntSerializer.INSTANCE, (KSerializer) IntSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.AdSizeParam m3916deserialize(Decoder decoder) {
int i;
int i2;
int i3;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
i = beginStructure.decodeIntElement(descriptor2, 0);
i2 = beginStructure.decodeIntElement(descriptor2, 1);
i3 = 3;
} else {
boolean z = true;
i = 0;
int i4 = 0;
int i5 = 0;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
i = beginStructure.decodeIntElement(descriptor2, 0);
i5 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
i4 = beginStructure.decodeIntElement(descriptor2, 1);
i5 |= 2;
}
}
i2 = i4;
i3 = i5;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.AdSizeParam(i3, i, i2, null);
}
public void serialize(Encoder encoder, CommonRequestBody.AdSizeParam value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.AdSizeParam.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,84 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class CommonRequestBody$CCPA$$serializer implements GeneratedSerializer<CommonRequestBody.CCPA> {
public static final CommonRequestBody$CCPA$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$CCPA$$serializer commonRequestBody$CCPA$$serializer = new CommonRequestBody$CCPA$$serializer();
INSTANCE = commonRequestBody$CCPA$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.CCPA", commonRequestBody$CCPA$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("status", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$CCPA$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.CCPA m3917deserialize(Decoder decoder) {
String str;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
SerializationConstructorMarker serializationConstructorMarker = null;
if (beginStructure.decodeSequentially()) {
str = beginStructure.decodeStringElement(descriptor2, 0);
} else {
int i2 = 0;
str = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
str = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.CCPA(i, str, serializationConstructorMarker);
}
public void serialize(Encoder encoder, CommonRequestBody.CCPA value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.CCPA.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,85 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class CommonRequestBody$COPPA$$serializer implements GeneratedSerializer<CommonRequestBody.COPPA> {
public static final CommonRequestBody$COPPA$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$COPPA$$serializer commonRequestBody$COPPA$$serializer = new CommonRequestBody$COPPA$$serializer();
INSTANCE = commonRequestBody$COPPA$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.COPPA", commonRequestBody$COPPA$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement(Cookie.COPPA_STATUS_KEY, false);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$COPPA$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.COPPA m3918deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
SerializationConstructorMarker serializationConstructorMarker = null;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.COPPA(i, (Boolean) obj, serializationConstructorMarker);
}
public void serialize(Encoder encoder, CommonRequestBody.COPPA value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.COPPA.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,113 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class CommonRequestBody$GDPR$$serializer implements GeneratedSerializer<CommonRequestBody.GDPR> {
public static final CommonRequestBody$GDPR$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$GDPR$$serializer commonRequestBody$GDPR$$serializer = new CommonRequestBody$GDPR$$serializer();
INSTANCE = commonRequestBody$GDPR$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.GDPR", commonRequestBody$GDPR$$serializer, 4);
pluginGeneratedSerialDescriptor.addElement("consent_status", false);
pluginGeneratedSerialDescriptor.addElement("consent_source", false);
pluginGeneratedSerialDescriptor.addElement("consent_timestamp", false);
pluginGeneratedSerialDescriptor.addElement("consent_message_version", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$GDPR$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE, (KSerializer) LongSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.GDPR m3919deserialize(Decoder decoder) {
String str;
String str2;
int i;
String str3;
long j;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
String decodeStringElement = beginStructure.decodeStringElement(descriptor2, 0);
String decodeStringElement2 = beginStructure.decodeStringElement(descriptor2, 1);
long decodeLongElement = beginStructure.decodeLongElement(descriptor2, 2);
str = decodeStringElement;
str2 = beginStructure.decodeStringElement(descriptor2, 3);
i = 15;
str3 = decodeStringElement2;
j = decodeLongElement;
} else {
String str4 = null;
String str5 = null;
boolean z = true;
long j2 = 0;
String str6 = null;
int i2 = 0;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
str4 = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
} else if (decodeElementIndex == 1) {
str5 = beginStructure.decodeStringElement(descriptor2, 1);
i2 |= 2;
} else if (decodeElementIndex == 2) {
j2 = beginStructure.decodeLongElement(descriptor2, 2);
i2 |= 4;
} else {
if (decodeElementIndex != 3) {
throw new UnknownFieldException(decodeElementIndex);
}
str6 = beginStructure.decodeStringElement(descriptor2, 3);
i2 |= 8;
}
}
str = str4;
str2 = str6;
i = i2;
str3 = str5;
j = j2;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.GDPR(i, str, str3, j, str2, null);
}
public void serialize(Encoder encoder, CommonRequestBody.GDPR value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.GDPR.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,82 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class CommonRequestBody$IAB$$serializer implements GeneratedSerializer<CommonRequestBody.IAB> {
public static final CommonRequestBody$IAB$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$IAB$$serializer commonRequestBody$IAB$$serializer = new CommonRequestBody$IAB$$serializer();
INSTANCE = commonRequestBody$IAB$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.IAB", commonRequestBody$IAB$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("tcf", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$IAB$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.IAB m3920deserialize(Decoder decoder) {
String str;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
if (beginStructure.decodeSequentially()) {
str = beginStructure.decodeStringElement(descriptor2, 0);
} else {
int i2 = 0;
str = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
str = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.IAB(i, str, null);
}
public void serialize(Encoder encoder, CommonRequestBody.IAB value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.IAB.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,105 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class CommonRequestBody$RequestExt$$serializer implements GeneratedSerializer<CommonRequestBody.RequestExt> {
public static final CommonRequestBody$RequestExt$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$RequestExt$$serializer commonRequestBody$RequestExt$$serializer = new CommonRequestBody$RequestExt$$serializer();
INSTANCE = commonRequestBody$RequestExt$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.RequestExt", commonRequestBody$RequestExt$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement(Cookie.CONFIG_EXTENSION, true);
pluginGeneratedSerialDescriptor.addElement("signals", true);
pluginGeneratedSerialDescriptor.addElement("config_last_validated_ts", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$RequestExt$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(LongSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.RequestExt m3921deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Object obj3;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj4 = null;
if (beginStructure.decodeSequentially()) {
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, LongSerializer.INSTANCE, (Object) null);
i = 7;
} else {
boolean z = true;
int i2 = 0;
Object obj5 = null;
Object obj6 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj4);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj5);
i2 |= 2;
} else {
if (decodeElementIndex != 2) {
throw new UnknownFieldException(decodeElementIndex);
}
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, LongSerializer.INSTANCE, obj6);
i2 |= 4;
}
}
obj = obj5;
obj2 = obj6;
Object obj7 = obj4;
i = i2;
obj3 = obj7;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.RequestExt(i, (String) obj3, (String) obj, (Long) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, CommonRequestBody.RequestExt value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.RequestExt.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,135 @@
package com.vungle.ads.internal.model;
import com.ironsource.jo;
import com.vungle.ads.internal.model.CommonRequestBody;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.ArrayListSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class CommonRequestBody$RequestParam$$serializer implements GeneratedSerializer<CommonRequestBody.RequestParam> {
public static final CommonRequestBody$RequestParam$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$RequestParam$$serializer commonRequestBody$RequestParam$$serializer = new CommonRequestBody$RequestParam$$serializer();
INSTANCE = commonRequestBody$RequestParam$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.RequestParam", commonRequestBody$RequestParam$$serializer, 6);
pluginGeneratedSerialDescriptor.addElement(jo.c, true);
pluginGeneratedSerialDescriptor.addElement("ad_size", true);
pluginGeneratedSerialDescriptor.addElement("ad_start_time", true);
pluginGeneratedSerialDescriptor.addElement("app_id", true);
pluginGeneratedSerialDescriptor.addElement("placement_reference_id", true);
pluginGeneratedSerialDescriptor.addElement("user", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$RequestParam$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(new ArrayListSerializer(StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(CommonRequestBody$AdSizeParam$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(LongSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.RequestParam m3922deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
int i;
Object obj6;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i2 = 5;
Object obj7 = null;
if (beginStructure.decodeSequentially()) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new ArrayListSerializer(StringSerializer.INSTANCE), (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$AdSizeParam$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, LongSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, (Object) null);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, StringSerializer.INSTANCE, (Object) null);
i = 63;
} else {
boolean z = true;
int i3 = 0;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
Object obj11 = null;
Object obj12 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
z = false;
i2 = 5;
case 0:
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, new ArrayListSerializer(StringSerializer.INSTANCE), obj7);
i3 |= 1;
i2 = 5;
case 1:
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$AdSizeParam$$serializer.INSTANCE, obj8);
i3 |= 2;
case 2:
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, LongSerializer.INSTANCE, obj9);
i3 |= 4;
case 3:
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, obj10);
i3 |= 8;
case 4:
obj11 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, obj11);
i3 |= 16;
case 5:
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, i2, StringSerializer.INSTANCE, obj12);
i3 |= 32;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
obj = obj8;
obj2 = obj9;
obj3 = obj10;
obj4 = obj11;
obj5 = obj12;
Object obj13 = obj7;
i = i3;
obj6 = obj13;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.RequestParam(i, (List) obj6, (CommonRequestBody.AdSizeParam) obj, (Long) obj2, (String) obj3, (String) obj4, (String) obj5, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, CommonRequestBody.RequestParam value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.RequestParam.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,122 @@
package com.vungle.ads.internal.model;
import com.tapjoy.TapjoyConstants;
import com.vungle.ads.fpd.FirstPartyData;
import com.vungle.ads.fpd.FirstPartyData$$serializer;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class CommonRequestBody$User$$serializer implements GeneratedSerializer<CommonRequestBody.User> {
public static final CommonRequestBody$User$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
CommonRequestBody$User$$serializer commonRequestBody$User$$serializer = new CommonRequestBody$User$$serializer();
INSTANCE = commonRequestBody$User$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.CommonRequestBody.User", commonRequestBody$User$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement(TapjoyConstants.PREF_SUBJECT_TO_GDPR, true);
pluginGeneratedSerialDescriptor.addElement("ccpa", true);
pluginGeneratedSerialDescriptor.addElement("coppa", true);
pluginGeneratedSerialDescriptor.addElement("fpd", true);
pluginGeneratedSerialDescriptor.addElement("iab", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private CommonRequestBody$User$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(CommonRequestBody$GDPR$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$CCPA$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$COPPA$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(FirstPartyData$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$IAB$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public CommonRequestBody.User m3923deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
int i;
Object obj5;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj6 = null;
if (beginStructure.decodeSequentially()) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, CommonRequestBody$GDPR$$serializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$CCPA$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$COPPA$$serializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, FirstPartyData$$serializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, CommonRequestBody$IAB$$serializer.INSTANCE, (Object) null);
i = 31;
} else {
boolean z = true;
int i2 = 0;
Object obj7 = null;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, CommonRequestBody$GDPR$$serializer.INSTANCE, obj6);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$CCPA$$serializer.INSTANCE, obj7);
i2 |= 2;
} else if (decodeElementIndex == 2) {
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$COPPA$$serializer.INSTANCE, obj8);
i2 |= 4;
} else if (decodeElementIndex == 3) {
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, FirstPartyData$$serializer.INSTANCE, obj9);
i2 |= 8;
} else {
if (decodeElementIndex != 4) {
throw new UnknownFieldException(decodeElementIndex);
}
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, CommonRequestBody$IAB$$serializer.INSTANCE, obj10);
i2 |= 16;
}
}
obj = obj7;
obj2 = obj8;
obj3 = obj9;
obj4 = obj10;
Object obj11 = obj6;
i = i2;
obj5 = obj11;
}
beginStructure.endStructure(descriptor2);
return new CommonRequestBody.User(i, (CommonRequestBody.GDPR) obj5, (CommonRequestBody.CCPA) obj, (CommonRequestBody.COPPA) obj2, (FirstPartyData) obj3, (CommonRequestBody.IAB) obj4, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, CommonRequestBody.User value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
CommonRequestBody.User.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,133 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class ConfigExtension {
public static final Companion Companion = new Companion(null);
private final String configExt;
private final Boolean needRefresh;
/* JADX WARN: Multi-variable type inference failed */
public ConfigExtension() {
this((Boolean) null, (String) (0 == true ? 1 : 0), 3, (DefaultConstructorMarker) (0 == true ? 1 : 0));
}
public static /* synthetic */ ConfigExtension copy$default(ConfigExtension configExtension, Boolean bool, String str, int i, Object obj) {
if ((i & 1) != 0) {
bool = configExtension.needRefresh;
}
if ((i & 2) != 0) {
str = configExtension.configExt;
}
return configExtension.copy(bool, str);
}
@SerialName(Cookie.CONFIG_EXTENSION)
public static /* synthetic */ void getConfigExt$annotations() {
}
@SerialName("need_refresh")
public static /* synthetic */ void getNeedRefresh$annotations() {
}
public final Boolean component1() {
return this.needRefresh;
}
public final String component2() {
return this.configExt;
}
public final ConfigExtension copy(Boolean bool, String str) {
return new ConfigExtension(bool, str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ConfigExtension)) {
return false;
}
ConfigExtension configExtension = (ConfigExtension) obj;
return Intrinsics.areEqual(this.needRefresh, configExtension.needRefresh) && Intrinsics.areEqual(this.configExt, configExtension.configExt);
}
public final String getConfigExt() {
return this.configExt;
}
public final Boolean getNeedRefresh() {
return this.needRefresh;
}
public int hashCode() {
Boolean bool = this.needRefresh;
int hashCode = (bool == null ? 0 : bool.hashCode()) * 31;
String str = this.configExt;
return hashCode + (str != null ? str.hashCode() : 0);
}
public String toString() {
return "ConfigExtension(needRefresh=" + this.needRefresh + ", configExt=" + this.configExt + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<ConfigExtension> serializer() {
return ConfigExtension$$serializer.INSTANCE;
}
}
public /* synthetic */ ConfigExtension(int i, @SerialName("need_refresh") Boolean bool, @SerialName("config_extension") String str, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.needRefresh = null;
} else {
this.needRefresh = bool;
}
if ((i & 2) == 0) {
this.configExt = null;
} else {
this.configExt = str;
}
}
public ConfigExtension(Boolean bool, String str) {
this.needRefresh = bool;
this.configExt = str;
}
public static final void write$Self(ConfigExtension self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.needRefresh != null) {
output.encodeNullableSerializableElement(serialDesc, 0, BooleanSerializer.INSTANCE, self.needRefresh);
}
if (!output.shouldEncodeElementDefault(serialDesc, 1) && self.configExt == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.configExt);
}
public /* synthetic */ ConfigExtension(Boolean bool, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : bool, (i & 2) != 0 ? null : str);
}
}

View File

@@ -0,0 +1,313 @@
package com.vungle.ads.internal.model;
import com.ironsource.jo;
import com.vungle.ads.internal.model.ConfigPayload;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.ArrayListSerializer;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class ConfigPayload$$serializer implements GeneratedSerializer<ConfigPayload> {
public static final ConfigPayload$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$$serializer configPayload$$serializer = new ConfigPayload$$serializer();
INSTANCE = configPayload$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload", configPayload$$serializer, 18);
pluginGeneratedSerialDescriptor.addElement("reuse_assets", true);
pluginGeneratedSerialDescriptor.addElement("config", true);
pluginGeneratedSerialDescriptor.addElement("endpoints", true);
pluginGeneratedSerialDescriptor.addElement("log_metrics", true);
pluginGeneratedSerialDescriptor.addElement(jo.c, true);
pluginGeneratedSerialDescriptor.addElement("user", true);
pluginGeneratedSerialDescriptor.addElement("viewability", true);
pluginGeneratedSerialDescriptor.addElement(Cookie.CONFIG_EXTENSION, true);
pluginGeneratedSerialDescriptor.addElement(Cookie.COPPA_DISABLE_AD_ID, true);
pluginGeneratedSerialDescriptor.addElement("ri_enabled", true);
pluginGeneratedSerialDescriptor.addElement("session_timeout", true);
pluginGeneratedSerialDescriptor.addElement("wait_for_connectivity_for_tpat", true);
pluginGeneratedSerialDescriptor.addElement("sdk_session_timeout", true);
pluginGeneratedSerialDescriptor.addElement("cacheable_assets_required", true);
pluginGeneratedSerialDescriptor.addElement("signals_disabled", true);
pluginGeneratedSerialDescriptor.addElement("fpd_enabled", true);
pluginGeneratedSerialDescriptor.addElement("rta_debugging", true);
pluginGeneratedSerialDescriptor.addElement("config_last_validated_ts", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(ConfigPayload$CleverCache$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(ConfigPayload$ConfigSettings$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(ConfigPayload$Endpoints$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(ConfigPayload$LogMetricsSettings$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(new ArrayListSerializer(Placement$$serializer.INSTANCE)), BuiltinSerializersKt.getNullable(ConfigPayload$UserPrivacy$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(ConfigPayload$ViewAbilitySettings$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(LongSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload m3925deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
Object obj6;
Object obj7;
Object obj8;
Object obj9;
Object obj10;
Object obj11;
Object obj12;
Object obj13;
Object obj14;
Object obj15;
Object obj16;
int i;
Object obj17;
Object obj18;
Object obj19;
int i2;
Object obj20;
Object obj21;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
Object decodeNullableSerializableElement = beginStructure.decodeNullableSerializableElement(descriptor2, 0, ConfigPayload$CleverCache$$serializer.INSTANCE, (Object) null);
obj11 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$ConfigSettings$$serializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, ConfigPayload$Endpoints$$serializer.INSTANCE, (Object) null);
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, ConfigPayload$LogMetricsSettings$$serializer.INSTANCE, (Object) null);
obj13 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, new ArrayListSerializer(Placement$$serializer.INSTANCE), (Object) null);
obj15 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, ConfigPayload$UserPrivacy$$serializer.INSTANCE, (Object) null);
obj18 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, ConfigPayload$ViewAbilitySettings$$serializer.INSTANCE, (Object) null);
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, (Object) null);
obj17 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, BooleanSerializer.INSTANCE, (Object) null);
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, BooleanSerializer.INSTANCE, (Object) null);
obj16 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, (Object) null);
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, BooleanSerializer.INSTANCE, (Object) null);
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, IntSerializer.INSTANCE, (Object) null);
obj14 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, BooleanSerializer.INSTANCE, (Object) null);
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, BooleanSerializer.INSTANCE, (Object) null);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, BooleanSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, BooleanSerializer.INSTANCE, (Object) null);
obj3 = decodeNullableSerializableElement2;
i = 262143;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 17, LongSerializer.INSTANCE, (Object) null);
obj2 = decodeNullableSerializableElement;
} else {
boolean z = true;
Object obj22 = null;
Object obj23 = null;
obj = null;
Object obj24 = null;
Object obj25 = null;
Object obj26 = null;
Object obj27 = null;
Object obj28 = null;
Object obj29 = null;
Object obj30 = null;
Object obj31 = null;
Object obj32 = null;
Object obj33 = null;
Object obj34 = null;
Object obj35 = null;
Object obj36 = null;
Object obj37 = null;
int i3 = 0;
Object obj38 = null;
while (z) {
Object obj39 = obj31;
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
obj20 = obj22;
obj21 = obj32;
z = false;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 0:
obj20 = obj22;
obj21 = obj32;
obj33 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, ConfigPayload$CleverCache$$serializer.INSTANCE, obj33);
i3 |= 1;
obj34 = obj34;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 1:
obj20 = obj22;
obj21 = obj32;
obj34 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$ConfigSettings$$serializer.INSTANCE, obj34);
i3 |= 2;
obj35 = obj35;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 2:
obj20 = obj22;
obj21 = obj32;
obj35 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, ConfigPayload$Endpoints$$serializer.INSTANCE, obj35);
i3 |= 4;
obj36 = obj36;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 3:
obj20 = obj22;
obj21 = obj32;
obj36 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, ConfigPayload$LogMetricsSettings$$serializer.INSTANCE, obj36);
i3 |= 8;
obj37 = obj37;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 4:
obj20 = obj22;
obj21 = obj32;
obj39 = obj39;
obj37 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, new ArrayListSerializer(Placement$$serializer.INSTANCE), obj37);
i3 |= 16;
obj32 = obj21;
obj22 = obj20;
obj31 = obj39;
case 5:
obj31 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, ConfigPayload$UserPrivacy$$serializer.INSTANCE, obj39);
i3 |= 32;
obj32 = obj32;
obj22 = obj22;
case 6:
obj20 = obj22;
i3 |= 64;
obj32 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, ConfigPayload$ViewAbilitySettings$$serializer.INSTANCE, obj32);
obj22 = obj20;
obj31 = obj39;
case 7:
obj19 = obj32;
obj30 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, obj30);
i3 |= 128;
obj31 = obj39;
obj32 = obj19;
case 8:
obj19 = obj32;
obj29 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, BooleanSerializer.INSTANCE, obj29);
i3 |= 256;
obj31 = obj39;
obj32 = obj19;
case 9:
obj19 = obj32;
obj28 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, BooleanSerializer.INSTANCE, obj28);
i3 |= 512;
obj31 = obj39;
obj32 = obj19;
case 10:
obj19 = obj32;
obj23 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, obj23);
i3 |= 1024;
obj31 = obj39;
obj32 = obj19;
case 11:
obj19 = obj32;
obj27 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, BooleanSerializer.INSTANCE, obj27);
i3 |= 2048;
obj31 = obj39;
obj32 = obj19;
case 12:
obj19 = obj32;
obj26 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, IntSerializer.INSTANCE, obj26);
i3 |= 4096;
obj31 = obj39;
obj32 = obj19;
case 13:
obj19 = obj32;
obj22 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, BooleanSerializer.INSTANCE, obj22);
i3 |= 8192;
obj31 = obj39;
obj32 = obj19;
case 14:
obj19 = obj32;
obj25 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, BooleanSerializer.INSTANCE, obj25);
i3 |= 16384;
obj31 = obj39;
obj32 = obj19;
case 15:
obj19 = obj32;
obj38 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, BooleanSerializer.INSTANCE, obj38);
i2 = 32768;
i3 |= i2;
obj31 = obj39;
obj32 = obj19;
case 16:
obj19 = obj32;
obj24 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, BooleanSerializer.INSTANCE, obj24);
i2 = 65536;
i3 |= i2;
obj31 = obj39;
obj32 = obj19;
case 17:
obj19 = obj32;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 17, LongSerializer.INSTANCE, obj);
i2 = 131072;
i3 |= i2;
obj31 = obj39;
obj32 = obj19;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
Object obj40 = obj22;
Object obj41 = obj31;
obj2 = obj33;
obj3 = obj35;
obj4 = obj24;
obj5 = obj38;
obj6 = obj25;
obj7 = obj26;
obj8 = obj27;
obj9 = obj28;
obj10 = obj30;
obj11 = obj34;
obj12 = obj36;
obj13 = obj37;
obj14 = obj40;
obj15 = obj41;
obj16 = obj23;
i = i3;
obj17 = obj29;
obj18 = obj32;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload(i, (ConfigPayload.CleverCache) obj2, (ConfigPayload.ConfigSettings) obj11, (ConfigPayload.Endpoints) obj3, (ConfigPayload.LogMetricsSettings) obj12, (List) obj13, (ConfigPayload.UserPrivacy) obj15, (ConfigPayload.ViewAbilitySettings) obj18, (String) obj10, (Boolean) obj17, (Boolean) obj9, (Integer) obj16, (Boolean) obj8, (Integer) obj7, (Boolean) obj14, (Boolean) obj6, (Boolean) obj5, (Boolean) obj4, (Long) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,106 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$CleverCache$$serializer implements GeneratedSerializer<ConfigPayload.CleverCache> {
public static final ConfigPayload$CleverCache$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$CleverCache$$serializer configPayload$CleverCache$$serializer = new ConfigPayload$CleverCache$$serializer();
INSTANCE = configPayload$CleverCache$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.CleverCache", configPayload$CleverCache$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement("enabled", true);
pluginGeneratedSerialDescriptor.addElement("disk_size", true);
pluginGeneratedSerialDescriptor.addElement("disk_percentage", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$CleverCache$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(LongSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.CleverCache m3926deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Object obj3;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj4 = null;
if (beginStructure.decodeSequentially()) {
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, LongSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, (Object) null);
i = 7;
} else {
boolean z = true;
int i2 = 0;
Object obj5 = null;
Object obj6 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, obj4);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, LongSerializer.INSTANCE, obj5);
i2 |= 2;
} else {
if (decodeElementIndex != 2) {
throw new UnknownFieldException(decodeElementIndex);
}
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, obj6);
i2 |= 4;
}
}
obj = obj5;
obj2 = obj6;
Object obj7 = obj4;
i = i2;
obj3 = obj7;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.CleverCache(i, (Boolean) obj3, (Long) obj, (Integer) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.CleverCache value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.CleverCache.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,85 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.LongSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$ConfigSettings$$serializer implements GeneratedSerializer<ConfigPayload.ConfigSettings> {
public static final ConfigPayload$ConfigSettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$ConfigSettings$$serializer configPayload$ConfigSettings$$serializer = new ConfigPayload$ConfigSettings$$serializer();
INSTANCE = configPayload$ConfigSettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.ConfigSettings", configPayload$ConfigSettings$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("refresh_interval", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$ConfigSettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(LongSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.ConfigSettings m3927deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
SerializationConstructorMarker serializationConstructorMarker = null;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, LongSerializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, LongSerializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.ConfigSettings(i, (Long) obj, serializationConstructorMarker);
}
public void serialize(Encoder encoder, ConfigPayload.ConfigSettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.ConfigSettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,121 @@
package com.vungle.ads.internal.model;
import com.mbridge.msdk.foundation.entity.b;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class ConfigPayload$Endpoints$$serializer implements GeneratedSerializer<ConfigPayload.Endpoints> {
public static final ConfigPayload$Endpoints$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$Endpoints$$serializer configPayload$Endpoints$$serializer = new ConfigPayload$Endpoints$$serializer();
INSTANCE = configPayload$Endpoints$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.Endpoints", configPayload$Endpoints$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement(b.JSON_KEY_ADS, true);
pluginGeneratedSerialDescriptor.addElement("ri", true);
pluginGeneratedSerialDescriptor.addElement("error_logs", true);
pluginGeneratedSerialDescriptor.addElement("metrics", true);
pluginGeneratedSerialDescriptor.addElement("mraid_js", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$Endpoints$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.Endpoints m3928deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
int i;
Object obj5;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj6 = null;
if (beginStructure.decodeSequentially()) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, (Object) null);
i = 31;
} else {
boolean z = true;
int i2 = 0;
Object obj7 = null;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj6);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj7);
i2 |= 2;
} else if (decodeElementIndex == 2) {
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, obj8);
i2 |= 4;
} else if (decodeElementIndex == 3) {
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, obj9);
i2 |= 8;
} else {
if (decodeElementIndex != 4) {
throw new UnknownFieldException(decodeElementIndex);
}
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, obj10);
i2 |= 16;
}
}
obj = obj7;
obj2 = obj8;
obj3 = obj9;
obj4 = obj10;
Object obj11 = obj6;
i = i2;
obj5 = obj11;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.Endpoints(i, (String) obj5, (String) obj, (String) obj2, (String) obj3, (String) obj4, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.Endpoints value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.Endpoints.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,132 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class ConfigPayload$GDPRSettings$$serializer implements GeneratedSerializer<ConfigPayload.GDPRSettings> {
public static final ConfigPayload$GDPRSettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$GDPRSettings$$serializer configPayload$GDPRSettings$$serializer = new ConfigPayload$GDPRSettings$$serializer();
INSTANCE = configPayload$GDPRSettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.GDPRSettings", configPayload$GDPRSettings$$serializer, 6);
pluginGeneratedSerialDescriptor.addElement("is_country_data_protected", true);
pluginGeneratedSerialDescriptor.addElement("consent_title", true);
pluginGeneratedSerialDescriptor.addElement("consent_message", true);
pluginGeneratedSerialDescriptor.addElement("consent_message_version", true);
pluginGeneratedSerialDescriptor.addElement("button_accept", true);
pluginGeneratedSerialDescriptor.addElement("button_deny", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$GDPRSettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.GDPRSettings m3929deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
int i;
Object obj6;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i2 = 5;
Object obj7 = null;
if (beginStructure.decodeSequentially()) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, (Object) null);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, StringSerializer.INSTANCE, (Object) null);
i = 63;
} else {
boolean z = true;
int i3 = 0;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
Object obj11 = null;
Object obj12 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
z = false;
i2 = 5;
case 0:
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, obj7);
i3 |= 1;
i2 = 5;
case 1:
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj8);
i3 |= 2;
case 2:
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, obj9);
i3 |= 4;
case 3:
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, obj10);
i3 |= 8;
case 4:
obj11 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, obj11);
i3 |= 16;
case 5:
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, i2, StringSerializer.INSTANCE, obj12);
i3 |= 32;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
obj = obj8;
obj2 = obj9;
obj3 = obj10;
obj4 = obj11;
obj5 = obj12;
Object obj13 = obj7;
i = i3;
obj6 = obj13;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.GDPRSettings(i, (Boolean) obj6, (String) obj, (String) obj2, (String) obj3, (String) obj4, (String) obj5, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.GDPRSettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.GDPRSettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,84 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$IABSettings$$serializer implements GeneratedSerializer<ConfigPayload.IABSettings> {
public static final ConfigPayload$IABSettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$IABSettings$$serializer configPayload$IABSettings$$serializer = new ConfigPayload$IABSettings$$serializer();
INSTANCE = configPayload$IABSettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.IABSettings", configPayload$IABSettings$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("tcf_status", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$IABSettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.IABSettings m3930deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.IABSettings(i, (Integer) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.IABSettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.IABSettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,95 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$LogMetricsSettings$$serializer implements GeneratedSerializer<ConfigPayload.LogMetricsSettings> {
public static final ConfigPayload$LogMetricsSettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$LogMetricsSettings$$serializer configPayload$LogMetricsSettings$$serializer = new ConfigPayload$LogMetricsSettings$$serializer();
INSTANCE = configPayload$LogMetricsSettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.LogMetricsSettings", configPayload$LogMetricsSettings$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("error_log_level", true);
pluginGeneratedSerialDescriptor.addElement("metrics_is_enabled", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$LogMetricsSettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.LogMetricsSettings m3931deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, BooleanSerializer.INSTANCE, (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, BooleanSerializer.INSTANCE, obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.LogMetricsSettings(i, (Integer) obj, (Boolean) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.LogMetricsSettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.LogMetricsSettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,94 @@
package com.vungle.ads.internal.model;
import com.tapjoy.TapjoyConstants;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$UserPrivacy$$serializer implements GeneratedSerializer<ConfigPayload.UserPrivacy> {
public static final ConfigPayload$UserPrivacy$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$UserPrivacy$$serializer configPayload$UserPrivacy$$serializer = new ConfigPayload$UserPrivacy$$serializer();
INSTANCE = configPayload$UserPrivacy$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.UserPrivacy", configPayload$UserPrivacy$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement(TapjoyConstants.PREF_SUBJECT_TO_GDPR, true);
pluginGeneratedSerialDescriptor.addElement("iab", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$UserPrivacy$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(ConfigPayload$GDPRSettings$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(ConfigPayload$IABSettings$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.UserPrivacy m3932deserialize(Decoder decoder) {
Object obj;
Object obj2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, ConfigPayload$GDPRSettings$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$IABSettings$$serializer.INSTANCE, (Object) null);
i = 3;
} else {
boolean z = true;
int i2 = 0;
obj = null;
Object obj3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, ConfigPayload$GDPRSettings$$serializer.INSTANCE, obj);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, ConfigPayload$IABSettings$$serializer.INSTANCE, obj3);
i2 |= 2;
}
}
obj2 = obj3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.UserPrivacy(i, (ConfigPayload.GDPRSettings) obj, (ConfigPayload.IABSettings) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.UserPrivacy value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.UserPrivacy.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,84 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.ConfigPayload;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class ConfigPayload$ViewAbilitySettings$$serializer implements GeneratedSerializer<ConfigPayload.ViewAbilitySettings> {
public static final ConfigPayload$ViewAbilitySettings$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
ConfigPayload$ViewAbilitySettings$$serializer configPayload$ViewAbilitySettings$$serializer = new ConfigPayload$ViewAbilitySettings$$serializer();
INSTANCE = configPayload$ViewAbilitySettings$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.ConfigPayload.ViewAbilitySettings", configPayload$ViewAbilitySettings$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("om", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private ConfigPayload$ViewAbilitySettings$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public ConfigPayload.ViewAbilitySettings m3933deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, BooleanSerializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new ConfigPayload.ViewAbilitySettings(i, (Boolean) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, ConfigPayload.ViewAbilitySettings value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
ConfigPayload.ViewAbilitySettings.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
package com.vungle.ads.internal.model;
/* loaded from: classes4.dex */
public final class Cookie {
public static final String CCPA_CONSENT_STATUS = "ccpa_status";
public static final String CONFIG_APP_ID = "config_app_id";
public static final String CONFIG_EXTENSION = "config_extension";
public static final String CONFIG_RESPONSE = "config_response";
public static final String CONFIG_UPDATE_TIME = "config_update_time";
public static final String COPPA_DISABLE_AD_ID = "disable_ad_id";
public static final String COPPA_STATUS_KEY = "is_coppa";
public static final String GDPR_CONSENT_MESSAGE_VERSION = "gdpr_message_version";
public static final String GDPR_CONSENT_SOURCE = "gdpr_source";
public static final String GDPR_CONSENT_STATUS = "gdpr_status";
public static final String GDPR_CONSENT_TIMESTAMP = "gdpr_timestamp";
public static final String IABTCF_GDPR_APPLIES = "IABTCF_gdprApplies";
public static final String IABTCF_TC_STRING = "IABTCF_TCString";
public static final Cookie INSTANCE = new Cookie();
public static final String IS_PLAY_SERVICE_AVAILABLE = "isPlaySvcAvailable";
private Cookie() {
}
}

View File

@@ -0,0 +1,187 @@
package com.vungle.ads.internal.model;
import com.ironsource.ad;
import com.vungle.ads.internal.model.DeviceNode;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class DeviceNode$$serializer implements GeneratedSerializer<DeviceNode> {
public static final DeviceNode$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
DeviceNode$$serializer deviceNode$$serializer = new DeviceNode$$serializer();
INSTANCE = deviceNode$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.DeviceNode", deviceNode$$serializer, 11);
pluginGeneratedSerialDescriptor.addElement(ad.r, false);
pluginGeneratedSerialDescriptor.addElement("model", false);
pluginGeneratedSerialDescriptor.addElement(ad.z, false);
pluginGeneratedSerialDescriptor.addElement(ad.y0, true);
pluginGeneratedSerialDescriptor.addElement(ad.y, false);
pluginGeneratedSerialDescriptor.addElement("w", false);
pluginGeneratedSerialDescriptor.addElement("h", false);
pluginGeneratedSerialDescriptor.addElement(ad.U, true);
pluginGeneratedSerialDescriptor.addElement("ifa", true);
pluginGeneratedSerialDescriptor.addElement("lmt", true);
pluginGeneratedSerialDescriptor.addElement("ext", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private DeviceNode$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), (KSerializer) StringSerializer.INSTANCE, (KSerializer) IntSerializer.INSTANCE, (KSerializer) IntSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(DeviceNode$VungleExt$$serializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public DeviceNode m3934deserialize(Decoder decoder) {
int i;
Object obj;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
int i2;
int i3;
String str;
String str2;
String str3;
String str4;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i4 = 10;
int i5 = 9;
if (beginStructure.decodeSequentially()) {
String decodeStringElement = beginStructure.decodeStringElement(descriptor2, 0);
String decodeStringElement2 = beginStructure.decodeStringElement(descriptor2, 1);
String decodeStringElement3 = beginStructure.decodeStringElement(descriptor2, 2);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, (Object) null);
String decodeStringElement4 = beginStructure.decodeStringElement(descriptor2, 4);
int decodeIntElement = beginStructure.decodeIntElement(descriptor2, 5);
int decodeIntElement2 = beginStructure.decodeIntElement(descriptor2, 6);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 9, IntSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, DeviceNode$VungleExt$$serializer.INSTANCE, (Object) null);
str = decodeStringElement;
i = decodeIntElement2;
i2 = decodeIntElement;
str4 = decodeStringElement4;
str3 = decodeStringElement3;
str2 = decodeStringElement2;
i3 = 2047;
} else {
boolean z = true;
int i6 = 0;
int i7 = 0;
Object obj6 = null;
Object obj7 = null;
Object obj8 = null;
Object obj9 = null;
String str5 = null;
String str6 = null;
String str7 = null;
String str8 = null;
Object obj10 = null;
int i8 = 0;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
z = false;
i4 = 10;
case 0:
str5 = beginStructure.decodeStringElement(descriptor2, 0);
i7 |= 1;
i4 = 10;
i5 = 9;
case 1:
str6 = beginStructure.decodeStringElement(descriptor2, 1);
i7 |= 2;
i4 = 10;
i5 = 9;
case 2:
str7 = beginStructure.decodeStringElement(descriptor2, 2);
i7 |= 4;
i4 = 10;
i5 = 9;
case 3:
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, StringSerializer.INSTANCE, obj10);
i7 |= 8;
i4 = 10;
i5 = 9;
case 4:
str8 = beginStructure.decodeStringElement(descriptor2, 4);
i7 |= 16;
i4 = 10;
case 5:
i8 = beginStructure.decodeIntElement(descriptor2, 5);
i7 |= 32;
case 6:
i6 = beginStructure.decodeIntElement(descriptor2, 6);
i7 |= 64;
case 7:
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, obj9);
i7 |= 128;
case 8:
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, obj8);
i7 |= 256;
case 9:
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, i5, IntSerializer.INSTANCE, obj6);
i7 |= 512;
case 10:
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, i4, DeviceNode$VungleExt$$serializer.INSTANCE, obj7);
i7 |= 1024;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
i = i6;
obj = obj6;
obj2 = obj7;
obj3 = obj8;
obj4 = obj9;
obj5 = obj10;
i2 = i8;
i3 = i7;
str = str5;
str2 = str6;
str3 = str7;
str4 = str8;
}
beginStructure.endStructure(descriptor2);
return new DeviceNode(i3, str, str2, str3, (String) obj5, str4, i2, i, (String) obj4, (String) obj3, (Integer) obj, (DeviceNode.VungleExt) obj2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, DeviceNode value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
DeviceNode.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,267 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.DeviceNode;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.FloatSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class DeviceNode$VungleExt$$serializer implements GeneratedSerializer<DeviceNode.VungleExt> {
public static final DeviceNode$VungleExt$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
DeviceNode$VungleExt$$serializer deviceNode$VungleExt$$serializer = new DeviceNode$VungleExt$$serializer();
INSTANCE = deviceNode$VungleExt$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.DeviceNode.VungleExt", deviceNode$VungleExt$$serializer, 18);
pluginGeneratedSerialDescriptor.addElement("is_google_play_services_available", true);
pluginGeneratedSerialDescriptor.addElement("app_set_id", true);
pluginGeneratedSerialDescriptor.addElement("app_set_id_scope", true);
pluginGeneratedSerialDescriptor.addElement("battery_level", true);
pluginGeneratedSerialDescriptor.addElement("battery_state", true);
pluginGeneratedSerialDescriptor.addElement("battery_saver_enabled", true);
pluginGeneratedSerialDescriptor.addElement("connection_type", true);
pluginGeneratedSerialDescriptor.addElement("connection_type_detail", true);
pluginGeneratedSerialDescriptor.addElement("locale", true);
pluginGeneratedSerialDescriptor.addElement("language", true);
pluginGeneratedSerialDescriptor.addElement("time_zone", true);
pluginGeneratedSerialDescriptor.addElement("volume_level", true);
pluginGeneratedSerialDescriptor.addElement("sound_enabled", true);
pluginGeneratedSerialDescriptor.addElement("is_tv", true);
pluginGeneratedSerialDescriptor.addElement("sd_card_available", true);
pluginGeneratedSerialDescriptor.addElement("is_sideload_enabled", true);
pluginGeneratedSerialDescriptor.addElement("gaid", true);
pluginGeneratedSerialDescriptor.addElement("amazon_advertising_id", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private DeviceNode$VungleExt$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) BooleanSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), (KSerializer) FloatSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), (KSerializer) IntSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), (KSerializer) FloatSerializer.INSTANCE, (KSerializer) IntSerializer.INSTANCE, (KSerializer) BooleanSerializer.INSTANCE, (KSerializer) IntSerializer.INSTANCE, (KSerializer) BooleanSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public DeviceNode.VungleExt m3935deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
int i;
boolean z;
int i2;
Object obj4;
boolean z2;
float f;
Object obj5;
boolean z3;
float f2;
int i3;
int i4;
Object obj6;
Object obj7;
Object obj8;
Object obj9;
Object obj10;
Object obj11;
int i5;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i6 = 11;
if (beginStructure.decodeSequentially()) {
boolean decodeBooleanElement = beginStructure.decodeBooleanElement(descriptor2, 0);
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, (Object) null);
float decodeFloatElement = beginStructure.decodeFloatElement(descriptor2, 3);
Object decodeNullableSerializableElement = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, (Object) null);
int decodeIntElement = beginStructure.decodeIntElement(descriptor2, 5);
Object decodeNullableSerializableElement2 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, StringSerializer.INSTANCE, (Object) null);
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement3 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement4 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, StringSerializer.INSTANCE, (Object) null);
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, StringSerializer.INSTANCE, (Object) null);
float decodeFloatElement2 = beginStructure.decodeFloatElement(descriptor2, 11);
int decodeIntElement2 = beginStructure.decodeIntElement(descriptor2, 12);
boolean decodeBooleanElement2 = beginStructure.decodeBooleanElement(descriptor2, 13);
int decodeIntElement3 = beginStructure.decodeIntElement(descriptor2, 14);
boolean decodeBooleanElement3 = beginStructure.decodeBooleanElement(descriptor2, 15);
Object decodeNullableSerializableElement5 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, StringSerializer.INSTANCE, (Object) null);
i = 262143;
z3 = decodeBooleanElement2;
f2 = decodeFloatElement2;
i3 = decodeIntElement;
obj6 = decodeNullableSerializableElement;
i4 = decodeIntElement2;
f = decodeFloatElement;
obj4 = decodeNullableSerializableElement3;
i2 = decodeIntElement3;
z = decodeBooleanElement;
z2 = decodeBooleanElement3;
obj3 = decodeNullableSerializableElement2;
obj2 = decodeNullableSerializableElement4;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 17, StringSerializer.INSTANCE, (Object) null);
obj5 = decodeNullableSerializableElement5;
} else {
int i7 = 0;
boolean z4 = false;
boolean z5 = false;
int i8 = 0;
int i9 = 0;
boolean z6 = true;
Object obj12 = null;
Object obj13 = null;
Object obj14 = null;
obj = null;
Object obj15 = null;
obj2 = null;
Object obj16 = null;
obj3 = null;
Object obj17 = null;
Object obj18 = null;
float f3 = 0.0f;
float f4 = 0.0f;
boolean z7 = false;
int i10 = 0;
while (z6) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
obj11 = obj18;
z6 = false;
i6 = 11;
obj18 = obj11;
case 0:
obj11 = obj18;
z7 = beginStructure.decodeBooleanElement(descriptor2, 0);
i7 |= 1;
obj12 = obj12;
i6 = 11;
obj18 = obj11;
case 1:
i7 |= 2;
obj12 = obj12;
obj18 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj18);
i6 = 11;
case 2:
obj14 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, obj14);
i7 |= 4;
i6 = 11;
case 3:
f3 = beginStructure.decodeFloatElement(descriptor2, 3);
i7 |= 8;
i6 = 11;
case 4:
obj13 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, StringSerializer.INSTANCE, obj13);
i7 |= 16;
i6 = 11;
case 5:
i8 = beginStructure.decodeIntElement(descriptor2, 5);
i7 |= 32;
i6 = 11;
case 6:
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, StringSerializer.INSTANCE, obj3);
i7 |= 64;
i6 = 11;
case 7:
obj17 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, StringSerializer.INSTANCE, obj17);
i7 |= 128;
i6 = 11;
case 8:
obj16 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, StringSerializer.INSTANCE, obj16);
i7 |= 256;
i6 = 11;
case 9:
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, StringSerializer.INSTANCE, obj2);
i7 |= 512;
i6 = 11;
case 10:
obj15 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, StringSerializer.INSTANCE, obj15);
i7 |= 1024;
i6 = 11;
case 11:
f4 = beginStructure.decodeFloatElement(descriptor2, i6);
i7 |= 2048;
case 12:
i9 = beginStructure.decodeIntElement(descriptor2, 12);
i7 |= 4096;
i6 = 11;
case 13:
z5 = beginStructure.decodeBooleanElement(descriptor2, 13);
i7 |= 8192;
i6 = 11;
case 14:
i7 |= 16384;
i10 = beginStructure.decodeIntElement(descriptor2, 14);
i6 = 11;
case 15:
z4 = beginStructure.decodeBooleanElement(descriptor2, 15);
i7 |= 32768;
i6 = 11;
case 16:
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, 16, StringSerializer.INSTANCE, obj12);
i5 = 65536;
i7 |= i5;
i6 = 11;
case 17:
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 17, StringSerializer.INSTANCE, obj);
i5 = 131072;
i7 |= i5;
i6 = 11;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
Object obj19 = obj18;
Object obj20 = obj12;
i = i7;
z = z7;
i2 = i10;
obj4 = obj16;
z2 = z4;
f = f3;
obj5 = obj20;
z3 = z5;
f2 = f4;
i3 = i8;
i4 = i9;
obj6 = obj13;
obj7 = obj14;
obj8 = obj19;
obj9 = obj15;
obj10 = obj17;
}
beginStructure.endStructure(descriptor2);
return new DeviceNode.VungleExt(i, z, (String) obj8, (Integer) obj7, f, (String) obj6, i3, (String) obj3, (String) obj10, (String) obj4, (String) obj2, (String) obj9, f2, i4, z3, i2, z2, (String) obj5, (String) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, DeviceNode.VungleExt value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
DeviceNode.VungleExt.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,839 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class DeviceNode {
public static final Companion Companion = new Companion(null);
private final String carrier;
private VungleExt ext;
private final int h;
private String ifa;
private Integer lmt;
private final String make;
private final String model;
private final String os;
private final String osv;
private String ua;
private final int w;
public final String component1() {
return this.make;
}
public final Integer component10() {
return this.lmt;
}
public final VungleExt component11() {
return this.ext;
}
public final String component2() {
return this.model;
}
public final String component3() {
return this.osv;
}
public final String component4() {
return this.carrier;
}
public final String component5() {
return this.os;
}
public final int component6() {
return this.w;
}
public final int component7() {
return this.h;
}
public final String component8() {
return this.ua;
}
public final String component9() {
return this.ifa;
}
public final DeviceNode copy(String make, String model, String osv, String str, String os, int i, int i2, String str2, String str3, Integer num, VungleExt vungleExt) {
Intrinsics.checkNotNullParameter(make, "make");
Intrinsics.checkNotNullParameter(model, "model");
Intrinsics.checkNotNullParameter(osv, "osv");
Intrinsics.checkNotNullParameter(os, "os");
return new DeviceNode(make, model, osv, str, os, i, i2, str2, str3, num, vungleExt);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DeviceNode)) {
return false;
}
DeviceNode deviceNode = (DeviceNode) obj;
return Intrinsics.areEqual(this.make, deviceNode.make) && Intrinsics.areEqual(this.model, deviceNode.model) && Intrinsics.areEqual(this.osv, deviceNode.osv) && Intrinsics.areEqual(this.carrier, deviceNode.carrier) && Intrinsics.areEqual(this.os, deviceNode.os) && this.w == deviceNode.w && this.h == deviceNode.h && Intrinsics.areEqual(this.ua, deviceNode.ua) && Intrinsics.areEqual(this.ifa, deviceNode.ifa) && Intrinsics.areEqual(this.lmt, deviceNode.lmt) && Intrinsics.areEqual(this.ext, deviceNode.ext);
}
public final String getCarrier() {
return this.carrier;
}
public final VungleExt getExt() {
return this.ext;
}
public final int getH() {
return this.h;
}
public final String getIfa() {
return this.ifa;
}
public final Integer getLmt() {
return this.lmt;
}
public final String getMake() {
return this.make;
}
public final String getModel() {
return this.model;
}
public final String getOs() {
return this.os;
}
public final String getOsv() {
return this.osv;
}
public final String getUa() {
return this.ua;
}
public final int getW() {
return this.w;
}
public int hashCode() {
int hashCode = ((((this.make.hashCode() * 31) + this.model.hashCode()) * 31) + this.osv.hashCode()) * 31;
String str = this.carrier;
int hashCode2 = (((((((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.os.hashCode()) * 31) + Integer.hashCode(this.w)) * 31) + Integer.hashCode(this.h)) * 31;
String str2 = this.ua;
int hashCode3 = (hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31;
String str3 = this.ifa;
int hashCode4 = (hashCode3 + (str3 == null ? 0 : str3.hashCode())) * 31;
Integer num = this.lmt;
int hashCode5 = (hashCode4 + (num == null ? 0 : num.hashCode())) * 31;
VungleExt vungleExt = this.ext;
return hashCode5 + (vungleExt != null ? vungleExt.hashCode() : 0);
}
public final void setExt(VungleExt vungleExt) {
this.ext = vungleExt;
}
public final void setIfa(String str) {
this.ifa = str;
}
public final void setLmt(Integer num) {
this.lmt = num;
}
public final void setUa(String str) {
this.ua = str;
}
public String toString() {
return "DeviceNode(make=" + this.make + ", model=" + this.model + ", osv=" + this.osv + ", carrier=" + this.carrier + ", os=" + this.os + ", w=" + this.w + ", h=" + this.h + ", ua=" + this.ua + ", ifa=" + this.ifa + ", lmt=" + this.lmt + ", ext=" + this.ext + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<DeviceNode> serializer() {
return DeviceNode$$serializer.INSTANCE;
}
}
public /* synthetic */ DeviceNode(int i, String str, String str2, String str3, String str4, String str5, int i2, int i3, String str6, String str7, Integer num, VungleExt vungleExt, SerializationConstructorMarker serializationConstructorMarker) {
if (119 != (i & 119)) {
PluginExceptionsKt.throwMissingFieldException(i, 119, DeviceNode$$serializer.INSTANCE.getDescriptor());
}
this.make = str;
this.model = str2;
this.osv = str3;
if ((i & 8) == 0) {
this.carrier = null;
} else {
this.carrier = str4;
}
this.os = str5;
this.w = i2;
this.h = i3;
if ((i & 128) == 0) {
this.ua = null;
} else {
this.ua = str6;
}
if ((i & 256) == 0) {
this.ifa = null;
} else {
this.ifa = str7;
}
if ((i & 512) == 0) {
this.lmt = null;
} else {
this.lmt = num;
}
if ((i & 1024) == 0) {
this.ext = null;
} else {
this.ext = vungleExt;
}
}
public DeviceNode(String make, String model, String osv, String str, String os, int i, int i2, String str2, String str3, Integer num, VungleExt vungleExt) {
Intrinsics.checkNotNullParameter(make, "make");
Intrinsics.checkNotNullParameter(model, "model");
Intrinsics.checkNotNullParameter(osv, "osv");
Intrinsics.checkNotNullParameter(os, "os");
this.make = make;
this.model = model;
this.osv = osv;
this.carrier = str;
this.os = os;
this.w = i;
this.h = i2;
this.ua = str2;
this.ifa = str3;
this.lmt = num;
this.ext = vungleExt;
}
public static final void write$Self(DeviceNode self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
output.encodeStringElement(serialDesc, 0, self.make);
output.encodeStringElement(serialDesc, 1, self.model);
output.encodeStringElement(serialDesc, 2, self.osv);
if (output.shouldEncodeElementDefault(serialDesc, 3) || self.carrier != null) {
output.encodeNullableSerializableElement(serialDesc, 3, StringSerializer.INSTANCE, self.carrier);
}
output.encodeStringElement(serialDesc, 4, self.os);
output.encodeIntElement(serialDesc, 5, self.w);
output.encodeIntElement(serialDesc, 6, self.h);
if (output.shouldEncodeElementDefault(serialDesc, 7) || self.ua != null) {
output.encodeNullableSerializableElement(serialDesc, 7, StringSerializer.INSTANCE, self.ua);
}
if (output.shouldEncodeElementDefault(serialDesc, 8) || self.ifa != null) {
output.encodeNullableSerializableElement(serialDesc, 8, StringSerializer.INSTANCE, self.ifa);
}
if (output.shouldEncodeElementDefault(serialDesc, 9) || self.lmt != null) {
output.encodeNullableSerializableElement(serialDesc, 9, IntSerializer.INSTANCE, self.lmt);
}
if (!output.shouldEncodeElementDefault(serialDesc, 10) && self.ext == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 10, DeviceNode$VungleExt$$serializer.INSTANCE, self.ext);
}
public /* synthetic */ DeviceNode(String str, String str2, String str3, String str4, String str5, int i, int i2, String str6, String str7, Integer num, VungleExt vungleExt, int i3, DefaultConstructorMarker defaultConstructorMarker) {
this(str, str2, str3, (i3 & 8) != 0 ? null : str4, str5, i, i2, (i3 & 128) != 0 ? null : str6, (i3 & 256) != 0 ? null : str7, (i3 & 512) != 0 ? null : num, (i3 & 1024) != 0 ? null : vungleExt);
}
@Serializable
public static final class VungleExt {
public static final Companion Companion = new Companion(null);
private String amazonAdvertisingId;
private String appSetId;
private Integer appSetIdScope;
private float batteryLevel;
private int batterySaverEnabled;
private String batteryState;
private String connectionType;
private String connectionTypeDetail;
private String gaid;
private boolean isGooglePlayServicesAvailable;
private boolean isSideloadEnabled;
private boolean isTv;
private String language;
private String locale;
private int sdCardAvailable;
private int soundEnabled;
private String timeZone;
private float volumeLevel;
public VungleExt() {
this(false, (String) null, (Integer) null, 0.0f, (String) null, 0, (String) null, (String) null, (String) null, (String) null, (String) null, 0.0f, 0, false, 0, false, (String) null, (String) null, 262143, (DefaultConstructorMarker) null);
}
@SerialName("amazon_advertising_id")
public static /* synthetic */ void getAmazonAdvertisingId$annotations() {
}
@SerialName("app_set_id")
public static /* synthetic */ void getAppSetId$annotations() {
}
@SerialName("app_set_id_scope")
public static /* synthetic */ void getAppSetIdScope$annotations() {
}
@SerialName("battery_level")
public static /* synthetic */ void getBatteryLevel$annotations() {
}
@SerialName("battery_saver_enabled")
public static /* synthetic */ void getBatterySaverEnabled$annotations() {
}
@SerialName("battery_state")
public static /* synthetic */ void getBatteryState$annotations() {
}
@SerialName("connection_type")
public static /* synthetic */ void getConnectionType$annotations() {
}
@SerialName("connection_type_detail")
public static /* synthetic */ void getConnectionTypeDetail$annotations() {
}
@SerialName("gaid")
public static /* synthetic */ void getGaid$annotations() {
}
@SerialName("language")
public static /* synthetic */ void getLanguage$annotations() {
}
@SerialName("locale")
public static /* synthetic */ void getLocale$annotations() {
}
@SerialName("sd_card_available")
public static /* synthetic */ void getSdCardAvailable$annotations() {
}
@SerialName("sound_enabled")
public static /* synthetic */ void getSoundEnabled$annotations() {
}
@SerialName("time_zone")
public static /* synthetic */ void getTimeZone$annotations() {
}
@SerialName("volume_level")
public static /* synthetic */ void getVolumeLevel$annotations() {
}
@SerialName("is_google_play_services_available")
public static /* synthetic */ void isGooglePlayServicesAvailable$annotations() {
}
@SerialName("is_sideload_enabled")
public static /* synthetic */ void isSideloadEnabled$annotations() {
}
@SerialName("is_tv")
public static /* synthetic */ void isTv$annotations() {
}
public final boolean component1() {
return this.isGooglePlayServicesAvailable;
}
public final String component10() {
return this.language;
}
public final String component11() {
return this.timeZone;
}
public final float component12() {
return this.volumeLevel;
}
public final int component13() {
return this.soundEnabled;
}
public final boolean component14() {
return this.isTv;
}
public final int component15() {
return this.sdCardAvailable;
}
public final boolean component16() {
return this.isSideloadEnabled;
}
public final String component17() {
return this.gaid;
}
public final String component18() {
return this.amazonAdvertisingId;
}
public final String component2() {
return this.appSetId;
}
public final Integer component3() {
return this.appSetIdScope;
}
public final float component4() {
return this.batteryLevel;
}
public final String component5() {
return this.batteryState;
}
public final int component6() {
return this.batterySaverEnabled;
}
public final String component7() {
return this.connectionType;
}
public final String component8() {
return this.connectionTypeDetail;
}
public final String component9() {
return this.locale;
}
public final VungleExt copy(boolean z, String str, Integer num, float f, String str2, int i, String str3, String str4, String str5, String str6, String str7, float f2, int i2, boolean z2, int i3, boolean z3, String str8, String str9) {
return new VungleExt(z, str, num, f, str2, i, str3, str4, str5, str6, str7, f2, i2, z2, i3, z3, str8, str9);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof VungleExt)) {
return false;
}
VungleExt vungleExt = (VungleExt) obj;
return this.isGooglePlayServicesAvailable == vungleExt.isGooglePlayServicesAvailable && Intrinsics.areEqual(this.appSetId, vungleExt.appSetId) && Intrinsics.areEqual(this.appSetIdScope, vungleExt.appSetIdScope) && Intrinsics.areEqual((Object) Float.valueOf(this.batteryLevel), (Object) Float.valueOf(vungleExt.batteryLevel)) && Intrinsics.areEqual(this.batteryState, vungleExt.batteryState) && this.batterySaverEnabled == vungleExt.batterySaverEnabled && Intrinsics.areEqual(this.connectionType, vungleExt.connectionType) && Intrinsics.areEqual(this.connectionTypeDetail, vungleExt.connectionTypeDetail) && Intrinsics.areEqual(this.locale, vungleExt.locale) && Intrinsics.areEqual(this.language, vungleExt.language) && Intrinsics.areEqual(this.timeZone, vungleExt.timeZone) && Intrinsics.areEqual((Object) Float.valueOf(this.volumeLevel), (Object) Float.valueOf(vungleExt.volumeLevel)) && this.soundEnabled == vungleExt.soundEnabled && this.isTv == vungleExt.isTv && this.sdCardAvailable == vungleExt.sdCardAvailable && this.isSideloadEnabled == vungleExt.isSideloadEnabled && Intrinsics.areEqual(this.gaid, vungleExt.gaid) && Intrinsics.areEqual(this.amazonAdvertisingId, vungleExt.amazonAdvertisingId);
}
public final String getAmazonAdvertisingId() {
return this.amazonAdvertisingId;
}
public final String getAppSetId() {
return this.appSetId;
}
public final Integer getAppSetIdScope() {
return this.appSetIdScope;
}
public final float getBatteryLevel() {
return this.batteryLevel;
}
public final int getBatterySaverEnabled() {
return this.batterySaverEnabled;
}
public final String getBatteryState() {
return this.batteryState;
}
public final String getConnectionType() {
return this.connectionType;
}
public final String getConnectionTypeDetail() {
return this.connectionTypeDetail;
}
public final String getGaid() {
return this.gaid;
}
public final String getLanguage() {
return this.language;
}
public final String getLocale() {
return this.locale;
}
public final int getSdCardAvailable() {
return this.sdCardAvailable;
}
public final int getSoundEnabled() {
return this.soundEnabled;
}
public final String getTimeZone() {
return this.timeZone;
}
public final float getVolumeLevel() {
return this.volumeLevel;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [int] */
/* JADX WARN: Type inference failed for: r0v36 */
/* JADX WARN: Type inference failed for: r0v37 */
/* JADX WARN: Type inference failed for: r2v32, types: [boolean] */
public int hashCode() {
boolean z = this.isGooglePlayServicesAvailable;
?? r0 = z;
if (z) {
r0 = 1;
}
int i = r0 * 31;
String str = this.appSetId;
int hashCode = (i + (str == null ? 0 : str.hashCode())) * 31;
Integer num = this.appSetIdScope;
int hashCode2 = (((hashCode + (num == null ? 0 : num.hashCode())) * 31) + Float.hashCode(this.batteryLevel)) * 31;
String str2 = this.batteryState;
int hashCode3 = (((hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31) + Integer.hashCode(this.batterySaverEnabled)) * 31;
String str3 = this.connectionType;
int hashCode4 = (hashCode3 + (str3 == null ? 0 : str3.hashCode())) * 31;
String str4 = this.connectionTypeDetail;
int hashCode5 = (hashCode4 + (str4 == null ? 0 : str4.hashCode())) * 31;
String str5 = this.locale;
int hashCode6 = (hashCode5 + (str5 == null ? 0 : str5.hashCode())) * 31;
String str6 = this.language;
int hashCode7 = (hashCode6 + (str6 == null ? 0 : str6.hashCode())) * 31;
String str7 = this.timeZone;
int hashCode8 = (((((hashCode7 + (str7 == null ? 0 : str7.hashCode())) * 31) + Float.hashCode(this.volumeLevel)) * 31) + Integer.hashCode(this.soundEnabled)) * 31;
?? r2 = this.isTv;
int i2 = r2;
if (r2 != 0) {
i2 = 1;
}
int hashCode9 = (((hashCode8 + i2) * 31) + Integer.hashCode(this.sdCardAvailable)) * 31;
boolean z2 = this.isSideloadEnabled;
int i3 = (hashCode9 + (z2 ? 1 : z2 ? 1 : 0)) * 31;
String str8 = this.gaid;
int hashCode10 = (i3 + (str8 == null ? 0 : str8.hashCode())) * 31;
String str9 = this.amazonAdvertisingId;
return hashCode10 + (str9 != null ? str9.hashCode() : 0);
}
public final boolean isGooglePlayServicesAvailable() {
return this.isGooglePlayServicesAvailable;
}
public final boolean isSideloadEnabled() {
return this.isSideloadEnabled;
}
public final boolean isTv() {
return this.isTv;
}
public final void setAmazonAdvertisingId(String str) {
this.amazonAdvertisingId = str;
}
public final void setAppSetId(String str) {
this.appSetId = str;
}
public final void setAppSetIdScope(Integer num) {
this.appSetIdScope = num;
}
public final void setBatteryLevel(float f) {
this.batteryLevel = f;
}
public final void setBatterySaverEnabled(int i) {
this.batterySaverEnabled = i;
}
public final void setBatteryState(String str) {
this.batteryState = str;
}
public final void setConnectionType(String str) {
this.connectionType = str;
}
public final void setConnectionTypeDetail(String str) {
this.connectionTypeDetail = str;
}
public final void setGaid(String str) {
this.gaid = str;
}
public final void setGooglePlayServicesAvailable(boolean z) {
this.isGooglePlayServicesAvailable = z;
}
public final void setLanguage(String str) {
this.language = str;
}
public final void setLocale(String str) {
this.locale = str;
}
public final void setSdCardAvailable(int i) {
this.sdCardAvailable = i;
}
public final void setSideloadEnabled(boolean z) {
this.isSideloadEnabled = z;
}
public final void setSoundEnabled(int i) {
this.soundEnabled = i;
}
public final void setTimeZone(String str) {
this.timeZone = str;
}
public final void setTv(boolean z) {
this.isTv = z;
}
public final void setVolumeLevel(float f) {
this.volumeLevel = f;
}
public String toString() {
return "VungleExt(isGooglePlayServicesAvailable=" + this.isGooglePlayServicesAvailable + ", appSetId=" + this.appSetId + ", appSetIdScope=" + this.appSetIdScope + ", batteryLevel=" + this.batteryLevel + ", batteryState=" + this.batteryState + ", batterySaverEnabled=" + this.batterySaverEnabled + ", connectionType=" + this.connectionType + ", connectionTypeDetail=" + this.connectionTypeDetail + ", locale=" + this.locale + ", language=" + this.language + ", timeZone=" + this.timeZone + ", volumeLevel=" + this.volumeLevel + ", soundEnabled=" + this.soundEnabled + ", isTv=" + this.isTv + ", sdCardAvailable=" + this.sdCardAvailable + ", isSideloadEnabled=" + this.isSideloadEnabled + ", gaid=" + this.gaid + ", amazonAdvertisingId=" + this.amazonAdvertisingId + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<VungleExt> serializer() {
return DeviceNode$VungleExt$$serializer.INSTANCE;
}
}
public /* synthetic */ VungleExt(int i, @SerialName("is_google_play_services_available") boolean z, @SerialName("app_set_id") String str, @SerialName("app_set_id_scope") Integer num, @SerialName("battery_level") float f, @SerialName("battery_state") String str2, @SerialName("battery_saver_enabled") int i2, @SerialName("connection_type") String str3, @SerialName("connection_type_detail") String str4, @SerialName("locale") String str5, @SerialName("language") String str6, @SerialName("time_zone") String str7, @SerialName("volume_level") float f2, @SerialName("sound_enabled") int i3, @SerialName("is_tv") boolean z2, @SerialName("sd_card_available") int i4, @SerialName("is_sideload_enabled") boolean z3, @SerialName("gaid") String str8, @SerialName("amazon_advertising_id") String str9, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.isGooglePlayServicesAvailable = false;
} else {
this.isGooglePlayServicesAvailable = z;
}
if ((i & 2) == 0) {
this.appSetId = null;
} else {
this.appSetId = str;
}
if ((i & 4) == 0) {
this.appSetIdScope = null;
} else {
this.appSetIdScope = num;
}
if ((i & 8) == 0) {
this.batteryLevel = 0.0f;
} else {
this.batteryLevel = f;
}
if ((i & 16) == 0) {
this.batteryState = null;
} else {
this.batteryState = str2;
}
if ((i & 32) == 0) {
this.batterySaverEnabled = 0;
} else {
this.batterySaverEnabled = i2;
}
if ((i & 64) == 0) {
this.connectionType = null;
} else {
this.connectionType = str3;
}
if ((i & 128) == 0) {
this.connectionTypeDetail = null;
} else {
this.connectionTypeDetail = str4;
}
if ((i & 256) == 0) {
this.locale = null;
} else {
this.locale = str5;
}
if ((i & 512) == 0) {
this.language = null;
} else {
this.language = str6;
}
if ((i & 1024) == 0) {
this.timeZone = null;
} else {
this.timeZone = str7;
}
if ((i & 2048) == 0) {
this.volumeLevel = 0.0f;
} else {
this.volumeLevel = f2;
}
if ((i & 4096) == 0) {
this.soundEnabled = 1;
} else {
this.soundEnabled = i3;
}
if ((i & 8192) == 0) {
this.isTv = false;
} else {
this.isTv = z2;
}
if ((i & 16384) == 0) {
this.sdCardAvailable = 1;
} else {
this.sdCardAvailable = i4;
}
if ((32768 & i) == 0) {
this.isSideloadEnabled = false;
} else {
this.isSideloadEnabled = z3;
}
if ((65536 & i) == 0) {
this.gaid = null;
} else {
this.gaid = str8;
}
if ((i & 131072) == 0) {
this.amazonAdvertisingId = null;
} else {
this.amazonAdvertisingId = str9;
}
}
public VungleExt(boolean z, String str, Integer num, float f, String str2, int i, String str3, String str4, String str5, String str6, String str7, float f2, int i2, boolean z2, int i3, boolean z3, String str8, String str9) {
this.isGooglePlayServicesAvailable = z;
this.appSetId = str;
this.appSetIdScope = num;
this.batteryLevel = f;
this.batteryState = str2;
this.batterySaverEnabled = i;
this.connectionType = str3;
this.connectionTypeDetail = str4;
this.locale = str5;
this.language = str6;
this.timeZone = str7;
this.volumeLevel = f2;
this.soundEnabled = i2;
this.isTv = z2;
this.sdCardAvailable = i3;
this.isSideloadEnabled = z3;
this.gaid = str8;
this.amazonAdvertisingId = str9;
}
public static final void write$Self(VungleExt self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.isGooglePlayServicesAvailable) {
output.encodeBooleanElement(serialDesc, 0, self.isGooglePlayServicesAvailable);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.appSetId != null) {
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.appSetId);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.appSetIdScope != null) {
output.encodeNullableSerializableElement(serialDesc, 2, IntSerializer.INSTANCE, self.appSetIdScope);
}
if (output.shouldEncodeElementDefault(serialDesc, 3) || !Intrinsics.areEqual((Object) Float.valueOf(self.batteryLevel), (Object) Float.valueOf(0.0f))) {
output.encodeFloatElement(serialDesc, 3, self.batteryLevel);
}
if (output.shouldEncodeElementDefault(serialDesc, 4) || self.batteryState != null) {
output.encodeNullableSerializableElement(serialDesc, 4, StringSerializer.INSTANCE, self.batteryState);
}
if (output.shouldEncodeElementDefault(serialDesc, 5) || self.batterySaverEnabled != 0) {
output.encodeIntElement(serialDesc, 5, self.batterySaverEnabled);
}
if (output.shouldEncodeElementDefault(serialDesc, 6) || self.connectionType != null) {
output.encodeNullableSerializableElement(serialDesc, 6, StringSerializer.INSTANCE, self.connectionType);
}
if (output.shouldEncodeElementDefault(serialDesc, 7) || self.connectionTypeDetail != null) {
output.encodeNullableSerializableElement(serialDesc, 7, StringSerializer.INSTANCE, self.connectionTypeDetail);
}
if (output.shouldEncodeElementDefault(serialDesc, 8) || self.locale != null) {
output.encodeNullableSerializableElement(serialDesc, 8, StringSerializer.INSTANCE, self.locale);
}
if (output.shouldEncodeElementDefault(serialDesc, 9) || self.language != null) {
output.encodeNullableSerializableElement(serialDesc, 9, StringSerializer.INSTANCE, self.language);
}
if (output.shouldEncodeElementDefault(serialDesc, 10) || self.timeZone != null) {
output.encodeNullableSerializableElement(serialDesc, 10, StringSerializer.INSTANCE, self.timeZone);
}
if (output.shouldEncodeElementDefault(serialDesc, 11) || !Intrinsics.areEqual((Object) Float.valueOf(self.volumeLevel), (Object) Float.valueOf(0.0f))) {
output.encodeFloatElement(serialDesc, 11, self.volumeLevel);
}
if (output.shouldEncodeElementDefault(serialDesc, 12) || self.soundEnabled != 1) {
output.encodeIntElement(serialDesc, 12, self.soundEnabled);
}
if (output.shouldEncodeElementDefault(serialDesc, 13) || self.isTv) {
output.encodeBooleanElement(serialDesc, 13, self.isTv);
}
if (output.shouldEncodeElementDefault(serialDesc, 14) || self.sdCardAvailable != 1) {
output.encodeIntElement(serialDesc, 14, self.sdCardAvailable);
}
if (output.shouldEncodeElementDefault(serialDesc, 15) || self.isSideloadEnabled) {
output.encodeBooleanElement(serialDesc, 15, self.isSideloadEnabled);
}
if (output.shouldEncodeElementDefault(serialDesc, 16) || self.gaid != null) {
output.encodeNullableSerializableElement(serialDesc, 16, StringSerializer.INSTANCE, self.gaid);
}
if (!output.shouldEncodeElementDefault(serialDesc, 17) && self.amazonAdvertisingId == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 17, StringSerializer.INSTANCE, self.amazonAdvertisingId);
}
public /* synthetic */ VungleExt(boolean z, String str, Integer num, float f, String str2, int i, String str3, String str4, String str5, String str6, String str7, float f2, int i2, boolean z2, int i3, boolean z3, String str8, String str9, int i4, DefaultConstructorMarker defaultConstructorMarker) {
this((i4 & 1) != 0 ? false : z, (i4 & 2) != 0 ? null : str, (i4 & 4) != 0 ? null : num, (i4 & 8) != 0 ? 0.0f : f, (i4 & 16) != 0 ? null : str2, (i4 & 32) != 0 ? 0 : i, (i4 & 64) != 0 ? null : str3, (i4 & 128) != 0 ? null : str4, (i4 & 256) != 0 ? null : str5, (i4 & 512) != 0 ? null : str6, (i4 & 1024) != 0 ? null : str7, (i4 & 2048) == 0 ? f2 : 0.0f, (i4 & 4096) != 0 ? 1 : i2, (i4 & 8192) != 0 ? false : z2, (i4 & 16384) == 0 ? i3 : 1, (32768 & i4) != 0 ? false : z3, (i4 & 65536) != 0 ? null : str8, (i4 & 131072) != 0 ? null : str9);
}
}
}

View File

@@ -0,0 +1,145 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class OmSdkData {
public static final Companion Companion = new Companion(null);
private final String params;
private final String vendorKey;
private final String vendorURL;
public OmSdkData() {
this((String) null, (String) null, (String) null, 7, (DefaultConstructorMarker) null);
}
public static /* synthetic */ OmSdkData copy$default(OmSdkData omSdkData, String str, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str = omSdkData.params;
}
if ((i & 2) != 0) {
str2 = omSdkData.vendorKey;
}
if ((i & 4) != 0) {
str3 = omSdkData.vendorURL;
}
return omSdkData.copy(str, str2, str3);
}
public final String component1() {
return this.params;
}
public final String component2() {
return this.vendorKey;
}
public final String component3() {
return this.vendorURL;
}
public final OmSdkData copy(String str, String str2, String str3) {
return new OmSdkData(str, str2, str3);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof OmSdkData)) {
return false;
}
OmSdkData omSdkData = (OmSdkData) obj;
return Intrinsics.areEqual(this.params, omSdkData.params) && Intrinsics.areEqual(this.vendorKey, omSdkData.vendorKey) && Intrinsics.areEqual(this.vendorURL, omSdkData.vendorURL);
}
public final String getParams() {
return this.params;
}
public final String getVendorKey() {
return this.vendorKey;
}
public final String getVendorURL() {
return this.vendorURL;
}
public int hashCode() {
String str = this.params;
int hashCode = (str == null ? 0 : str.hashCode()) * 31;
String str2 = this.vendorKey;
int hashCode2 = (hashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
String str3 = this.vendorURL;
return hashCode2 + (str3 != null ? str3.hashCode() : 0);
}
public String toString() {
return "OmSdkData(params=" + this.params + ", vendorKey=" + this.vendorKey + ", vendorURL=" + this.vendorURL + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<OmSdkData> serializer() {
return OmSdkData$$serializer.INSTANCE;
}
}
public /* synthetic */ OmSdkData(int i, String str, String str2, String str3, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.params = null;
} else {
this.params = str;
}
if ((i & 2) == 0) {
this.vendorKey = null;
} else {
this.vendorKey = str2;
}
if ((i & 4) == 0) {
this.vendorURL = null;
} else {
this.vendorURL = str3;
}
}
public OmSdkData(String str, String str2, String str3) {
this.params = str;
this.vendorKey = str2;
this.vendorURL = str3;
}
public static final void write$Self(OmSdkData self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.params != null) {
output.encodeNullableSerializableElement(serialDesc, 0, StringSerializer.INSTANCE, self.params);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.vendorKey != null) {
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.vendorKey);
}
if (!output.shouldEncodeElementDefault(serialDesc, 2) && self.vendorURL == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 2, StringSerializer.INSTANCE, self.vendorURL);
}
public /* synthetic */ OmSdkData(String str, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : str2, (i & 4) != 0 ? null : str3);
}
}

View File

@@ -0,0 +1,105 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class Placement$$serializer implements GeneratedSerializer<Placement> {
public static final Placement$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
Placement$$serializer placement$$serializer = new Placement$$serializer();
INSTANCE = placement$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.Placement", placement$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement("placement_ref_id", false);
pluginGeneratedSerialDescriptor.addElement("is_hb", true);
pluginGeneratedSerialDescriptor.addElement("type", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private Placement$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) BooleanSerializer.INSTANCE, BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public Placement m3937deserialize(Decoder decoder) {
boolean z;
int i;
String str;
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
String decodeStringElement = beginStructure.decodeStringElement(descriptor2, 0);
boolean decodeBooleanElement = beginStructure.decodeBooleanElement(descriptor2, 1);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, (Object) null);
str = decodeStringElement;
z = decodeBooleanElement;
i = 7;
} else {
boolean z2 = true;
boolean z3 = false;
String str2 = null;
Object obj2 = null;
int i2 = 0;
while (z2) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z2 = false;
} else if (decodeElementIndex == 0) {
str2 = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
} else if (decodeElementIndex == 1) {
z3 = beginStructure.decodeBooleanElement(descriptor2, 1);
i2 |= 2;
} else {
if (decodeElementIndex != 2) {
throw new UnknownFieldException(decodeElementIndex);
}
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, StringSerializer.INSTANCE, obj2);
i2 |= 4;
}
}
z = z3;
i = i2;
str = str2;
obj = obj2;
}
beginStructure.endStructure(descriptor2);
return new Placement(i, str, z, (String) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, Placement value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
Placement.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,206 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.Constants;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.Transient;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class Placement {
public static final Companion Companion = new Companion(null);
private final boolean headerBidding;
private final String referenceId;
private final String type;
private Long wakeupTime;
public static /* synthetic */ Placement copy$default(Placement placement, String str, boolean z, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = placement.referenceId;
}
if ((i & 2) != 0) {
z = placement.headerBidding;
}
if ((i & 4) != 0) {
str2 = placement.type;
}
return placement.copy(str, z, str2);
}
@SerialName("is_hb")
public static /* synthetic */ void getHeaderBidding$annotations() {
}
@SerialName("placement_ref_id")
public static /* synthetic */ void getReferenceId$annotations() {
}
@SerialName("type")
public static /* synthetic */ void getType$annotations() {
}
@Transient
public static /* synthetic */ void getWakeupTime$annotations() {
}
public final String component1() {
return this.referenceId;
}
public final boolean component2() {
return this.headerBidding;
}
public final String component3() {
return this.type;
}
public final Placement copy(String referenceId, boolean z, String str) {
Intrinsics.checkNotNullParameter(referenceId, "referenceId");
return new Placement(referenceId, z, str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Placement)) {
return false;
}
Placement placement = (Placement) obj;
return Intrinsics.areEqual(this.referenceId, placement.referenceId) && this.headerBidding == placement.headerBidding && Intrinsics.areEqual(this.type, placement.type);
}
public final boolean getHeaderBidding() {
return this.headerBidding;
}
public final String getReferenceId() {
return this.referenceId;
}
public final String getType() {
return this.type;
}
public final Long getWakeupTime() {
return this.wakeupTime;
}
/* JADX WARN: Multi-variable type inference failed */
public int hashCode() {
int hashCode = this.referenceId.hashCode() * 31;
boolean z = this.headerBidding;
int i = z;
if (z != 0) {
i = 1;
}
int i2 = (hashCode + i) * 31;
String str = this.type;
return i2 + (str == null ? 0 : str.hashCode());
}
public final void setWakeupTime(Long l) {
this.wakeupTime = l;
}
public String toString() {
return "Placement(referenceId=" + this.referenceId + ", headerBidding=" + this.headerBidding + ", type=" + this.type + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<Placement> serializer() {
return Placement$$serializer.INSTANCE;
}
}
public /* synthetic */ Placement(int i, @SerialName("placement_ref_id") String str, @SerialName("is_hb") boolean z, @SerialName("type") String str2, SerializationConstructorMarker serializationConstructorMarker) {
if (1 != (i & 1)) {
PluginExceptionsKt.throwMissingFieldException(i, 1, Placement$$serializer.INSTANCE.getDescriptor());
}
this.referenceId = str;
if ((i & 2) == 0) {
this.headerBidding = false;
} else {
this.headerBidding = z;
}
if ((i & 4) == 0) {
this.type = null;
} else {
this.type = str2;
}
this.wakeupTime = null;
}
public Placement(String referenceId, boolean z, String str) {
Intrinsics.checkNotNullParameter(referenceId, "referenceId");
this.referenceId = referenceId;
this.headerBidding = z;
this.type = str;
}
public static final void write$Self(Placement self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
output.encodeStringElement(serialDesc, 0, self.referenceId);
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.headerBidding) {
output.encodeBooleanElement(serialDesc, 1, self.headerBidding);
}
if (!output.shouldEncodeElementDefault(serialDesc, 2) && self.type == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 2, StringSerializer.INSTANCE, self.type);
}
public /* synthetic */ Placement(String str, boolean z, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? false : z, (i & 4) != 0 ? null : str2);
}
public final boolean isNative() {
return Intrinsics.areEqual(this.type, "native");
}
public final boolean isInline() {
return Intrinsics.areEqual(this.type, "in_line");
}
public final boolean isBanner() {
return Intrinsics.areEqual(this.type, "banner");
}
public final boolean isMREC() {
return Intrinsics.areEqual(this.type, "mrec");
}
public final boolean isInterstitial() {
return Intrinsics.areEqual(this.type, "interstitial");
}
public final boolean isAppOpen() {
return Intrinsics.areEqual(this.type, Constants.PLACEMENT_TYPE_APP_OPEN);
}
public final boolean isRewardedVideo() {
return Intrinsics.areEqual(this.type, "rewarded");
}
public final void snooze(long j) {
this.wakeupTime = Long.valueOf(System.currentTimeMillis() + (j * 1000));
}
}

View File

@@ -0,0 +1,83 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class RtbRequest$$serializer implements GeneratedSerializer<RtbRequest> {
public static final RtbRequest$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
RtbRequest$$serializer rtbRequest$$serializer = new RtbRequest$$serializer();
INSTANCE = rtbRequest$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.RtbRequest", rtbRequest$$serializer, 1);
pluginGeneratedSerialDescriptor.addElement("sdk_user_agent", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private RtbRequest$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public RtbRequest m3938deserialize(Decoder decoder) {
Object obj;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
int i = 1;
if (beginStructure.decodeSequentially()) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, (Object) null);
} else {
int i2 = 0;
obj = null;
while (i != 0) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
i = 0;
} else {
if (decodeElementIndex != 0) {
throw new UnknownFieldException(decodeElementIndex);
}
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 0, StringSerializer.INSTANCE, obj);
i2 |= 1;
}
}
i = i2;
}
beginStructure.endStructure(descriptor2);
return new RtbRequest(i, (String) obj, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, RtbRequest value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
RtbRequest.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,104 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class RtbRequest {
public static final Companion Companion = new Companion(null);
private final String sdkUserAgent;
/* JADX WARN: Multi-variable type inference failed */
public RtbRequest() {
this((String) null, 1, (DefaultConstructorMarker) (0 == true ? 1 : 0));
}
public static /* synthetic */ RtbRequest copy$default(RtbRequest rtbRequest, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = rtbRequest.sdkUserAgent;
}
return rtbRequest.copy(str);
}
@SerialName("sdk_user_agent")
public static /* synthetic */ void getSdkUserAgent$annotations() {
}
public final String component1() {
return this.sdkUserAgent;
}
public final RtbRequest copy(String str) {
return new RtbRequest(str);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
return (obj instanceof RtbRequest) && Intrinsics.areEqual(this.sdkUserAgent, ((RtbRequest) obj).sdkUserAgent);
}
public final String getSdkUserAgent() {
return this.sdkUserAgent;
}
public int hashCode() {
String str = this.sdkUserAgent;
if (str == null) {
return 0;
}
return str.hashCode();
}
public String toString() {
return "RtbRequest(sdkUserAgent=" + this.sdkUserAgent + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<RtbRequest> serializer() {
return RtbRequest$$serializer.INSTANCE;
}
}
public /* synthetic */ RtbRequest(int i, @SerialName("sdk_user_agent") String str, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.sdkUserAgent = null;
} else {
this.sdkUserAgent = str;
}
}
public RtbRequest(String str) {
this.sdkUserAgent = str;
}
public static final void write$Self(RtbRequest self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (!output.shouldEncodeElementDefault(serialDesc, 0) && self.sdkUserAgent == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 0, StringSerializer.INSTANCE, self.sdkUserAgent);
}
public /* synthetic */ RtbRequest(String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str);
}
}

View File

@@ -0,0 +1,119 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.builtins.BuiltinSerializersKt;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
/* loaded from: classes4.dex */
public final class RtbToken$$serializer implements GeneratedSerializer<RtbToken> {
public static final RtbToken$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
RtbToken$$serializer rtbToken$$serializer = new RtbToken$$serializer();
INSTANCE = rtbToken$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.RtbToken", rtbToken$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement("device", false);
pluginGeneratedSerialDescriptor.addElement("user", true);
pluginGeneratedSerialDescriptor.addElement("ext", true);
pluginGeneratedSerialDescriptor.addElement("request", true);
pluginGeneratedSerialDescriptor.addElement("ordinal_view", false);
descriptor = pluginGeneratedSerialDescriptor;
}
private RtbToken$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) DeviceNode$$serializer.INSTANCE, BuiltinSerializersKt.getNullable(CommonRequestBody$User$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(CommonRequestBody$RequestExt$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(RtbRequest$$serializer.INSTANCE), (KSerializer) IntSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public RtbToken m3939deserialize(Decoder decoder) {
Object obj;
int i;
Object obj2;
Object obj3;
int i2;
Object obj4;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
obj4 = beginStructure.decodeSerializableElement(descriptor2, 0, DeviceNode$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$User$$serializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$RequestExt$$serializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, RtbRequest$$serializer.INSTANCE, (Object) null);
i2 = beginStructure.decodeIntElement(descriptor2, 4);
obj = decodeNullableSerializableElement;
i = 31;
} else {
boolean z = true;
int i3 = 0;
Object obj5 = null;
Object obj6 = null;
obj = null;
Object obj7 = null;
int i4 = 0;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj5 = beginStructure.decodeSerializableElement(descriptor2, 0, DeviceNode$$serializer.INSTANCE, obj5);
i4 |= 1;
} else if (decodeElementIndex == 1) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, CommonRequestBody$User$$serializer.INSTANCE, obj6);
i4 |= 2;
} else if (decodeElementIndex == 2) {
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 2, CommonRequestBody$RequestExt$$serializer.INSTANCE, obj);
i4 |= 4;
} else if (decodeElementIndex == 3) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, RtbRequest$$serializer.INSTANCE, obj7);
i4 |= 8;
} else {
if (decodeElementIndex != 4) {
throw new UnknownFieldException(decodeElementIndex);
}
i3 = beginStructure.decodeIntElement(descriptor2, 4);
i4 |= 16;
}
}
i = i4;
obj2 = obj6;
obj3 = obj7;
i2 = i3;
obj4 = obj5;
}
beginStructure.endStructure(descriptor2);
return new RtbToken(i, (DeviceNode) obj4, (CommonRequestBody.User) obj2, (CommonRequestBody.RequestExt) obj, (RtbRequest) obj3, i2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, RtbToken value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
RtbToken.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,185 @@
package com.vungle.ads.internal.model;
import com.vungle.ads.internal.model.CommonRequestBody;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
@Serializable
/* loaded from: classes4.dex */
public final class RtbToken {
public static final Companion Companion = new Companion(null);
private final DeviceNode device;
private final CommonRequestBody.RequestExt ext;
private final int ordinalView;
private final RtbRequest request;
private final CommonRequestBody.User user;
public static /* synthetic */ RtbToken copy$default(RtbToken rtbToken, DeviceNode deviceNode, CommonRequestBody.User user, CommonRequestBody.RequestExt requestExt, RtbRequest rtbRequest, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
deviceNode = rtbToken.device;
}
if ((i2 & 2) != 0) {
user = rtbToken.user;
}
CommonRequestBody.User user2 = user;
if ((i2 & 4) != 0) {
requestExt = rtbToken.ext;
}
CommonRequestBody.RequestExt requestExt2 = requestExt;
if ((i2 & 8) != 0) {
rtbRequest = rtbToken.request;
}
RtbRequest rtbRequest2 = rtbRequest;
if ((i2 & 16) != 0) {
i = rtbToken.ordinalView;
}
return rtbToken.copy(deviceNode, user2, requestExt2, rtbRequest2, i);
}
@SerialName("ordinal_view")
public static /* synthetic */ void getOrdinalView$annotations() {
}
public final DeviceNode component1() {
return this.device;
}
public final CommonRequestBody.User component2() {
return this.user;
}
public final CommonRequestBody.RequestExt component3() {
return this.ext;
}
public final RtbRequest component4() {
return this.request;
}
public final int component5() {
return this.ordinalView;
}
public final RtbToken copy(DeviceNode device, CommonRequestBody.User user, CommonRequestBody.RequestExt requestExt, RtbRequest rtbRequest, int i) {
Intrinsics.checkNotNullParameter(device, "device");
return new RtbToken(device, user, requestExt, rtbRequest, i);
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof RtbToken)) {
return false;
}
RtbToken rtbToken = (RtbToken) obj;
return Intrinsics.areEqual(this.device, rtbToken.device) && Intrinsics.areEqual(this.user, rtbToken.user) && Intrinsics.areEqual(this.ext, rtbToken.ext) && Intrinsics.areEqual(this.request, rtbToken.request) && this.ordinalView == rtbToken.ordinalView;
}
public final DeviceNode getDevice() {
return this.device;
}
public final CommonRequestBody.RequestExt getExt() {
return this.ext;
}
public final int getOrdinalView() {
return this.ordinalView;
}
public final RtbRequest getRequest() {
return this.request;
}
public final CommonRequestBody.User getUser() {
return this.user;
}
public int hashCode() {
int hashCode = this.device.hashCode() * 31;
CommonRequestBody.User user = this.user;
int hashCode2 = (hashCode + (user == null ? 0 : user.hashCode())) * 31;
CommonRequestBody.RequestExt requestExt = this.ext;
int hashCode3 = (hashCode2 + (requestExt == null ? 0 : requestExt.hashCode())) * 31;
RtbRequest rtbRequest = this.request;
return ((hashCode3 + (rtbRequest != null ? rtbRequest.hashCode() : 0)) * 31) + Integer.hashCode(this.ordinalView);
}
public String toString() {
return "RtbToken(device=" + this.device + ", user=" + this.user + ", ext=" + this.ext + ", request=" + this.request + ", ordinalView=" + this.ordinalView + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<RtbToken> serializer() {
return RtbToken$$serializer.INSTANCE;
}
}
public /* synthetic */ RtbToken(int i, DeviceNode deviceNode, CommonRequestBody.User user, CommonRequestBody.RequestExt requestExt, RtbRequest rtbRequest, @SerialName("ordinal_view") int i2, SerializationConstructorMarker serializationConstructorMarker) {
if (17 != (i & 17)) {
PluginExceptionsKt.throwMissingFieldException(i, 17, RtbToken$$serializer.INSTANCE.getDescriptor());
}
this.device = deviceNode;
if ((i & 2) == 0) {
this.user = null;
} else {
this.user = user;
}
if ((i & 4) == 0) {
this.ext = null;
} else {
this.ext = requestExt;
}
if ((i & 8) == 0) {
this.request = null;
} else {
this.request = rtbRequest;
}
this.ordinalView = i2;
}
public RtbToken(DeviceNode device, CommonRequestBody.User user, CommonRequestBody.RequestExt requestExt, RtbRequest rtbRequest, int i) {
Intrinsics.checkNotNullParameter(device, "device");
this.device = device;
this.user = user;
this.ext = requestExt;
this.request = rtbRequest;
this.ordinalView = i;
}
public static final void write$Self(RtbToken self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
output.encodeSerializableElement(serialDesc, 0, DeviceNode$$serializer.INSTANCE, self.device);
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.user != null) {
output.encodeNullableSerializableElement(serialDesc, 1, CommonRequestBody$User$$serializer.INSTANCE, self.user);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.ext != null) {
output.encodeNullableSerializableElement(serialDesc, 2, CommonRequestBody$RequestExt$$serializer.INSTANCE, self.ext);
}
if (output.shouldEncodeElementDefault(serialDesc, 3) || self.request != null) {
output.encodeNullableSerializableElement(serialDesc, 3, RtbRequest$$serializer.INSTANCE, self.request);
}
output.encodeIntElement(serialDesc, 4, self.ordinalView);
}
public /* synthetic */ RtbToken(DeviceNode deviceNode, CommonRequestBody.User user, CommonRequestBody.RequestExt requestExt, RtbRequest rtbRequest, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(deviceNode, (i2 & 2) != 0 ? null : user, (i2 & 4) != 0 ? null : requestExt, (i2 & 8) != 0 ? null : rtbRequest, i);
}
}

View File

@@ -0,0 +1,92 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.UnknownFieldException;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeDecoder;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.encoding.Decoder;
import kotlinx.serialization.encoding.Encoder;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class UnclosedAd$$serializer implements GeneratedSerializer<UnclosedAd> {
public static final UnclosedAd$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
UnclosedAd$$serializer unclosedAd$$serializer = new UnclosedAd$$serializer();
INSTANCE = unclosedAd$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.internal.model.UnclosedAd", unclosedAd$$serializer, 2);
pluginGeneratedSerialDescriptor.addElement("107", false);
pluginGeneratedSerialDescriptor.addElement("101", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private UnclosedAd$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{(KSerializer) StringSerializer.INSTANCE, (KSerializer) StringSerializer.INSTANCE};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public UnclosedAd m3940deserialize(Decoder decoder) {
String str;
String str2;
int i;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
if (beginStructure.decodeSequentially()) {
str = beginStructure.decodeStringElement(descriptor2, 0);
str2 = beginStructure.decodeStringElement(descriptor2, 1);
i = 3;
} else {
boolean z = true;
int i2 = 0;
str = null;
String str3 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
str = beginStructure.decodeStringElement(descriptor2, 0);
i2 |= 1;
} else {
if (decodeElementIndex != 1) {
throw new UnknownFieldException(decodeElementIndex);
}
str3 = beginStructure.decodeStringElement(descriptor2, 1);
i2 |= 2;
}
}
str2 = str3;
i = i2;
}
beginStructure.endStructure(descriptor2);
return new UnclosedAd(i, str, str2, (SerializationConstructorMarker) null);
}
public void serialize(Encoder encoder, UnclosedAd value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
UnclosedAd.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,127 @@
package com.vungle.ads.internal.model;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
@Serializable
/* loaded from: classes4.dex */
public final class UnclosedAd {
public static final Companion Companion = new Companion(null);
private final String eventId;
private String sessionId;
public static /* synthetic */ UnclosedAd copy$default(UnclosedAd unclosedAd, String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str = unclosedAd.eventId;
}
if ((i & 2) != 0) {
str2 = unclosedAd.sessionId;
}
return unclosedAd.copy(str, str2);
}
@SerialName("107")
public static /* synthetic */ void getEventId$annotations() {
}
@SerialName("101")
public static /* synthetic */ void getSessionId$annotations() {
}
public final String component1() {
return this.eventId;
}
public final String component2() {
return this.sessionId;
}
public final UnclosedAd copy(String eventId, String sessionId) {
Intrinsics.checkNotNullParameter(eventId, "eventId");
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
return new UnclosedAd(eventId, sessionId);
}
public final String getEventId() {
return this.eventId;
}
public final String getSessionId() {
return this.sessionId;
}
public final void setSessionId(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.sessionId = str;
}
public String toString() {
return "UnclosedAd(eventId=" + this.eventId + ", sessionId=" + this.sessionId + ')';
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<UnclosedAd> serializer() {
return UnclosedAd$$serializer.INSTANCE;
}
}
public /* synthetic */ UnclosedAd(int i, @SerialName("107") String str, @SerialName("101") String str2, SerializationConstructorMarker serializationConstructorMarker) {
if (1 != (i & 1)) {
PluginExceptionsKt.throwMissingFieldException(i, 1, UnclosedAd$$serializer.INSTANCE.getDescriptor());
}
this.eventId = str;
if ((i & 2) == 0) {
this.sessionId = "";
} else {
this.sessionId = str2;
}
}
public UnclosedAd(String eventId, String sessionId) {
Intrinsics.checkNotNullParameter(eventId, "eventId");
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
this.eventId = eventId;
this.sessionId = sessionId;
}
public static final void write$Self(UnclosedAd self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
output.encodeStringElement(serialDesc, 0, self.eventId);
if (!output.shouldEncodeElementDefault(serialDesc, 1) && Intrinsics.areEqual(self.sessionId, "")) {
return;
}
output.encodeStringElement(serialDesc, 1, self.sessionId);
}
public /* synthetic */ UnclosedAd(String str, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? "" : str2);
}
public boolean equals(Object obj) {
if (obj == null || !Intrinsics.areEqual(UnclosedAd.class, obj.getClass())) {
return false;
}
UnclosedAd unclosedAd = (UnclosedAd) obj;
return Intrinsics.areEqual(this.eventId, unclosedAd.eventId) && Intrinsics.areEqual(this.sessionId, unclosedAd.sessionId);
}
public int hashCode() {
return (this.eventId.hashCode() * 31) + this.sessionId.hashCode();
}
}

View File

@@ -0,0 +1,14 @@
package com.vungle.ads.internal.network;
import java.io.IOException;
/* loaded from: classes4.dex */
public interface Call<T> {
void cancel();
void enqueue(Callback<T> callback);
Response<T> execute() throws IOException;
boolean isCanceled();
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads.internal.network;
/* loaded from: classes4.dex */
public interface Callback<T> {
void onFailure(Call<T> call, Throwable th);
void onResponse(Call<T> call, Response<T> response);
}

View File

@@ -0,0 +1,262 @@
package com.vungle.ads.internal.network;
import com.vungle.ads.internal.network.converters.Converter;
import com.vungle.ads.internal.util.Logger;
import java.io.IOException;
import java.util.Objects;
import kotlin.Unit;
import kotlin.io.CloseableKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.MediaType;
import okhttp3.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
import okio.Okio;
/* loaded from: classes4.dex */
public final class OkHttpCall<T> implements Call<T> {
public static final Companion Companion = new Companion(null);
private static final String TAG = "OkHttpCall";
private volatile boolean canceled;
private final okhttp3.Call rawCall;
private final Converter<ResponseBody, T> responseConverter;
public OkHttpCall(okhttp3.Call rawCall, Converter<ResponseBody, T> responseConverter) {
Intrinsics.checkNotNullParameter(rawCall, "rawCall");
Intrinsics.checkNotNullParameter(responseConverter, "responseConverter");
this.rawCall = rawCall;
this.responseConverter = responseConverter;
}
@Override // com.vungle.ads.internal.network.Call
public void enqueue(final Callback<T> callback) {
okhttp3.Call call;
Intrinsics.checkNotNullParameter(callback, "callback");
Objects.requireNonNull(callback, "callback == null");
synchronized (this) {
call = this.rawCall;
Unit unit = Unit.INSTANCE;
}
if (this.canceled) {
call.cancel();
}
call.enqueue(new okhttp3.Callback(this) { // from class: com.vungle.ads.internal.network.OkHttpCall$enqueue$2
final /* synthetic */ OkHttpCall<T> this$0;
{
this.this$0 = this;
}
@Override // okhttp3.Callback
public void onResponse(okhttp3.Call call2, okhttp3.Response response) {
Intrinsics.checkNotNullParameter(call2, "call");
Intrinsics.checkNotNullParameter(response, "response");
try {
try {
callback.onResponse(this.this$0, this.this$0.parseResponse(response));
} catch (Throwable th) {
OkHttpCall.Companion.throwIfFatal(th);
Logger.Companion.e("OkHttpCall", "Cannot pass response to callback", th);
}
} catch (Throwable th2) {
OkHttpCall.Companion.throwIfFatal(th2);
callFailure(th2);
}
}
@Override // okhttp3.Callback
public void onFailure(okhttp3.Call call2, IOException e) {
Intrinsics.checkNotNullParameter(call2, "call");
Intrinsics.checkNotNullParameter(e, "e");
callFailure(e);
}
private final void callFailure(Throwable th) {
try {
callback.onFailure(this.this$0, th);
} catch (Throwable th2) {
OkHttpCall.Companion.throwIfFatal(th2);
Logger.Companion.e("OkHttpCall", "Cannot pass failure to callback", th2);
}
}
});
}
@Override // com.vungle.ads.internal.network.Call
public Response<T> execute() throws IOException {
okhttp3.Call call;
synchronized (this) {
call = this.rawCall;
Unit unit = Unit.INSTANCE;
}
if (this.canceled) {
call.cancel();
}
return parseResponse(call.execute());
}
public final Response<T> parseResponse(okhttp3.Response rawResp) throws IOException {
Intrinsics.checkNotNullParameter(rawResp, "rawResp");
ResponseBody body = rawResp.body();
if (body == null) {
return null;
}
okhttp3.Response build = rawResp.newBuilder().body(new NoContentResponseBody(body.contentType(), body.contentLength())).build();
int code = build.code();
if (code >= 200 && code < 300) {
if (code == 204 || code == 205) {
body.close();
return Response.Companion.success(null, build);
}
ExceptionCatchingResponseBody exceptionCatchingResponseBody = new ExceptionCatchingResponseBody(body);
try {
return Response.Companion.success(this.responseConverter.convert(exceptionCatchingResponseBody), build);
} catch (RuntimeException e) {
exceptionCatchingResponseBody.throwIfCaught();
throw e;
}
}
try {
Response<T> error = Response.Companion.error(buffer(body), build);
CloseableKt.closeFinally(body, null);
return error;
} finally {
}
}
private final ResponseBody buffer(ResponseBody responseBody) throws IOException {
Buffer buffer = new Buffer();
responseBody.source().readAll(buffer);
return ResponseBody.Companion.create(buffer, responseBody.contentType(), responseBody.contentLength());
}
@Override // com.vungle.ads.internal.network.Call
public void cancel() {
okhttp3.Call call;
this.canceled = true;
synchronized (this) {
call = this.rawCall;
Unit unit = Unit.INSTANCE;
}
call.cancel();
}
@Override // com.vungle.ads.internal.network.Call
public boolean isCanceled() {
boolean isCanceled;
if (this.canceled) {
return true;
}
synchronized (this) {
isCanceled = this.rawCall.isCanceled();
}
return isCanceled;
}
public static final class NoContentResponseBody extends ResponseBody {
private final long contentLength;
private final MediaType contentType;
@Override // okhttp3.ResponseBody
public long contentLength() {
return this.contentLength;
}
@Override // okhttp3.ResponseBody
public MediaType contentType() {
return this.contentType;
}
public NoContentResponseBody(MediaType mediaType, long j) {
this.contentType = mediaType;
this.contentLength = j;
}
@Override // okhttp3.ResponseBody
public BufferedSource source() {
throw new IllegalStateException("Cannot read raw response body of a converted body.");
}
}
public static final class ExceptionCatchingResponseBody extends ResponseBody {
private final ResponseBody delegate;
private final BufferedSource delegateSource;
private IOException thrownException;
public final IOException getThrownException() {
return this.thrownException;
}
public final void setThrownException(IOException iOException) {
this.thrownException = iOException;
}
@Override // okhttp3.ResponseBody
public BufferedSource source() {
return this.delegateSource;
}
public ExceptionCatchingResponseBody(ResponseBody delegate) {
Intrinsics.checkNotNullParameter(delegate, "delegate");
this.delegate = delegate;
this.delegateSource = Okio.buffer(new ForwardingSource(delegate.source()) { // from class: com.vungle.ads.internal.network.OkHttpCall.ExceptionCatchingResponseBody.1
@Override // okio.ForwardingSource, okio.Source
public long read(Buffer sink, long j) throws IOException {
Intrinsics.checkNotNullParameter(sink, "sink");
try {
return super.read(sink, j);
} catch (IOException e) {
ExceptionCatchingResponseBody.this.setThrownException(e);
throw e;
}
}
});
}
@Override // okhttp3.ResponseBody
public MediaType contentType() {
return this.delegate.contentType();
}
@Override // okhttp3.ResponseBody
public long contentLength() {
return this.delegate.contentLength();
}
@Override // okhttp3.ResponseBody, java.io.Closeable, java.lang.AutoCloseable
public void close() {
this.delegate.close();
}
public final void throwIfCaught() throws IOException {
IOException iOException = this.thrownException;
if (iOException != null) {
throw iOException;
}
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
/* JADX INFO: Access modifiers changed from: private */
public final void throwIfFatal(Throwable th) {
if (th instanceof VirtualMachineError) {
throw th;
}
if (th instanceof ThreadDeath) {
throw th;
}
if (th instanceof LinkageError) {
throw th;
}
}
}
}

View File

@@ -0,0 +1,83 @@
package com.vungle.ads.internal.network;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import okhttp3.Headers;
import okhttp3.ResponseBody;
/* loaded from: classes4.dex */
public final class Response<T> {
public static final Companion Companion = new Companion(null);
private final T body;
private final ResponseBody errorBody;
private final okhttp3.Response rawResponse;
public /* synthetic */ Response(okhttp3.Response response, Object obj, ResponseBody responseBody, DefaultConstructorMarker defaultConstructorMarker) {
this(response, obj, responseBody);
}
public final T body() {
return this.body;
}
public final ResponseBody errorBody() {
return this.errorBody;
}
public final okhttp3.Response raw() {
return this.rawResponse;
}
private Response(okhttp3.Response response, T t, ResponseBody responseBody) {
this.rawResponse = response;
this.body = t;
this.errorBody = responseBody;
}
public final int code() {
return this.rawResponse.code();
}
public final String message() {
return this.rawResponse.message();
}
public final Headers headers() {
return this.rawResponse.headers();
}
public final boolean isSuccessful() {
return this.rawResponse.isSuccessful();
}
public String toString() {
return this.rawResponse.toString();
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
/* JADX WARN: Multi-variable type inference failed */
public final <T> Response<T> success(T t, okhttp3.Response rawResponse) {
Intrinsics.checkNotNullParameter(rawResponse, "rawResponse");
if (!rawResponse.isSuccessful()) {
throw new IllegalArgumentException("rawResponse must be successful response".toString());
}
return new Response<>(rawResponse, t, null, 0 == true ? 1 : 0);
}
public final <T> Response<T> error(ResponseBody responseBody, okhttp3.Response rawResponse) {
Intrinsics.checkNotNullParameter(rawResponse, "rawResponse");
if (!(!rawResponse.isSuccessful())) {
throw new IllegalArgumentException("rawResponse should not be successful response".toString());
}
DefaultConstructorMarker defaultConstructorMarker = null;
return new Response<>(rawResponse, defaultConstructorMarker, responseBody, defaultConstructorMarker);
}
}
}

View File

@@ -0,0 +1,229 @@
package com.vungle.ads.internal.network;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.TpatRetryFailure;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.load.BaseAdLoader;
import com.vungle.ads.internal.persistence.FilePreferences;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.PathProvider;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.regex.Pattern;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.reflect.KTypeProjection;
import kotlin.text.Regex;
import kotlinx.serialization.DeserializationStrategy;
import kotlinx.serialization.SerializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.modules.SerializersModule;
/* loaded from: classes4.dex */
public final class TpatSender {
public static final Companion Companion = new Companion(null);
private static final String FAILED_TPATS = "FAILED_TPATS";
private static final int MAX_RETRIES = 5;
private static final String TAG = "TpatSender";
private final String creativeId;
private final String eventId;
private final String placementId;
private final SignalManager signalManager;
private final FilePreferences tpatFilePreferences;
private final VungleApiClient vungleApiClient;
public final String getCreativeId() {
return this.creativeId;
}
public final String getEventId() {
return this.eventId;
}
public final String getPlacementId() {
return this.placementId;
}
public final SignalManager getSignalManager() {
return this.signalManager;
}
public final VungleApiClient getVungleApiClient() {
return this.vungleApiClient;
}
public TpatSender(VungleApiClient vungleApiClient, String str, String str2, String str3, Executor ioExecutor, PathProvider pathProvider, SignalManager signalManager) {
Intrinsics.checkNotNullParameter(vungleApiClient, "vungleApiClient");
Intrinsics.checkNotNullParameter(ioExecutor, "ioExecutor");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
this.vungleApiClient = vungleApiClient;
this.placementId = str;
this.creativeId = str2;
this.eventId = str3;
this.signalManager = signalManager;
this.tpatFilePreferences = FilePreferences.Companion.get(ioExecutor, pathProvider, FilePreferences.TPAT_FAILED_FILENAME);
}
public /* synthetic */ TpatSender(VungleApiClient vungleApiClient, String str, String str2, String str3, Executor executor, PathProvider pathProvider, SignalManager signalManager, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(vungleApiClient, str, str2, str3, executor, pathProvider, (i & 64) != 0 ? null : signalManager);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public final void sendWinNotification(String urlString, Executor executor) {
Intrinsics.checkNotNullParameter(urlString, "urlString");
Intrinsics.checkNotNullParameter(executor, "executor");
final String injectSessionIdToUrl = injectSessionIdToUrl(urlString);
executor.execute(new Runnable() { // from class: com.vungle.ads.internal.network.TpatSender$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
TpatSender.m3942sendWinNotification$lambda0(TpatSender.this, injectSessionIdToUrl);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: sendWinNotification$lambda-0, reason: not valid java name */
public static final void m3942sendWinNotification$lambda0(TpatSender this$0, String url) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(url, "$url");
BaseAdLoader.ErrorInfo pingTPAT = this$0.vungleApiClient.pingTPAT(url);
if (pingTPAT != null) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(Sdk.SDKError.Reason.AD_WIN_NOTIFICATION_ERROR, "Fail to send " + url + ", error: " + pingTPAT.getDescription(), this$0.placementId, this$0.creativeId, this$0.eventId);
}
}
public final void sendTpat(final String url, Executor executor) {
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(executor, "executor");
final String injectSessionIdToUrl = injectSessionIdToUrl(url);
executor.execute(new Runnable() { // from class: com.vungle.ads.internal.network.TpatSender$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
TpatSender.m3941sendTpat$lambda2(TpatSender.this, url, injectSessionIdToUrl);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: sendTpat$lambda-2, reason: not valid java name */
public static final void m3941sendTpat$lambda2(TpatSender this$0, String url, String urlWithSessionId) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(url, "$url");
Intrinsics.checkNotNullParameter(urlWithSessionId, "$urlWithSessionId");
HashMap<String, Integer> storedTpats = this$0.getStoredTpats();
Integer num = storedTpats.get(url);
if (num == null) {
num = 0;
}
int intValue = num.intValue();
BaseAdLoader.ErrorInfo pingTPAT = this$0.vungleApiClient.pingTPAT(urlWithSessionId);
if (pingTPAT == null) {
if (intValue != 0) {
storedTpats.remove(url);
this$0.saveStoredTpats(storedTpats);
return;
}
return;
}
if (!pingTPAT.getErrorIsTerminal()) {
if (intValue >= 5) {
storedTpats.remove(url);
this$0.saveStoredTpats(storedTpats);
new TpatRetryFailure(urlWithSessionId).logErrorNoReturnValue$vungle_ads_release();
} else {
storedTpats.put(url, Integer.valueOf(intValue + 1));
this$0.saveStoredTpats(storedTpats);
}
}
Logger.Companion.e(TAG, "TPAT failed with " + pingTPAT.getDescription() + ", url:" + urlWithSessionId);
if (pingTPAT.getReason() != 29) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(Sdk.SDKError.Reason.TPAT_ERROR, "Fail to send " + urlWithSessionId + ", error: " + pingTPAT.getDescription(), this$0.placementId, this$0.creativeId, this$0.eventId);
return;
}
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(Sdk.SDKMetric.SDKMetricType.NOTIFICATION_REDIRECT, (r15 & 2) != 0 ? 0L : 0L, (r15 & 4) != 0 ? null : this$0.placementId, (r15 & 8) != 0 ? null : null, (r15 & 16) != 0 ? null : null, (r15 & 32) == 0 ? urlWithSessionId : null);
}
private final HashMap<String, Integer> getStoredTpats() {
HashMap<String, Integer> hashMap;
String string = this.tpatFilePreferences.getString(FAILED_TPATS);
try {
if (string != null) {
StringFormat stringFormat = Json.Default;
SerializersModule serializersModule = stringFormat.getSerializersModule();
KTypeProjection.Companion companion = KTypeProjection.Companion;
DeserializationStrategy serializer = SerializersKt.serializer(serializersModule, Reflection.typeOf(HashMap.class, companion.invariant(Reflection.typeOf(String.class)), companion.invariant(Reflection.typeOf(Integer.TYPE))));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
hashMap = (HashMap) stringFormat.decodeFromString(serializer, string);
} else {
hashMap = new HashMap<>();
}
return hashMap;
} catch (Exception unused) {
Logger.Companion.e(TAG, "Failed to decode stored tpats: " + string);
return new HashMap<>();
}
}
private final void saveStoredTpats(HashMap<String, Integer> hashMap) {
try {
FilePreferences filePreferences = this.tpatFilePreferences;
StringFormat stringFormat = Json.Default;
SerializersModule serializersModule = stringFormat.getSerializersModule();
KTypeProjection.Companion companion = KTypeProjection.Companion;
SerializationStrategy serializer = SerializersKt.serializer(serializersModule, Reflection.typeOf(HashMap.class, companion.invariant(Reflection.typeOf(String.class)), companion.invariant(Reflection.typeOf(Integer.TYPE))));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
filePreferences.put(FAILED_TPATS, stringFormat.encodeToString(serializer, hashMap)).apply();
} catch (Exception unused) {
Logger.Companion.e(TAG, "Failed to encode the about to storing tpats: " + hashMap);
}
}
public final void resendStoredTpats$vungle_ads_release(Executor executor) {
Intrinsics.checkNotNullParameter(executor, "executor");
Iterator<Map.Entry<String, Integer>> it = getStoredTpats().entrySet().iterator();
while (it.hasNext()) {
sendTpat(it.next().getKey(), executor);
}
}
@VisibleForTesting
public final String injectSessionIdToUrl(String url) {
String str;
Intrinsics.checkNotNullParameter(url, "url");
SignalManager signalManager = this.signalManager;
if (signalManager == null || (str = signalManager.getUuid()) == null) {
str = "";
}
if (str.length() <= 0) {
return url;
}
String quote = Pattern.quote(Constants.SESSION_ID);
Intrinsics.checkNotNullExpressionValue(quote, "quote(Constants.SESSION_ID)");
return new Regex(quote).replace(url, str);
}
public final void sendTpats(Iterable<String> urls, Executor executor) {
Intrinsics.checkNotNullParameter(urls, "urls");
Intrinsics.checkNotNullParameter(executor, "executor");
Iterator<String> it = urls.iterator();
while (it.hasNext()) {
sendTpat(it.next(), executor);
}
}
}

View File

@@ -0,0 +1,27 @@
package com.vungle.ads.internal.network;
import androidx.annotation.Keep;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.CommonRequestBody;
import com.vungle.ads.internal.model.ConfigPayload;
import okhttp3.RequestBody;
@Keep
/* loaded from: classes4.dex */
public interface VungleApi {
Call<AdPayload> ads(String str, String str2, CommonRequestBody commonRequestBody);
Call<ConfigPayload> config(String str, String str2, CommonRequestBody commonRequestBody);
Call<Void> pingTPAT(String str, String str2);
Call<Void> ri(String str, String str2, CommonRequestBody commonRequestBody);
Call<Void> sendAdMarkup(String str, RequestBody requestBody);
Call<Void> sendErrors(String str, String str2, RequestBody requestBody);
Call<Void> sendMetrics(String str, String str2, RequestBody requestBody);
void setAppId(String str);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,194 @@
package com.vungle.ads.internal.network;
import androidx.annotation.VisibleForTesting;
import com.ironsource.nb;
import com.vungle.ads.AnalyticsClient;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.CommonRequestBody;
import com.vungle.ads.internal.model.ConfigPayload;
import com.vungle.ads.internal.network.converters.EmptyResponseConverter;
import com.vungle.ads.internal.network.converters.JsonConverter;
import java.util.List;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.serialization.SerializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
import okhttp3.Call;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;
/* loaded from: classes4.dex */
public final class VungleApiImpl implements VungleApi {
private static final String VUNGLE_VERSION = "7.1.0";
private String appId;
private final EmptyResponseConverter emptyResponseConverter;
private final Call.Factory okHttpClient;
public static final Companion Companion = new Companion(null);
private static final Json json = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.network.VungleApiImpl$Companion$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
Json.setAllowStructuredMapKeys(true);
}
}, 1, (Object) null);
@VisibleForTesting
public final Call.Factory getOkHttpClient$vungle_ads_release() {
return this.okHttpClient;
}
@Override // com.vungle.ads.internal.network.VungleApi
public void setAppId(String appId) {
Intrinsics.checkNotNullParameter(appId, "appId");
this.appId = appId;
}
public VungleApiImpl(Call.Factory okHttpClient) {
Intrinsics.checkNotNullParameter(okHttpClient, "okHttpClient");
this.okHttpClient = okHttpClient;
this.emptyResponseConverter = new EmptyResponseConverter();
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public static /* synthetic */ Request.Builder defaultBuilder$default(VungleApiImpl vungleApiImpl, String str, String str2, String str3, int i, Object obj) {
if ((i & 4) != 0) {
str3 = null;
}
return vungleApiImpl.defaultBuilder(str, str2, str3);
}
private final Request.Builder defaultBuilder(String str, String str2, String str3) {
Request.Builder addHeader = new Request.Builder().url(str2).addHeader("User-Agent", str).addHeader("Vungle-Version", VUNGLE_VERSION).addHeader("Content-Type", nb.L);
String str4 = this.appId;
if (str4 != null) {
addHeader.addHeader("X-Vungle-App-Id", str4);
}
if (str3 != null) {
addHeader.addHeader("X-Vungle-Placement-Ref-Id", str3);
}
return addHeader;
}
private final Request.Builder defaultProtoBufBuilder(String str, String str2) {
Request.Builder addHeader = new Request.Builder().url(str2).addHeader("User-Agent", str).addHeader("Vungle-Version", VUNGLE_VERSION).addHeader("Content-Type", "application/x-protobuf");
String str3 = this.appId;
if (str3 != null) {
addHeader.addHeader("X-Vungle-App-Id", str3);
}
return addHeader;
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<ConfigPayload> config(String ua, String path, CommonRequestBody body) {
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(path, "path");
Intrinsics.checkNotNullParameter(body, "body");
try {
StringFormat stringFormat = json;
SerializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(CommonRequestBody.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
return new OkHttpCall(this.okHttpClient.newCall(defaultBuilder$default(this, ua, path, null, 4, null).post(RequestBody.Companion.create(stringFormat.encodeToString(serializer, body), (MediaType) null)).build()), new JsonConverter(Reflection.typeOf(ConfigPayload.class)));
} catch (Exception unused) {
return null;
}
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<AdPayload> ads(String ua, String path, CommonRequestBody body) {
String str;
List<String> placements;
Object firstOrNull;
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(path, "path");
Intrinsics.checkNotNullParameter(body, "body");
try {
StringFormat stringFormat = json;
SerializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(CommonRequestBody.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
String encodeToString = stringFormat.encodeToString(serializer, body);
CommonRequestBody.RequestParam request = body.getRequest();
if (request == null || (placements = request.getPlacements()) == null) {
str = null;
} else {
firstOrNull = CollectionsKt___CollectionsKt.firstOrNull((List) placements);
str = (String) firstOrNull;
}
return new OkHttpCall(this.okHttpClient.newCall(defaultBuilder(ua, path, str).post(RequestBody.Companion.create(encodeToString, (MediaType) null)).build()), new JsonConverter(Reflection.typeOf(AdPayload.class)));
} catch (Exception unused) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(101, "Error with url: " + path, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
return null;
}
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<Void> ri(String ua, String path, CommonRequestBody body) {
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(path, "path");
Intrinsics.checkNotNullParameter(body, "body");
try {
StringFormat stringFormat = json;
SerializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(CommonRequestBody.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
return new OkHttpCall(this.okHttpClient.newCall(defaultBuilder$default(this, ua, path, null, 4, null).post(RequestBody.Companion.create(stringFormat.encodeToString(serializer, body), (MediaType) null)).build()), this.emptyResponseConverter);
} catch (Exception unused) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(101, "Error with url: " + path, (r13 & 4) != 0 ? null : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : null);
return null;
}
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<Void> pingTPAT(String ua, String url) {
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(url, "url");
return new OkHttpCall(this.okHttpClient.newCall(defaultBuilder$default(this, ua, HttpUrl.Companion.get(url).newBuilder().build().toString(), null, 4, null).get().build()), this.emptyResponseConverter);
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<Void> sendMetrics(String ua, String path, RequestBody requestBody) {
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(path, "path");
Intrinsics.checkNotNullParameter(requestBody, "requestBody");
return new OkHttpCall(this.okHttpClient.newCall(defaultProtoBufBuilder(ua, HttpUrl.Companion.get(path).newBuilder().build().toString()).post(requestBody).build()), this.emptyResponseConverter);
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<Void> sendErrors(String ua, String path, RequestBody requestBody) {
Intrinsics.checkNotNullParameter(ua, "ua");
Intrinsics.checkNotNullParameter(path, "path");
Intrinsics.checkNotNullParameter(requestBody, "requestBody");
return new OkHttpCall(this.okHttpClient.newCall(defaultProtoBufBuilder(ua, HttpUrl.Companion.get(path).newBuilder().build().toString()).post(requestBody).build()), this.emptyResponseConverter);
}
@Override // com.vungle.ads.internal.network.VungleApi
public Call<Void> sendAdMarkup(String url, RequestBody requestBody) {
Intrinsics.checkNotNullParameter(url, "url");
Intrinsics.checkNotNullParameter(requestBody, "requestBody");
return new OkHttpCall(this.okHttpClient.newCall(defaultBuilder$default(this, "debug", HttpUrl.Companion.get(url).newBuilder().build().toString(), null, 4, null).post(requestBody).build()), this.emptyResponseConverter);
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads.internal.network.converters;
import java.io.IOException;
/* loaded from: classes4.dex */
public interface Converter<In, Out> {
Out convert(In in) throws IOException;
}

View File

@@ -0,0 +1,15 @@
package com.vungle.ads.internal.network.converters;
import okhttp3.ResponseBody;
/* loaded from: classes4.dex */
public final class EmptyResponseConverter implements Converter<ResponseBody, Void> {
@Override // com.vungle.ads.internal.network.converters.Converter
public Void convert(ResponseBody responseBody) {
if (responseBody == null) {
return null;
}
responseBody.close();
return null;
}
}

View File

@@ -0,0 +1,66 @@
package com.vungle.ads.internal.network.converters;
import java.io.IOException;
import kotlin.Unit;
import kotlin.io.CloseableKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.KType;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
import okhttp3.ResponseBody;
/* loaded from: classes4.dex */
public final class JsonConverter<E> implements Converter<ResponseBody, E> {
public static final Companion Companion = new Companion(null);
private static final Json json = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.network.converters.JsonConverter$Companion$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
Json.setAllowStructuredMapKeys(true);
}
}, 1, (Object) null);
private final KType kType;
public JsonConverter(KType kType) {
Intrinsics.checkNotNullParameter(kType, "kType");
this.kType = kType;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@Override // com.vungle.ads.internal.network.converters.Converter
public E convert(ResponseBody responseBody) throws IOException {
if (responseBody != null) {
try {
String string = responseBody.string();
if (string != null) {
E e = (E) json.decodeFromString(SerializersKt.serializer(Json.Default.getSerializersModule(), this.kType), string);
CloseableKt.closeFinally(responseBody, null);
return e;
}
} finally {
}
}
CloseableKt.closeFinally(responseBody, null);
return null;
}
}

View File

@@ -0,0 +1,106 @@
package com.vungle.ads.internal.omsdk;
import android.util.Base64;
import android.view.View;
import com.iab.omid.library.vungle.Omid;
import com.iab.omid.library.vungle.adsession.AdEvents;
import com.iab.omid.library.vungle.adsession.AdSession;
import com.iab.omid.library.vungle.adsession.AdSessionConfiguration;
import com.iab.omid.library.vungle.adsession.AdSessionContext;
import com.iab.omid.library.vungle.adsession.CreativeType;
import com.iab.omid.library.vungle.adsession.ImpressionType;
import com.iab.omid.library.vungle.adsession.Owner;
import com.iab.omid.library.vungle.adsession.Partner;
import com.iab.omid.library.vungle.adsession.VerificationScriptResource;
import com.vungle.ads.BuildConfig;
import com.vungle.ads.internal.model.OmSdkData;
import com.vungle.ads.internal.util.Logger;
import java.net.URL;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.text.Charsets;
import kotlinx.serialization.DeserializationStrategy;
import kotlinx.serialization.SerializersKt;
import kotlinx.serialization.StringFormat;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
/* loaded from: classes4.dex */
public final class NativeOMTracker {
private AdEvents adEvents;
private AdSession adSession;
private final Json json;
public NativeOMTracker(String omSdkData) {
OmSdkData omSdkData2;
Intrinsics.checkNotNullParameter(omSdkData, "omSdkData");
StringFormat Json$default = JsonKt.Json$default((Json) null, new Function1() { // from class: com.vungle.ads.internal.omsdk.NativeOMTracker$json$1
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((JsonBuilder) obj);
return Unit.INSTANCE;
}
public final void invoke(JsonBuilder Json) {
Intrinsics.checkNotNullParameter(Json, "$this$Json");
Json.setIgnoreUnknownKeys(true);
Json.setEncodeDefaults(true);
Json.setExplicitNulls(false);
}
}, 1, (Object) null);
this.json = Json$default;
try {
AdSessionConfiguration createAdSessionConfiguration = AdSessionConfiguration.createAdSessionConfiguration(CreativeType.NATIVE_DISPLAY, ImpressionType.BEGIN_TO_RENDER, Owner.NATIVE, Owner.NONE, false);
Partner createPartner = Partner.createPartner(BuildConfig.OMSDK_PARTNER_NAME, BuildConfig.VERSION_NAME);
byte[] decode = Base64.decode(omSdkData, 0);
if (decode != null) {
String str = new String(decode, Charsets.UTF_8);
StringFormat stringFormat = Json$default;
DeserializationStrategy serializer = SerializersKt.serializer(stringFormat.getSerializersModule(), Reflection.typeOf(OmSdkData.class));
Intrinsics.checkNotNull(serializer, "null cannot be cast to non-null type kotlinx.serialization.KSerializer<T of kotlinx.serialization.internal.Platform_commonKt.cast>");
omSdkData2 = (OmSdkData) stringFormat.decodeFromString(serializer, str);
} else {
omSdkData2 = null;
}
VerificationScriptResource verificationScriptResource = VerificationScriptResource.createVerificationScriptResourceWithParameters(omSdkData2 != null ? omSdkData2.getVendorKey() : null, new URL(omSdkData2 != null ? omSdkData2.getVendorURL() : null), omSdkData2 != null ? omSdkData2.getParams() : null);
Intrinsics.checkNotNullExpressionValue(verificationScriptResource, "verificationScriptResource");
this.adSession = AdSession.createAdSession(createAdSessionConfiguration, AdSessionContext.createNativeAdSessionContext(createPartner, Res.INSTANCE.getOM_JS$vungle_ads_release(), CollectionsKt__CollectionsJVMKt.listOf(verificationScriptResource), null, null));
} catch (Exception e) {
Logger.Companion.e("NativeOMTracker", "error occured when create omsdk adSession:", e);
}
}
public final void start(View view) {
AdSession adSession;
Intrinsics.checkNotNullParameter(view, "view");
if (!Omid.isActive() || (adSession = this.adSession) == null) {
return;
}
adSession.registerAdView(view);
adSession.start();
AdEvents createAdEvents = AdEvents.createAdEvents(adSession);
this.adEvents = createAdEvents;
if (createAdEvents != null) {
createAdEvents.loaded();
}
}
public final void stop() {
AdSession adSession = this.adSession;
if (adSession != null) {
adSession.finish();
}
this.adSession = null;
}
public final void impressionOccurred() {
AdEvents adEvents = this.adEvents;
if (adEvents != null) {
adEvents.impressionOccurred();
}
}
}

View File

@@ -0,0 +1,94 @@
package com.vungle.ads.internal.omsdk;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import androidx.annotation.WorkerThread;
import com.iab.omid.library.vungle.Omid;
import com.vungle.ads.internal.util.FileUtility;
import com.vungle.ads.internal.util.Logger;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OMInjector {
public static final Companion Companion = new Companion(null);
private static final String OM_SDK_JS = "omsdk.js";
private static final String OM_SESSION_JS = "omsdk-session.js";
private final AtomicReference<Context> contextRef;
private final Handler uiHandler;
public OMInjector(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
this.uiHandler = new Handler(Looper.getMainLooper());
this.contextRef = new AtomicReference<>(context.getApplicationContext());
}
public final void init() {
this.uiHandler.post(new Runnable() { // from class: com.vungle.ads.internal.omsdk.OMInjector$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
OMInjector.m3945init$lambda0(OMInjector.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: init$lambda-0, reason: not valid java name */
public static final void m3945init$lambda0(OMInjector this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
try {
if (Omid.isActive()) {
return;
}
Omid.activate(this$0.contextRef.get());
} catch (NoClassDefFoundError e) {
Logger.Companion.e("OMSDK", "error: " + e.getLocalizedMessage());
}
}
@WorkerThread
public final List<File> injectJsFiles(File dir) throws IOException {
Intrinsics.checkNotNullParameter(dir, "dir");
ArrayList arrayList = new ArrayList();
Res res = Res.INSTANCE;
arrayList.add(writeToFile(res.getOM_JS$vungle_ads_release(), new File(dir, OM_SDK_JS)));
arrayList.add(writeToFile(res.getOM_SESSION_JS$vungle_ads_release(), new File(dir, OM_SESSION_JS)));
return arrayList;
}
private final File writeToFile(String str, File file) throws IOException {
FileWriter fileWriter = null;
try {
FileWriter fileWriter2 = new FileWriter(file);
try {
fileWriter2.write(str);
fileWriter2.flush();
FileUtility.INSTANCE.closeQuietly(fileWriter2);
return file;
} catch (Throwable th) {
th = th;
fileWriter = fileWriter2;
FileUtility.INSTANCE.closeQuietly(fileWriter);
throw th;
}
} catch (Throwable th2) {
th = th2;
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,17 @@
package com.vungle.ads.internal.omsdk;
import androidx.annotation.VisibleForTesting;
import com.iab.omid.library.vungle.Omid;
/* loaded from: classes4.dex */
public final class OMTestUtils {
public static final OMTestUtils INSTANCE = new OMTestUtils();
private OMTestUtils() {
}
@VisibleForTesting
public final boolean isOmidActive() {
return Omid.isActive();
}
}

View File

@@ -0,0 +1,97 @@
package com.vungle.ads.internal.omsdk;
import android.webkit.WebView;
import androidx.annotation.VisibleForTesting;
import com.iab.omid.library.vungle.Omid;
import com.iab.omid.library.vungle.adsession.AdSession;
import com.iab.omid.library.vungle.adsession.AdSessionConfiguration;
import com.iab.omid.library.vungle.adsession.AdSessionContext;
import com.iab.omid.library.vungle.adsession.CreativeType;
import com.iab.omid.library.vungle.adsession.ImpressionType;
import com.iab.omid.library.vungle.adsession.Owner;
import com.iab.omid.library.vungle.adsession.Partner;
import com.vungle.ads.BuildConfig;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OMTracker implements WebViewObserver {
public static final Companion Companion = new Companion(null);
private static final long DESTROY_DELAY_MS = TimeUnit.SECONDS.toMillis(1);
private AdSession adSession;
private final boolean enabled;
private boolean started;
public /* synthetic */ OMTracker(boolean z, DefaultConstructorMarker defaultConstructorMarker) {
this(z);
}
private OMTracker(boolean z) {
this.enabled = z;
}
public static final class Factory {
public final OMTracker make(boolean z) {
return new OMTracker(z, null);
}
}
public final void start() {
if (this.enabled && Omid.isActive()) {
this.started = true;
}
}
public final long stop() {
long j;
AdSession adSession;
if (!this.started || (adSession = this.adSession) == null) {
j = 0;
} else {
if (adSession != null) {
adSession.finish();
}
j = DESTROY_DELAY_MS;
}
this.started = false;
this.adSession = null;
return j;
}
@Override // com.vungle.ads.internal.omsdk.WebViewObserver
public void onPageFinished(WebView webView) {
Intrinsics.checkNotNullParameter(webView, "webView");
if (this.started && this.adSession == null) {
CreativeType creativeType = CreativeType.DEFINED_BY_JAVASCRIPT;
ImpressionType impressionType = ImpressionType.DEFINED_BY_JAVASCRIPT;
Owner owner = Owner.JAVASCRIPT;
AdSession createAdSession = AdSession.createAdSession(AdSessionConfiguration.createAdSessionConfiguration(creativeType, impressionType, owner, owner, false), AdSessionContext.createHtmlAdSessionContext(Partner.createPartner(BuildConfig.OMSDK_PARTNER_NAME, BuildConfig.VERSION_NAME), webView, null, null));
this.adSession = createAdSession;
if (createAdSession != null) {
createAdSession.registerAdView(webView);
}
AdSession adSession = this.adSession;
if (adSession != null) {
adSession.start();
}
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@VisibleForTesting
public static /* synthetic */ void getDESTROY_DELAY_MS$annotations() {
}
private Companion() {
}
public final long getDESTROY_DELAY_MS() {
return OMTracker.DESTROY_DELAY_MS;
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
package com.vungle.ads.internal.omsdk;
import android.webkit.WebView;
/* loaded from: classes4.dex */
public interface WebViewObserver {
void onPageFinished(WebView webView);
}

View File

@@ -0,0 +1,199 @@
package com.vungle.ads.internal.persistence;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.internal.util.CollectionsConcurrencyUtil;
import com.vungle.ads.internal.util.FileUtility;
import com.vungle.ads.internal.util.PathProvider;
import java.io.File;
import java.io.Serializable;
import java.util.HashMap;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class FilePreferences {
public static final String FILENAME = "settings_vungle";
public static final String TPAT_FAILED_FILENAME = "failedTpats";
private final File file;
private final Executor ioExecutor;
private final ConcurrentHashMap<String, Object> values;
public static final Companion Companion = new Companion(null);
private static final ConcurrentHashMap<String, FilePreferences> filePreferenceMap = new ConcurrentHashMap<>();
public /* synthetic */ FilePreferences(Executor executor, PathProvider pathProvider, String str, DefaultConstructorMarker defaultConstructorMarker) {
this(executor, pathProvider, str);
}
public static final synchronized FilePreferences get(Executor executor, PathProvider pathProvider, String str) {
FilePreferences filePreferences;
synchronized (FilePreferences.class) {
filePreferences = Companion.get(executor, pathProvider, str);
}
return filePreferences;
}
private FilePreferences(Executor executor, PathProvider pathProvider, String str) {
this.ioExecutor = executor;
File file = new File(pathProvider.getSharedPrefsDir(), str);
this.file = file;
ConcurrentHashMap<String, Object> concurrentHashMap = new ConcurrentHashMap<>();
this.values = concurrentHashMap;
Object readSerializable = FileUtility.readSerializable(file);
if (readSerializable instanceof HashMap) {
concurrentHashMap.putAll((HashMap) readSerializable);
}
}
public /* synthetic */ FilePreferences(Executor executor, PathProvider pathProvider, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(executor, pathProvider, (i & 4) != 0 ? FILENAME : str);
}
public final void apply() {
final HashMap hashMap = new HashMap(this.values);
this.ioExecutor.execute(new Runnable() { // from class: com.vungle.ads.internal.persistence.FilePreferences$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
FilePreferences.m3947apply$lambda0(FilePreferences.this, hashMap);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: apply$lambda-0, reason: not valid java name */
public static final void m3947apply$lambda0(FilePreferences this$0, Serializable serializable) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(serializable, "$serializable");
FileUtility.writeSerializable(this$0.file, serializable);
}
public final FilePreferences put(String key, boolean z) {
Intrinsics.checkNotNullParameter(key, "key");
this.values.put(key, Boolean.valueOf(z));
return this;
}
public final boolean getBoolean(String key, boolean z) {
Intrinsics.checkNotNullParameter(key, "key");
Object obj = this.values.get(key);
return obj instanceof Boolean ? ((Boolean) obj).booleanValue() : z;
}
public final Boolean getBoolean(String key) {
Intrinsics.checkNotNullParameter(key, "key");
Object obj = this.values.get(key);
if (obj instanceof Boolean) {
return (Boolean) obj;
}
return null;
}
public final FilePreferences put(String key, String value) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(value, "value");
this.values.put(key, value);
return this;
}
public final FilePreferences remove(String key) {
Intrinsics.checkNotNullParameter(key, "key");
if (this.values.containsKey(key)) {
this.values.remove(key);
}
return this;
}
public final String getString(String key, String defaultValue) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
Object obj = this.values.get(key);
return obj instanceof String ? (String) obj : defaultValue;
}
public final String getString(String key) {
Intrinsics.checkNotNullParameter(key, "key");
Object obj = this.values.get(key);
if (obj instanceof String) {
return (String) obj;
}
return null;
}
public final FilePreferences put(String key, int i) {
Intrinsics.checkNotNullParameter(key, "key");
this.values.put(key, Integer.valueOf(i));
return this;
}
public final int getInt(String key, int i) {
Intrinsics.checkNotNullParameter(key, "key");
Object obj = this.values.get(key);
return obj instanceof Integer ? ((Number) obj).intValue() : i;
}
public final FilePreferences put(String key, HashSet<String> hashSet) {
Intrinsics.checkNotNullParameter(key, "key");
this.values.put(key, CollectionsConcurrencyUtil.getNewHashSet(hashSet));
return this;
}
public final HashSet<String> getStringSet(String key, HashSet<String> defaultValue) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
Object obj = this.values.get(key);
return obj instanceof HashSet ? CollectionsConcurrencyUtil.getNewHashSet((HashSet) obj) : defaultValue;
}
public final FilePreferences put(String key, long j) {
Intrinsics.checkNotNullParameter(key, "key");
this.values.put(key, Long.valueOf(j));
return this;
}
public final long getLong(String key, long j) {
Intrinsics.checkNotNullParameter(key, "key");
Object obj = this.values.get(key);
return obj instanceof Long ? ((Number) obj).longValue() : j;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@VisibleForTesting
public static /* synthetic */ void getFILENAME$annotations() {
}
private Companion() {
}
public static /* synthetic */ FilePreferences get$default(Companion companion, Executor executor, PathProvider pathProvider, String str, int i, Object obj) {
if ((i & 4) != 0) {
str = FilePreferences.FILENAME;
}
return companion.get(executor, pathProvider, str);
}
public final synchronized FilePreferences get(Executor ioExecutor, PathProvider pathProvider, String filename) {
Object obj;
Object putIfAbsent;
try {
Intrinsics.checkNotNullParameter(ioExecutor, "ioExecutor");
Intrinsics.checkNotNullParameter(pathProvider, "pathProvider");
Intrinsics.checkNotNullParameter(filename, "filename");
ConcurrentHashMap concurrentHashMap = FilePreferences.filePreferenceMap;
obj = concurrentHashMap.get(filename);
if (obj == null && (putIfAbsent = concurrentHashMap.putIfAbsent(filename, (obj = new FilePreferences(ioExecutor, pathProvider, filename, null)))) != null) {
obj = putIfAbsent;
}
Intrinsics.checkNotNullExpressionValue(obj, "filePreferenceMap.getOrP…, filename)\n }");
} catch (Throwable th) {
throw th;
}
return (FilePreferences) obj;
}
}
}

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;
}
}
}

Some files were not shown because too many files have changed in this diff Show More