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,20 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface Ad {
Boolean canPlayAd();
void load(String str);
public static final class DefaultImpls {
public static /* synthetic */ void load$default(Ad ad, String str, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: load");
}
if ((i & 1) != 0) {
str = null;
}
ad.load(str);
}
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdCantPlayWithoutWebView extends VungleError {
public AdCantPlayWithoutWebView() {
super(Integer.valueOf(VungleError.AD_UNABLE_TO_PLAY), Sdk.SDKError.Reason.AD_HTML_FAILED_TO_LOAD, "No WebView when playing ads.", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,67 @@
package com.vungle.ads;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public class AdConfig {
public static final int AUTO_ROTATE = 2;
public static final Companion Companion = new Companion(null);
public static final int IMMEDIATE_BACK = 2;
public static final int LANDSCAPE = 1;
public static final int PORTRAIT = 0;
private static final String WATERMARK = "WATERMARK";
private int settings;
private Map<String, String> extras = new LinkedHashMap();
private int adOrientation = 2;
@Retention(RetentionPolicy.RUNTIME)
public @interface Orientation {
}
@Retention(RetentionPolicy.RUNTIME)
public @interface Settings {
}
@Orientation
public static /* synthetic */ void getAdOrientation$annotations() {
}
public final int getAdOrientation() {
return this.adOrientation;
}
public final int getSettings() {
return this.settings;
}
public final void setAdOrientation(int i) {
this.adOrientation = i;
}
public final void setBackButtonImmediatelyEnabled(boolean z) {
this.settings = z ? this.settings | 2 : this.settings & (-3);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
public final void setWatermark(String watermark) {
Intrinsics.checkNotNullParameter(watermark, "watermark");
this.extras.put(WATERMARK, watermark);
}
public final String getWatermark$vungle_ads_release() {
return this.extras.get(WATERMARK);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdExpiredError extends VungleError {
public AdExpiredError() {
super(304, Sdk.SDKError.Reason.AD_EXPIRED, "Ad expired", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdExpiredOnPlayError extends VungleError {
public AdExpiredOnPlayError() {
super(307, Sdk.SDKError.Reason.AD_EXPIRED_ON_PLAY, "Ad expired upon playback request", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class AdFailedToDownloadError extends VungleError {
public AdFailedToDownloadError() {
super(Integer.valueOf(VungleError.AD_FAILED_TO_DOWNLOAD), null, null, null, null, null, 62, null);
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class AdMarkupInvalidError extends VungleError {
public AdMarkupInvalidError() {
super(Integer.valueOf(VungleError.AD_MARKUP_INVALID), null, null, null, null, null, 62, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdNotLoadedCantPlay extends VungleError {
public AdNotLoadedCantPlay() {
super(Integer.valueOf(VungleError.AD_UNABLE_TO_PLAY), Sdk.SDKError.Reason.AD_NOT_LOADED, "Failed to retrieve the ad object.", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdRetryActiveError extends VungleError {
public AdRetryActiveError() {
super(Integer.valueOf(VungleError.SERVER_RETRY_ERROR), Sdk.SDKError.Reason.AD_LOAD_FAIL_RETRY_AFTER, "Ads: Server Retry Error active", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class AdRetryError extends VungleError {
public AdRetryError() {
super(Integer.valueOf(VungleError.SERVER_RETRY_ERROR), Sdk.SDKError.Reason.AD_RESPONSE_RETRY_AFTER, "Ads retry-after: Server is busy", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,565 @@
package com.vungle.ads;
import android.annotation.SuppressLint;
import android.os.Build;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;
import com.ironsource.v8;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.util.ActivityManager;
import com.vungle.ads.internal.util.Logger;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AnalyticsClient {
public static final AnalyticsClient INSTANCE = new AnalyticsClient();
private static final String TAG;
private static final BlockingQueue<Sdk.SDKError.Builder> errors;
private static VungleThreadPoolExecutor executor = null;
private static LogLevel logLevel = null;
private static final int maxBatchSize = 20;
private static final BlockingQueue<Sdk.SDKMetric.Builder> metrics;
private static boolean metricsEnabled = false;
private static boolean paused = false;
private static final BlockingQueue<Sdk.SDKError.Builder> pendingErrors;
private static final BlockingQueue<Sdk.SDKMetric.Builder> pendingMetrics;
private static boolean refreshEnabled = false;
private static final long refreshTimeMillis = 5000;
@SuppressLint({"StaticFieldLeak"})
private static SignalManager signalManager;
private static VungleApiClient vungleApiClient;
public interface RequestListener {
void onFailure();
void onSuccess();
}
@VisibleForTesting
public static /* synthetic */ void getErrors$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getExecutor$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getMetrics$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getMetricsEnabled$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getPendingErrors$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getPendingMetrics$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getRefreshEnabled$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getSignalManager$vungle_ads_release$annotations() {
}
@VisibleForTesting
public static /* synthetic */ void getVungleApiClient$vungle_ads_release$annotations() {
}
public final BlockingQueue<Sdk.SDKError.Builder> getErrors$vungle_ads_release() {
return errors;
}
public final VungleThreadPoolExecutor getExecutor$vungle_ads_release() {
return executor;
}
public final BlockingQueue<Sdk.SDKMetric.Builder> getMetrics$vungle_ads_release() {
return metrics;
}
public final boolean getMetricsEnabled$vungle_ads_release() {
return metricsEnabled;
}
public final BlockingQueue<Sdk.SDKError.Builder> getPendingErrors$vungle_ads_release() {
return pendingErrors;
}
public final BlockingQueue<Sdk.SDKMetric.Builder> getPendingMetrics$vungle_ads_release() {
return pendingMetrics;
}
public final boolean getRefreshEnabled$vungle_ads_release() {
return refreshEnabled;
}
public final SignalManager getSignalManager$vungle_ads_release() {
return signalManager;
}
public final VungleApiClient getVungleApiClient$vungle_ads_release() {
return vungleApiClient;
}
public final void pause() {
paused = true;
}
public final void resume() {
paused = false;
}
public final void setExecutor$vungle_ads_release(VungleThreadPoolExecutor vungleThreadPoolExecutor) {
executor = vungleThreadPoolExecutor;
}
public final void setMetricsEnabled$vungle_ads_release(boolean z) {
metricsEnabled = z;
}
public final void setRefreshEnabled$vungle_ads_release(boolean z) {
refreshEnabled = z;
}
public final void setSignalManager$vungle_ads_release(SignalManager signalManager2) {
signalManager = signalManager2;
}
public final void setVungleApiClient$vungle_ads_release(VungleApiClient vungleApiClient2) {
vungleApiClient = vungleApiClient2;
}
private AnalyticsClient() {
}
public enum LogLevel {
ERROR_LOG_LEVEL_OFF(0),
ERROR_LOG_LEVEL_ERROR(1),
ERROR_LOG_LEVEL_DEBUG(2);
public static final Companion Companion = new Companion(null);
private final int level;
public final int getLevel() {
return this.level;
}
LogLevel(int i) {
this.level = i;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final LogLevel fromValue(int i) {
LogLevel logLevel = LogLevel.ERROR_LOG_LEVEL_DEBUG;
if (i == logLevel.getLevel()) {
return logLevel;
}
LogLevel logLevel2 = LogLevel.ERROR_LOG_LEVEL_ERROR;
if (i == logLevel2.getLevel()) {
return logLevel2;
}
LogLevel logLevel3 = LogLevel.ERROR_LOG_LEVEL_OFF;
return i == logLevel3.getLevel() ? logLevel3 : logLevel2;
}
}
}
static {
String simpleName = AnalyticsClient.class.getSimpleName();
Intrinsics.checkNotNullExpressionValue(simpleName, "AnalyticsClient::class.java.simpleName");
TAG = simpleName;
errors = new LinkedBlockingQueue();
metrics = new LinkedBlockingQueue();
pendingErrors = new LinkedBlockingQueue();
pendingMetrics = new LinkedBlockingQueue();
logLevel = LogLevel.ERROR_LOG_LEVEL_ERROR;
refreshEnabled = true;
}
public final void init$vungle_ads_release(VungleApiClient vungleApiClient2, final VungleThreadPoolExecutor executor2, int i, boolean z, SignalManager signalManager2) {
Intrinsics.checkNotNullParameter(vungleApiClient2, "vungleApiClient");
Intrinsics.checkNotNullParameter(executor2, "executor");
Intrinsics.checkNotNullParameter(signalManager2, "signalManager");
signalManager = signalManager2;
executor = executor2;
vungleApiClient = vungleApiClient2;
try {
BlockingQueue<Sdk.SDKError.Builder> blockingQueue = pendingErrors;
if (!blockingQueue.isEmpty()) {
blockingQueue.drainTo(errors);
}
} catch (Exception e) {
Logger.Companion.e(TAG, "Failed to add pendingErrors to errors queue.", e);
}
try {
BlockingQueue<Sdk.SDKMetric.Builder> blockingQueue2 = pendingMetrics;
if (!blockingQueue2.isEmpty()) {
blockingQueue2.drainTo(metrics);
}
} catch (Exception e2) {
Logger.Companion.e(TAG, "Failed to add pendingMetrics to metrics queue.", e2);
}
if (refreshEnabled) {
Executors.newSingleThreadScheduledExecutor().scheduleWithFixedDelay(new Runnable() { // from class: com.vungle.ads.AnalyticsClient$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
AnalyticsClient.m3780init$lambda1(VungleThreadPoolExecutor.this);
}
}, 0L, 5000L, TimeUnit.MILLISECONDS);
}
updateErrorLevelAndMetricEnabled$vungle_ads_release(i, z);
if (i == LogLevel.ERROR_LOG_LEVEL_DEBUG.getLevel()) {
Logger.Companion.enable(true);
} else if (i == LogLevel.ERROR_LOG_LEVEL_ERROR.getLevel()) {
Logger.Companion.enable(false);
} else if (i == LogLevel.ERROR_LOG_LEVEL_OFF.getLevel()) {
Logger.Companion.enable(false);
}
ActivityManager.Companion.addLifecycleListener(new ActivityManager.LifeCycleCallback() { // from class: com.vungle.ads.AnalyticsClient$init$2
@Override // com.vungle.ads.internal.util.ActivityManager.LifeCycleCallback
public void onResume() {
super.onResume();
AnalyticsClient.INSTANCE.resume();
}
@Override // com.vungle.ads.internal.util.ActivityManager.LifeCycleCallback
public void onPause() {
super.onPause();
AnalyticsClient.INSTANCE.pause();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: init$lambda-1, reason: not valid java name */
public static final void m3780init$lambda1(VungleThreadPoolExecutor executor2) {
Intrinsics.checkNotNullParameter(executor2, "$executor");
executor2.execute(new Runnable() { // from class: com.vungle.ads.AnalyticsClient$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
AnalyticsClient.m3781init$lambda1$lambda0();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: init$lambda-1$lambda-0, reason: not valid java name */
public static final void m3781init$lambda1$lambda0() {
INSTANCE.report();
}
public final synchronized void updateErrorLevelAndMetricEnabled$vungle_ads_release(int i, boolean z) {
logLevel = LogLevel.Companion.fromValue(i);
metricsEnabled = z;
}
public final synchronized void logError$vungle_ads_release(final Sdk.SDKError.Reason reason, final String message, final String str, final String str2, final String str3) {
VungleThreadPoolExecutor vungleThreadPoolExecutor;
Intrinsics.checkNotNullParameter(reason, "reason");
Intrinsics.checkNotNullParameter(message, "message");
try {
vungleThreadPoolExecutor = executor;
} catch (Exception e) {
Logger.Companion.e(TAG, "Cannot logError " + reason + ", " + message + ", " + str + ", " + str2 + ',' + str3, e);
}
if (vungleThreadPoolExecutor == null) {
pendingErrors.put(genSDKError(reason, message, str, str2, str3));
} else {
if (vungleThreadPoolExecutor != null) {
vungleThreadPoolExecutor.execute(new Runnable() { // from class: com.vungle.ads.AnalyticsClient$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
AnalyticsClient.m3782logError$lambda2(Sdk.SDKError.Reason.this, message, str, str2, str3);
}
});
}
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: logError$lambda-2, reason: not valid java name */
public static final void m3782logError$lambda2(Sdk.SDKError.Reason reason, String message, String str, String str2, String str3) {
Intrinsics.checkNotNullParameter(reason, "$reason");
Intrinsics.checkNotNullParameter(message, "$message");
INSTANCE.logErrorInSameThread(reason, message, str, str2, str3);
}
/* JADX INFO: Access modifiers changed from: private */
public final Sdk.SDKError.Builder genSDKError(Sdk.SDKError.Reason reason, String str, String str2, String str3, String str4) {
String uuid;
Sdk.SDKError.Builder at = Sdk.SDKError.newBuilder().setOs(v8.d).setOsVersion(String.valueOf(Build.VERSION.SDK_INT)).setMake(Build.MANUFACTURER).setModel(Build.MODEL).setReason(reason).setMessage(str).setAt(System.currentTimeMillis());
String str5 = "";
if (str2 == null) {
str2 = "";
}
Sdk.SDKError.Builder placementReferenceId = at.setPlacementReferenceId(str2);
if (str3 == null) {
str3 = "";
}
Sdk.SDKError.Builder creativeId = placementReferenceId.setCreativeId(str3);
if (str4 == null) {
str4 = "";
}
Sdk.SDKError.Builder eventId = creativeId.setEventId(str4);
SignalManager signalManager2 = signalManager;
if (signalManager2 != null && (uuid = signalManager2.getUuid()) != null) {
str5 = uuid;
}
Sdk.SDKError.Builder sessionId = eventId.setSessionId(str5);
Intrinsics.checkNotNullExpressionValue(sessionId, "newBuilder()\n …ignalManager?.uuid ?: \"\")");
return sessionId;
}
/* JADX INFO: Access modifiers changed from: private */
public final synchronized void logErrorInSameThread(Sdk.SDKError.Reason reason, String str, String str2, String str3, String str4) {
if (logLevel == LogLevel.ERROR_LOG_LEVEL_OFF) {
return;
}
try {
Sdk.SDKError.Builder genSDKError = genSDKError(reason, str, str2, str3, str4);
BlockingQueue<Sdk.SDKError.Builder> blockingQueue = errors;
blockingQueue.put(genSDKError);
Logger.Companion.w(TAG, "Logging error: " + reason + " with message: " + str);
if (blockingQueue.size() >= 20) {
report();
}
} catch (Exception e) {
Logger.Companion.e(TAG, "Cannot logError", e);
}
}
public final synchronized void logError$vungle_ads_release(int i, String message, String str, String str2, String str3) {
Intrinsics.checkNotNullParameter(message, "message");
Sdk.SDKError.Reason forNumber = Sdk.SDKError.Reason.forNumber(i);
Intrinsics.checkNotNullExpressionValue(forNumber, "forNumber(reasonCode)");
logError$vungle_ads_release(forNumber, message, str, str2, str3);
}
public final synchronized void logMetric$vungle_ads_release(final Sdk.SDKMetric.SDKMetricType metricType, final long j, final String str, final String str2, final String str3, final String str4) {
VungleThreadPoolExecutor vungleThreadPoolExecutor;
Intrinsics.checkNotNullParameter(metricType, "metricType");
try {
vungleThreadPoolExecutor = executor;
} catch (Exception e) {
Logger.Companion.e(TAG, "Cannot logMetric " + metricType + ", " + j + ", " + str + ", " + str2 + ',' + str3 + ", " + str4, e);
}
if (vungleThreadPoolExecutor == null) {
pendingMetrics.put(genMetric(metricType, j, str, str2, str3, str4));
} else {
if (vungleThreadPoolExecutor != null) {
vungleThreadPoolExecutor.execute(new Runnable() { // from class: com.vungle.ads.AnalyticsClient$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
AnalyticsClient.m3783logMetric$lambda3(Sdk.SDKMetric.SDKMetricType.this, j, str, str2, str3, str4);
}
});
}
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: logMetric$lambda-3, reason: not valid java name */
public static final void m3783logMetric$lambda3(Sdk.SDKMetric.SDKMetricType metricType, long j, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(metricType, "$metricType");
INSTANCE.logMetricInSameThread(metricType, j, str, str2, str3, str4);
}
/* JADX INFO: Access modifiers changed from: private */
public final Sdk.SDKMetric.Builder genMetric(Sdk.SDKMetric.SDKMetricType sDKMetricType, long j, String str, String str2, String str3, String str4) {
String uuid;
Sdk.SDKMetric.Builder osVersion = Sdk.SDKMetric.newBuilder().setType(sDKMetricType).setValue(j).setMake(Build.MANUFACTURER).setModel(Build.MODEL).setOs(v8.d).setOsVersion(String.valueOf(Build.VERSION.SDK_INT));
String str5 = "";
if (str == null) {
str = "";
}
Sdk.SDKMetric.Builder placementReferenceId = osVersion.setPlacementReferenceId(str);
if (str2 == null) {
str2 = "";
}
Sdk.SDKMetric.Builder creativeId = placementReferenceId.setCreativeId(str2);
if (str3 == null) {
str3 = "";
}
Sdk.SDKMetric.Builder eventId = creativeId.setEventId(str3);
if (str4 == null) {
str4 = "";
}
Sdk.SDKMetric.Builder meta = eventId.setMeta(str4);
SignalManager signalManager2 = signalManager;
if (signalManager2 != null && (uuid = signalManager2.getUuid()) != null) {
str5 = uuid;
}
Sdk.SDKMetric.Builder sessionId = meta.setSessionId(str5);
Intrinsics.checkNotNullExpressionValue(sessionId, "newBuilder()\n …ignalManager?.uuid ?: \"\")");
return sessionId;
}
/* JADX INFO: Access modifiers changed from: private */
public final synchronized void logMetricInSameThread(Sdk.SDKMetric.SDKMetricType sDKMetricType, long j, String str, String str2, String str3, String str4) {
if (metricsEnabled) {
try {
Sdk.SDKMetric.Builder genMetric = genMetric(sDKMetricType, j, str, str2, str3, str4);
BlockingQueue<Sdk.SDKMetric.Builder> blockingQueue = metrics;
blockingQueue.put(genMetric);
Logger.Companion.d(TAG, "Logging Metric " + sDKMetricType + " with value " + j + " for placement " + str);
if (blockingQueue.size() >= 20) {
report();
}
} catch (Exception e) {
Logger.Companion.e(TAG, "Cannot logMetrics", e);
}
}
}
public final synchronized void logMetric$vungle_ads_release(Metric metric, String str, String str2, String str3, String str4) {
try {
Intrinsics.checkNotNullParameter(metric, "metric");
Sdk.SDKMetric.SDKMetricType metricType = metric.getMetricType();
long value = metric.getValue();
if (str4 == null) {
str4 = metric.getMeta();
}
logMetric$vungle_ads_release(metricType, value, str, str2, str3, str4);
} catch (Throwable th) {
throw th;
}
}
public final synchronized void logMetric$vungle_ads_release(SingleValueMetric singleValueMetric, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(singleValueMetric, "singleValueMetric");
logMetric$vungle_ads_release((Metric) singleValueMetric, str, str2, str3, str4);
}
public static /* synthetic */ void logMetric$vungle_ads_release$default(AnalyticsClient analyticsClient, TimeIntervalMetric timeIntervalMetric, String str, String str2, String str3, String str4, int i, Object obj) {
String str5 = (i & 2) != 0 ? null : str;
String str6 = (i & 4) != 0 ? null : str2;
String str7 = (i & 8) != 0 ? null : str3;
if ((i & 16) != 0) {
str4 = timeIntervalMetric.getMeta();
}
analyticsClient.logMetric$vungle_ads_release(timeIntervalMetric, str5, str6, str7, str4);
}
public final synchronized void logMetric$vungle_ads_release(TimeIntervalMetric timeIntervalMetric, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(timeIntervalMetric, "timeIntervalMetric");
logMetric$vungle_ads_release((Metric) timeIntervalMetric, str, str2, str3, str4);
}
public final synchronized void logMetric$vungle_ads_release(OneShotTimeIntervalMetric oneShotTimeIntervalMetric, String str, String str2, String str3, String str4) {
Intrinsics.checkNotNullParameter(oneShotTimeIntervalMetric, "oneShotTimeIntervalMetric");
if (!oneShotTimeIntervalMetric.isLogged()) {
logMetric$vungle_ads_release((TimeIntervalMetric) oneShotTimeIntervalMetric, str, str2, str3, str4);
oneShotTimeIntervalMetric.markLogged();
}
}
private final synchronized void report() {
try {
if (paused) {
return;
}
if (logLevel != LogLevel.ERROR_LOG_LEVEL_OFF && errors.size() > 0) {
flushErrors();
}
if (metricsEnabled && metrics.size() > 0) {
flushMetrics();
}
} catch (Throwable th) {
throw th;
}
}
@WorkerThread
private final void flushMetrics() {
VungleApiClient vungleApiClient2;
Logger.Companion companion = Logger.Companion;
String str = TAG;
StringBuilder sb = new StringBuilder();
sb.append("Sending ");
BlockingQueue<Sdk.SDKMetric.Builder> blockingQueue = metrics;
sb.append(blockingQueue.size());
sb.append(" metrics");
companion.d(str, sb.toString());
final LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
blockingQueue.drainTo(linkedBlockingQueue);
if (linkedBlockingQueue.isEmpty() || (vungleApiClient2 = vungleApiClient) == null) {
return;
}
vungleApiClient2.reportMetrics(linkedBlockingQueue, new RequestListener() { // from class: com.vungle.ads.AnalyticsClient$flushMetrics$1
@Override // com.vungle.ads.AnalyticsClient.RequestListener
public void onSuccess() {
String str2;
Logger.Companion companion2 = Logger.Companion;
str2 = AnalyticsClient.TAG;
companion2.d(str2, "Sent " + linkedBlockingQueue.size() + " metrics");
}
@Override // com.vungle.ads.AnalyticsClient.RequestListener
public void onFailure() {
String str2;
Logger.Companion companion2 = Logger.Companion;
str2 = AnalyticsClient.TAG;
companion2.d(str2, "Failed to send " + linkedBlockingQueue.size() + " metrics");
AnalyticsClient.INSTANCE.getMetrics$vungle_ads_release().addAll(linkedBlockingQueue);
}
});
}
@WorkerThread
private final void flushErrors() {
VungleApiClient vungleApiClient2;
Logger.Companion companion = Logger.Companion;
String str = TAG;
StringBuilder sb = new StringBuilder();
sb.append("Sending ");
BlockingQueue<Sdk.SDKError.Builder> blockingQueue = errors;
sb.append(blockingQueue.size());
sb.append(" errors");
companion.d(str, sb.toString());
final LinkedBlockingQueue linkedBlockingQueue = new LinkedBlockingQueue();
blockingQueue.drainTo(linkedBlockingQueue);
if (linkedBlockingQueue.isEmpty() || (vungleApiClient2 = vungleApiClient) == null) {
return;
}
vungleApiClient2.reportErrors(linkedBlockingQueue, new RequestListener() { // from class: com.vungle.ads.AnalyticsClient$flushErrors$1
@Override // com.vungle.ads.AnalyticsClient.RequestListener
public void onSuccess() {
String str2;
Logger.Companion companion2 = Logger.Companion;
str2 = AnalyticsClient.TAG;
companion2.d(str2, "Sent " + linkedBlockingQueue.size() + " errors");
}
@Override // com.vungle.ads.AnalyticsClient.RequestListener
public void onFailure() {
String str2;
Logger.Companion companion2 = Logger.Companion;
str2 = AnalyticsClient.TAG;
companion2.d(str2, "Failed to send " + linkedBlockingQueue.size() + " errors");
AnalyticsClient.INSTANCE.getErrors$vungle_ads_release().addAll(linkedBlockingQueue);
}
});
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class AssetDownloadError extends VungleError {
public AssetDownloadError() {
super(Integer.valueOf(VungleError.ASSET_DOWNLOAD_ERROR), null, null, null, null, null, 62, null);
}
}

View File

@@ -0,0 +1,18 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class AssetFailedStatusCodeError extends VungleError {
public /* synthetic */ AssetFailedStatusCodeError(String str, Integer num, String str2, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(str, (i & 2) != 0 ? null : num, (i & 4) != 0 ? null : str2, (i & 8) != 0 ? null : str3);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AssetFailedStatusCodeError(String url, Integer num, String str, String str2) {
super(117, Sdk.SDKError.Reason.ASSET_FAILED_STATUS_CODE, "Asset fail to download: " + url + ", Error code:" + num + ", Error message: " + str2, str, null, null, 48, null);
Intrinsics.checkNotNullParameter(url, "url");
}
}

View File

@@ -0,0 +1,165 @@
package com.vungle.ads;
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 BannerAd$adPlayCallback$1 implements AdPlayCallback {
final /* synthetic */ String $placementId;
final /* synthetic */ BannerAd this$0;
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdRewarded(String str) {
}
public BannerAd$adPlayCallback$1(BannerAd bannerAd, String str) {
this.this$0 = bannerAd;
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 BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3793onAdStart$lambda0(BannerAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdStart$lambda-0, reason: not valid java name */
public static final void m3793onAdStart$lambda0(BannerAd 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 BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3791onAdImpression$lambda1(BannerAd.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 m3791onAdImpression$lambda1(BannerAd 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 BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3790onAdEnd$lambda2(BannerAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdEnd$lambda-2, reason: not valid java name */
public static final void m3790onAdEnd$lambda2(BannerAd 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 BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3789onAdClick$lambda3(BannerAd.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 m3789onAdClick$lambda3(BannerAd 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 BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3792onAdLeftApplication$lambda4(BannerAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdLeftApplication$lambda-4, reason: not valid java name */
public static final void m3792onAdLeftApplication$lambda4(BannerAd 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");
this.this$0.getShowToFailMetric$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);
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BannerAd bannerAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$adPlayCallback$1$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
BannerAd$adPlayCallback$1.m3794onFailure$lambda5(BannerAd.this, error);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onFailure$lambda-5, reason: not valid java name */
public static final void m3794onFailure$lambda5(BannerAd 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,173 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.BannerAdInternal;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.presenter.AdPlayCallbackWrapper;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.ThreadUtil;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class BannerAd extends BaseAd {
private final AdPlayCallbackWrapper adPlayCallback;
private final VungleAdSize adSize;
private BannerView bannerView;
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[BannerAdSize.values().length];
iArr[BannerAdSize.BANNER.ordinal()] = 1;
iArr[BannerAdSize.BANNER_SHORT.ordinal()] = 2;
iArr[BannerAdSize.BANNER_LEADERBOARD.ordinal()] = 3;
iArr[BannerAdSize.VUNGLE_MREC.ordinal()] = 4;
$EnumSwitchMapping$0 = iArr;
}
}
private BannerAd(Context context, String str, VungleAdSize vungleAdSize, AdConfig adConfig) {
super(context, str, adConfig);
this.adSize = vungleAdSize;
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 BannerAd$adPlayCallback$1(this, str));
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public BannerAd(Context context, String placementId, VungleAdSize adSize) {
this(context, placementId, adSize, new AdConfig());
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adSize, "adSize");
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public BannerAd(android.content.Context r2, java.lang.String r3, com.vungle.ads.BannerAdSize r4) {
/*
r1 = this;
java.lang.String r0 = "context"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r2, r0)
java.lang.String r0 = "placementId"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r3, r0)
java.lang.String r0 = "adSize"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r4, r0)
com.vungle.ads.VungleAdSize$Companion r0 = com.vungle.ads.VungleAdSize.Companion
int[] r0 = com.vungle.ads.BannerAd.WhenMappings.$EnumSwitchMapping$0
int r4 = r4.ordinal()
r4 = r0[r4]
r0 = 1
if (r4 == r0) goto L34
r0 = 2
if (r4 == r0) goto L31
r0 = 3
if (r4 == r0) goto L2e
r0 = 4
if (r4 != r0) goto L28
com.vungle.ads.VungleAdSize r4 = com.vungle.ads.VungleAdSize.MREC
goto L36
L28:
kotlin.NoWhenBranchMatchedException r2 = new kotlin.NoWhenBranchMatchedException
r2.<init>()
throw r2
L2e:
com.vungle.ads.VungleAdSize r4 = com.vungle.ads.VungleAdSize.BANNER_LEADERBOARD
goto L36
L31:
com.vungle.ads.VungleAdSize r4 = com.vungle.ads.VungleAdSize.BANNER_SHORT
goto L36
L34:
com.vungle.ads.VungleAdSize r4 = com.vungle.ads.VungleAdSize.BANNER
L36:
com.vungle.ads.AdConfig r0 = new com.vungle.ads.AdConfig
r0.<init>()
r1.<init>(r2, r3, r4, r0)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.vungle.ads.BannerAd.<init>(android.content.Context, java.lang.String, com.vungle.ads.BannerAdSize):void");
}
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;
}
@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 void finishAd() {
BannerView bannerView = this.bannerView;
if (bannerView != null) {
bannerView.finishAdInternal(true);
}
}
public final BannerView getBannerView() {
Placement placement;
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.logMetric$vungle_ads_release(new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.PLAY_AD_API), (r13 & 2) != 0 ? null : getPlacementId(), (r13 & 4) != 0 ? null : getCreativeId(), (r13 & 8) != 0 ? null : getEventId(), (r13 & 16) != 0 ? null : null);
BannerView bannerView = this.bannerView;
if (bannerView != null) {
return bannerView;
}
final VungleError canPlayAd = getAdInternal$vungle_ads_release().canPlayAd(true);
if (canPlayAd != null) {
if (getAdInternal$vungle_ads_release().isErrorTerminal$vungle_ads_release(canPlayAd.getCode())) {
getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.ERROR);
}
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BannerAd$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BannerAd.m3785getBannerView$lambda1(BannerAd.this, canPlayAd);
}
});
return null;
}
AdPayload advertisement = getAdInternal$vungle_ads_release().getAdvertisement();
if (advertisement == null || (placement = getAdInternal$vungle_ads_release().getPlacement()) == null) {
return null;
}
getAdInternal$vungle_ads_release().cancelDownload$vungle_ads_release();
try {
try {
this.bannerView = new BannerView(getContext(), placement, advertisement, getAdViewSize(), getAdConfig(), this.adPlayCallback, getAdInternal$vungle_ads_release().getBidPayload());
getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(analyticsClient, getResponseToShowMetric$vungle_ads_release(), getPlacementId(), getCreativeId(), getEventId(), (String) null, 16, (Object) null);
getShowToPresentMetric$vungle_ads_release().markStart();
return this.bannerView;
} catch (InstantiationException e) {
Logger.Companion.e("BannerAd", "Can not create banner view: " + e.getMessage(), e);
getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, getResponseToShowMetric$vungle_ads_release(), getPlacementId(), getCreativeId(), getEventId(), (String) null, 16, (Object) null);
return null;
}
} catch (Throwable th) {
getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, getResponseToShowMetric$vungle_ads_release(), getPlacementId(), getCreativeId(), getEventId(), (String) null, 16, (Object) null);
throw th;
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: getBannerView$lambda-1, reason: not valid java name */
public static final void m3785getBannerView$lambda1(BannerAd this$0, VungleError vungleError) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
if (adListener != null) {
adListener.onAdFailedToPlay(this$0, vungleError);
}
}
}

View File

@@ -0,0 +1,5 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface BannerAdListener extends BaseAdListener {
}

View File

@@ -0,0 +1,33 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public enum BannerAdSize {
VUNGLE_MREC("mrec", 300, 250),
BANNER("banner", Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 50),
BANNER_SHORT("banner_short", 300, 50),
BANNER_LEADERBOARD("banner_leaderboard", 728, 90);
private final int height;
private final String sizeName;
private final int width;
public final int getHeight() {
return this.height;
}
public final String getSizeName() {
return this.sizeName;
}
public final int getWidth() {
return this.width;
}
BannerAdSize(String str, int i, int i2) {
this.sizeName = str;
this.width = i;
this.height = i2;
}
}

View File

@@ -0,0 +1,294 @@
package com.vungle.ads;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.RelativeLayout;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.ImpressionTracker;
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.model.Placement;
import com.vungle.ads.internal.omsdk.OMTracker;
import com.vungle.ads.internal.platform.Platform;
import com.vungle.ads.internal.presenter.AdEventListener;
import com.vungle.ads.internal.presenter.AdPlayCallback;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.ui.VungleWebClient;
import com.vungle.ads.internal.ui.WatermarkView;
import com.vungle.ads.internal.ui.view.MRAIDAdWidget;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.ViewUtility;
import java.util.concurrent.atomic.AtomicBoolean;
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;
/* loaded from: classes4.dex */
public final class BannerView extends RelativeLayout {
public static final Companion Companion = new Companion(null);
private static final String TAG = "BannerView";
private MRAIDAdWidget adWidget;
private final AdPayload advertisement;
private int calculatedPixelHeight;
private int calculatedPixelWidth;
private final AtomicBoolean destroyed;
private WatermarkView imageView;
private final Lazy impressionTracker$delegate;
private boolean isOnImpressionCalled;
private final Placement placement;
private MRAIDPresenter presenter;
private final AtomicBoolean presenterStarted;
public final AdPayload getAdvertisement() {
return this.advertisement;
}
public final Placement getPlacement() {
return this.placement;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BannerView(final Context context, final Placement placement, AdPayload advertisement, VungleAdSize adSize, AdConfig adConfig, final AdPlayCallback adPlayCallback, BidPayload bidPayload) throws InstantiationException {
super(context);
Lazy lazy;
Lazy lazy2;
Lazy lazy3;
Lazy lazy4;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placement, "placement");
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
Intrinsics.checkNotNullParameter(adSize, "adSize");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
Intrinsics.checkNotNullParameter(adPlayCallback, "adPlayCallback");
this.placement = placement;
this.advertisement = advertisement;
boolean z = false;
this.destroyed = new AtomicBoolean(false);
this.presenterStarted = new AtomicBoolean(false);
lazy = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: com.vungle.ads.BannerView$impressionTracker$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final ImpressionTracker invoke() {
return new ImpressionTracker(context);
}
});
this.impressionTracker$delegate = lazy;
ViewUtility viewUtility = ViewUtility.INSTANCE;
this.calculatedPixelHeight = viewUtility.dpToPixels(context, adSize.getHeight());
this.calculatedPixelWidth = viewUtility.dpToPixels(context, adSize.getWidth());
AdEventListener adEventListener = new AdEventListener(adPlayCallback, placement) { // from class: com.vungle.ads.BannerView$adEventListener$1
};
try {
MRAIDAdWidget mRAIDAdWidget = new MRAIDAdWidget(context);
this.adWidget = mRAIDAdWidget;
mRAIDAdWidget.setCloseDelegate(new MRAIDAdWidget.CloseDelegate() { // from class: com.vungle.ads.BannerView.2
@Override // com.vungle.ads.internal.ui.view.MRAIDAdWidget.CloseDelegate
public void close() {
BannerView.this.finishAdInternal(false);
}
});
ServiceLocator.Companion companion = ServiceLocator.Companion;
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.BannerView$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.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.BannerView$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.omsdk.OMTracker$Factory, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final OMTracker.Factory invoke() {
return ServiceLocator.Companion.getInstance(context).getService(OMTracker.Factory.class);
}
});
OMTracker.Factory m3797_init_$lambda4 = m3797_init_$lambda4(lazy3);
if (ConfigManager.INSTANCE.omEnabled() && advertisement.omEnabled()) {
z = true;
}
OMTracker make = m3797_init_$lambda4.make(z);
lazy4 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.BannerView$special$$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.platform.Platform, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Platform invoke() {
return ServiceLocator.Companion.getInstance(context).getService(Platform.class);
}
});
VungleWebClient vungleWebClient = new VungleWebClient(advertisement, placement, m3796_init_$lambda3(lazy2).getOffloadExecutor(), null, m3798_init_$lambda5(lazy4), 8, null);
vungleWebClient.setWebViewObserver(make);
MRAIDPresenter mRAIDPresenter = new MRAIDPresenter(mRAIDAdWidget, advertisement, placement, vungleWebClient, m3796_init_$lambda3(lazy2).getJobExecutor(), make, bidPayload, m3798_init_$lambda5(lazy4));
mRAIDPresenter.setEventListener(adEventListener);
this.presenter = mRAIDPresenter;
String watermark$vungle_ads_release = adConfig.getWatermark$vungle_ads_release();
if (watermark$vungle_ads_release != null) {
this.imageView = new WatermarkView(context, watermark$vungle_ads_release);
}
} catch (InstantiationException e) {
AdCantPlayWithoutWebView adCantPlayWithoutWebView = new AdCantPlayWithoutWebView();
adCantPlayWithoutWebView.setPlacementId$vungle_ads_release(this.placement.getReferenceId());
adCantPlayWithoutWebView.setEventId$vungle_ads_release(this.advertisement.eventId());
adCantPlayWithoutWebView.setCreativeId$vungle_ads_release(this.advertisement.getCreativeId());
adEventListener.onError(adCantPlayWithoutWebView.logError$vungle_ads_release(), this.placement.getReferenceId());
throw e;
}
}
private final ImpressionTracker getImpressionTracker() {
return (ImpressionTracker) this.impressionTracker$delegate.getValue();
}
@Override // android.view.View
public void onWindowVisibilityChanged(int i) {
super.onWindowVisibilityChanged(i);
setAdVisibility(i == 0);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
Logger.Companion.d(TAG, "onAttachedToWindow()");
if (!this.presenterStarted.getAndSet(true)) {
MRAIDPresenter mRAIDPresenter = this.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.prepare();
}
getImpressionTracker().addView(this, new ImpressionTracker.ImpressionListener() { // from class: com.vungle.ads.BannerView$$ExternalSyntheticLambda0
@Override // com.vungle.ads.internal.ImpressionTracker.ImpressionListener
public final void onImpression(View view) {
BannerView.m3799onAttachedToWindow$lambda0(BannerView.this, view);
}
});
}
renderAd();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAttachedToWindow$lambda-0, reason: not valid java name */
public static final void m3799onAttachedToWindow$lambda0(BannerView this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Logger.Companion.d(TAG, "ImpressionTracker checked the banner view become visible.");
this$0.isOnImpressionCalled = true;
this$0.checkHardwareAcceleration();
MRAIDPresenter mRAIDPresenter = this$0.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.start();
}
}
private final void setAdVisibility(boolean z) {
MRAIDPresenter mRAIDPresenter;
if (!this.isOnImpressionCalled || this.destroyed.get() || (mRAIDPresenter = this.presenter) == null) {
return;
}
mRAIDPresenter.setAdVisibility(z);
}
private final void checkHardwareAcceleration() {
Logger.Companion.w(TAG, "hardwareAccelerated = " + isHardwareAccelerated());
if (isHardwareAccelerated()) {
return;
}
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(Sdk.SDKMetric.SDKMetricType.HARDWARE_ACCELERATE_DISABLED, (r15 & 2) != 0 ? 0L : 0L, (r15 & 4) != 0 ? null : this.placement.getReferenceId(), (r15 & 8) != 0 ? null : this.advertisement.getCreativeId(), (r15 & 16) != 0 ? null : this.advertisement.eventId(), (r15 & 32) == 0 ? null : null);
}
public final void finishAdInternal(boolean z) {
if (this.destroyed.get()) {
return;
}
this.destroyed.set(true);
int i = (z ? 4 : 0) | 2;
MRAIDPresenter mRAIDPresenter = this.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.stop();
}
MRAIDPresenter mRAIDPresenter2 = this.presenter;
if (mRAIDPresenter2 != null) {
mRAIDPresenter2.detach(i);
}
getImpressionTracker().destroy();
try {
ViewParent parent = getParent();
if (parent != null && (parent instanceof ViewGroup)) {
((ViewGroup) parent).removeView(this);
}
removeAllViews();
} catch (Exception e) {
Logger.Companion.d(TAG, "Removing webView error: " + e);
}
}
private final void renderAd() {
MRAIDAdWidget mRAIDAdWidget = this.adWidget;
if (mRAIDAdWidget != null) {
if (!Intrinsics.areEqual(mRAIDAdWidget != null ? mRAIDAdWidget.getParent() : null, this)) {
addView(this.adWidget, this.calculatedPixelWidth, this.calculatedPixelHeight);
WatermarkView watermarkView = this.imageView;
if (watermarkView != null) {
addView(watermarkView, this.calculatedPixelWidth, this.calculatedPixelHeight);
WatermarkView watermarkView2 = this.imageView;
if (watermarkView2 != null) {
watermarkView2.bringToFront();
}
}
}
}
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams != null) {
layoutParams.height = this.calculatedPixelHeight;
layoutParams.width = this.calculatedPixelWidth;
requestLayout();
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* renamed from: _init_$lambda-3, reason: not valid java name */
private static final Executors m3796_init_$lambda3(Lazy lazy) {
return (Executors) lazy.getValue();
}
/* renamed from: _init_$lambda-4, reason: not valid java name */
private static final OMTracker.Factory m3797_init_$lambda4(Lazy lazy) {
return (OMTracker.Factory) lazy.getValue();
}
/* renamed from: _init_$lambda-5, reason: not valid java name */
private static final Platform m3798_init_$lambda5(Lazy lazy) {
return (Platform) lazy.getValue();
}
}

View File

@@ -0,0 +1,242 @@
package com.vungle.ads;
import android.content.Context;
import androidx.annotation.VisibleForTesting;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.load.AdLoaderCallback;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.signals.SignaledAd;
import com.vungle.ads.internal.util.ThreadUtil;
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 abstract class BaseAd implements Ad {
private final AdConfig adConfig;
private final Lazy adInternal$delegate;
private BaseAdListener adListener;
private final Context context;
private String creativeId;
private final OneShotTimeIntervalMetric displayToClickMetric;
private String eventId;
private final String placementId;
private final TimeIntervalMetric presentToDisplayMetric;
private final TimeIntervalMetric requestToResponseMetric;
private final TimeIntervalMetric responseToShowMetric;
private final TimeIntervalMetric showToFailMetric;
private final TimeIntervalMetric showToPresentMetric;
private final Lazy signalManager$delegate;
private SignaledAd signaledAd;
@VisibleForTesting(otherwise = 2)
public static /* synthetic */ void getRequestToResponseMetric$vungle_ads_release$annotations() {
}
public abstract AdInternal constructAdInternal$vungle_ads_release(Context context);
public final AdConfig getAdConfig() {
return this.adConfig;
}
public final BaseAdListener getAdListener() {
return this.adListener;
}
public final Context getContext() {
return this.context;
}
public final String getCreativeId() {
return this.creativeId;
}
public final OneShotTimeIntervalMetric getDisplayToClickMetric$vungle_ads_release() {
return this.displayToClickMetric;
}
public final String getEventId() {
return this.eventId;
}
public final String getPlacementId() {
return this.placementId;
}
public final TimeIntervalMetric getPresentToDisplayMetric$vungle_ads_release() {
return this.presentToDisplayMetric;
}
public final TimeIntervalMetric getRequestToResponseMetric$vungle_ads_release() {
return this.requestToResponseMetric;
}
public final TimeIntervalMetric getResponseToShowMetric$vungle_ads_release() {
return this.responseToShowMetric;
}
public final TimeIntervalMetric getShowToFailMetric$vungle_ads_release() {
return this.showToFailMetric;
}
public final TimeIntervalMetric getShowToPresentMetric$vungle_ads_release() {
return this.showToPresentMetric;
}
public final SignaledAd getSignaledAd$vungle_ads_release() {
return this.signaledAd;
}
public final void setAdListener(BaseAdListener baseAdListener) {
this.adListener = baseAdListener;
}
public final void setSignaledAd$vungle_ads_release(SignaledAd signaledAd) {
this.signaledAd = signaledAd;
}
public BaseAd(final Context context, String placementId, AdConfig adConfig) {
Lazy lazy;
Lazy lazy2;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
this.context = context;
this.placementId = placementId;
this.adConfig = adConfig;
lazy = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: com.vungle.ads.BaseAd$adInternal$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final AdInternal invoke() {
BaseAd baseAd = BaseAd.this;
return baseAd.constructAdInternal$vungle_ads_release(baseAd.getContext());
}
});
this.adInternal$delegate = lazy;
ServiceLocator.Companion companion = ServiceLocator.Companion;
lazy2 = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.BaseAd$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.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;
this.requestToResponseMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_REQUEST_TO_RESPONSE_DURATION_MS);
this.responseToShowMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_RESPONSE_TO_SHOW_DURATION_MS);
this.showToPresentMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_SHOW_TO_PRESENT_DURATION_MS);
this.presentToDisplayMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_PRESENT_TO_DISPLAY_DURATION_MS);
this.showToFailMetric = new TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_SHOW_TO_FAIL_DURATION_MS);
this.displayToClickMetric = new OneShotTimeIntervalMetric(Sdk.SDKMetric.SDKMetricType.AD_DISPLAY_TO_CLICK_DURATION_MS);
}
public final AdInternal getAdInternal$vungle_ads_release() {
return (AdInternal) this.adInternal$delegate.getValue();
}
public final SignalManager getSignalManager$vungle_ads_release() {
return (SignalManager) this.signalManager$delegate.getValue();
}
@Override // com.vungle.ads.Ad
public Boolean canPlayAd() {
return Boolean.valueOf(AdInternal.canPlayAd$default(getAdInternal$vungle_ads_release(), false, 1, null) == null);
}
@Override // com.vungle.ads.Ad
public void load(final String str) {
this.requestToResponseMetric.markStart();
getAdInternal$vungle_ads_release().loadAd(this.placementId, str, new AdLoaderCallback() { // from class: com.vungle.ads.BaseAd$load$1
@Override // com.vungle.ads.internal.load.AdLoaderCallback
public void onSuccess(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
BaseAd.this.onAdLoaded$vungle_ads_release(advertisement);
BaseAd baseAd = BaseAd.this;
baseAd.onLoadSuccess$vungle_ads_release(baseAd, str);
}
@Override // com.vungle.ads.internal.load.AdLoaderCallback
public void onFailure(VungleError error) {
Intrinsics.checkNotNullParameter(error, "error");
BaseAd baseAd = BaseAd.this;
baseAd.onLoadFailure$vungle_ads_release(baseAd, error);
}
});
}
public void onAdLoaded$vungle_ads_release(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
advertisement.setAdConfig(this.adConfig);
this.creativeId = advertisement.getCreativeId();
String eventId = advertisement.eventId();
this.eventId = eventId;
SignaledAd signaledAd = this.signaledAd;
if (signaledAd == null) {
return;
}
signaledAd.setEventId(eventId);
}
public void onLoadSuccess$vungle_ads_release(BaseAd baseAd, String str) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseAd$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
BaseAd.m3801onLoadSuccess$lambda0(BaseAd.this);
}
});
onLoadEnd();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onLoadSuccess$lambda-0, reason: not valid java name */
public static final void m3801onLoadSuccess$lambda0(BaseAd this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener baseAdListener = this$0.adListener;
if (baseAdListener != null) {
baseAdListener.onAdLoaded(this$0);
}
}
public void onLoadFailure$vungle_ads_release(BaseAd baseAd, final VungleError vungleError) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
Intrinsics.checkNotNullParameter(vungleError, "vungleError");
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseAd$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BaseAd.m3800onLoadFailure$lambda1(BaseAd.this, vungleError);
}
});
onLoadEnd();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onLoadFailure$lambda-1, reason: not valid java name */
public static final void m3800onLoadFailure$lambda1(BaseAd this$0, VungleError vungleError) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Intrinsics.checkNotNullParameter(vungleError, "$vungleError");
BaseAdListener baseAdListener = this$0.adListener;
if (baseAdListener != null) {
baseAdListener.onAdFailedToLoad(this$0, vungleError);
}
}
private final void onLoadEnd() {
this.requestToResponseMetric.markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(AnalyticsClient.INSTANCE, this.requestToResponseMetric, this.placementId, this.creativeId, this.eventId, (String) null, 16, (Object) null);
this.responseToShowMetric.markStart();
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface BaseAdListener {
void onAdClicked(BaseAd baseAd);
void onAdEnd(BaseAd baseAd);
void onAdFailedToLoad(BaseAd baseAd, VungleError vungleError);
void onAdFailedToPlay(BaseAd baseAd, VungleError vungleError);
void onAdImpression(BaseAd baseAd);
void onAdLeftApplication(BaseAd baseAd);
void onAdLoaded(BaseAd baseAd);
void onAdStart(BaseAd baseAd);
}

View File

@@ -0,0 +1,182 @@
package com.vungle.ads;
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 BaseFullscreenAd$play$2 implements AdPlayCallback {
final /* synthetic */ BaseFullscreenAd this$0;
public BaseFullscreenAd$play$2(BaseFullscreenAd baseFullscreenAd) {
this.this$0 = baseFullscreenAd;
}
@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.this$0.getPlacementId(), 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 BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3809onAdStart$lambda0(BaseFullscreenAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdStart$lambda-0, reason: not valid java name */
public static final void m3809onAdStart$lambda0(BaseFullscreenAd 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 BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3806onAdImpression$lambda1(BaseFullscreenAd.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.this$0.getPlacementId(), 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 m3806onAdImpression$lambda1(BaseFullscreenAd 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 BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3805onAdEnd$lambda2(BaseFullscreenAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdEnd$lambda-2, reason: not valid java name */
public static final void m3805onAdEnd$lambda2(BaseFullscreenAd 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 BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3804onAdClick$lambda3(BaseFullscreenAd.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.this$0.getPlacementId(), (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 m3804onAdClick$lambda3(BaseFullscreenAd 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 onAdRewarded(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3808onAdRewarded$lambda4(BaseFullscreenAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdRewarded$lambda-4, reason: not valid java name */
public static final void m3808onAdRewarded$lambda4(BaseFullscreenAd this$0) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
BaseAdListener adListener = this$0.getAdListener();
RewardedAdListener rewardedAdListener = adListener instanceof RewardedAdListener ? (RewardedAdListener) adListener : null;
if (rewardedAdListener != null) {
rewardedAdListener.onAdRewarded(this$0);
}
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdLeftApplication(String str) {
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3807onAdLeftApplication$lambda5(BaseFullscreenAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdLeftApplication$lambda-5, reason: not valid java name */
public static final void m3807onAdLeftApplication$lambda5(BaseFullscreenAd 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 BaseFullscreenAd baseFullscreenAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.BaseFullscreenAd$play$2$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
BaseFullscreenAd$play$2.m3810onFailure$lambda6(BaseFullscreenAd.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.this$0.getPlacementId(), this.this$0.getCreativeId(), this.this$0.getEventId(), (String) null, 16, (Object) null);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onFailure$lambda-6, reason: not valid java name */
public static final void m3810onFailure$lambda6(BaseFullscreenAd 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,52 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.signals.SignaledAd;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class BaseFullscreenAd extends BaseAd implements FullscreenAd {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public BaseFullscreenAd(Context context, String placementId, AdConfig adConfig) {
super(context, placementId, adConfig);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
}
@Override // com.vungle.ads.BaseAd, com.vungle.ads.Ad
public void load(String str) {
setSignaledAd$vungle_ads_release(getSignalManager$vungle_ads_release().getSignaledAd(getPlacementId()));
super.load(str);
}
@Override // com.vungle.ads.BaseAd
public void onAdLoaded$vungle_ads_release(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
super.onAdLoaded$vungle_ads_release(advertisement);
SignaledAd signaledAd$vungle_ads_release = getSignaledAd$vungle_ads_release();
if (signaledAd$vungle_ads_release == null) {
return;
}
signaledAd$vungle_ads_release.setAdAvailabilityCallbackTime(System.currentTimeMillis());
}
@Override // com.vungle.ads.FullscreenAd
public void play(Context context) {
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.logMetric$vungle_ads_release(new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.PLAY_AD_API), (r13 & 2) != 0 ? null : getPlacementId(), (r13 & 4) != 0 ? null : getCreativeId(), (r13 & 8) != 0 ? null : getEventId(), (r13 & 16) != 0 ? null : null);
getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(analyticsClient, getResponseToShowMetric$vungle_ads_release(), getPlacementId(), getCreativeId(), getEventId(), (String) null, 16, (Object) null);
getShowToPresentMetric$vungle_ads_release().markStart();
getShowToFailMetric$vungle_ads_release().markStart();
SignaledAd signaledAd$vungle_ads_release = getSignaledAd$vungle_ads_release();
if (signaledAd$vungle_ads_release != null) {
signaledAd$vungle_ads_release.setPlayAdTime(System.currentTimeMillis());
signaledAd$vungle_ads_release.calculateTimeBetweenAdAvailabilityAndPlayAd();
getSignalManager$vungle_ads_release().registerSignaledAd(context, signaledAd$vungle_ads_release);
}
getAdInternal$vungle_ads_release().play(context, new BaseFullscreenAd$play$2(this));
}
}

View File

@@ -0,0 +1,11 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class BuildConfig {
public static final String BUILD_TYPE = "release";
public static final boolean DEBUG = false;
public static final String LIBRARY_PACKAGE_NAME = "com.vungle.ads";
public static final String OMSDK_PARTNER_NAME = "Vungle";
public static final int VERSION_CODE = 70401;
public static final String VERSION_NAME = "7.4.1";
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class ConcurrentPlaybackUnsupported extends VungleError {
public ConcurrentPlaybackUnsupported() {
super(400, Sdk.SDKError.Reason.CONCURRENT_PLAYBACK_UNSUPPORTED, "Concurrent playback not supported", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class ConfigurationError extends VungleError {
public ConfigurationError() {
super(10003, Sdk.SDKError.Reason.API_REQUEST_ERROR, "Config: Configuration Error", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class ConfigurationResponseError extends VungleError {
public ConfigurationResponseError() {
super(10003, Sdk.SDKError.Reason.INVALID_CONFIG_RESPONSE, "Config: Configuration failed due to bad response.", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,32 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class DualValueMetric extends Metric {
private Long valueFirst;
private Long valueSecond;
public final Long getValueFirst() {
return this.valueFirst;
}
public final Long getValueSecond() {
return this.valueSecond;
}
public final void setValueFirst(Long l) {
this.valueFirst = l;
}
public final void setValueSecond(Long l) {
this.valueSecond = l;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DualValueMetric(Sdk.SDKMetric.SDKMetricType metricType) {
super(metricType);
Intrinsics.checkNotNullParameter(metricType, "metricType");
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads;
import android.content.Context;
/* loaded from: classes4.dex */
public interface FullscreenAd extends Ad {
void play(Context context);
public static final class DefaultImpls {
public static /* synthetic */ void play$default(FullscreenAd fullscreenAd, Context context, int i, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: play");
}
if ((i & 1) != 0) {
context = null;
}
fullscreenAd.play(context);
}
}
}

View File

@@ -0,0 +1,24 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.AdInternal;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class FullscreenAdInternal extends AdInternal {
@Override // com.vungle.ads.internal.AdInternal
public VungleAdSize getAdSizeForAdRequest() {
return null;
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdSize(VungleAdSize vungleAdSize) {
return true;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public FullscreenAdInternal(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
}
}

View File

@@ -0,0 +1,5 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface FullscreenAdListener extends BaseAdListener {
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface InitializationListener {
void onError(VungleError vungleError);
void onSuccess();
}

View File

@@ -0,0 +1,33 @@
package com.vungle.ads;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class InternalError extends VungleError {
public /* synthetic */ InternalError(int i, String str, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this(i, (i2 & 2) != 0 ? null : str);
}
public InternalError(int i, String str) {
super(Integer.valueOf(i), null, str, null, null, null, 58, null);
}
@Override // com.vungle.ads.VungleError
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!Intrinsics.areEqual(InternalError.class, obj != null ? obj.getClass() : null)) {
return false;
}
int code = getCode();
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type com.vungle.ads.InternalError");
return code == ((InternalError) obj).getCode();
}
@Override // com.vungle.ads.VungleError
public int hashCode() {
return InternalError.class.hashCode();
}
}

View File

@@ -0,0 +1,26 @@
package com.vungle.ads;
import android.content.Context;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class InterstitialAd extends BaseFullscreenAd {
public /* synthetic */ InterstitialAd(Context context, String str, AdConfig adConfig, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, str, (i & 4) != 0 ? new AdConfig() : adConfig);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public InterstitialAd(Context context, String placementId, AdConfig adConfig) {
super(context, placementId, adConfig);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
}
@Override // com.vungle.ads.BaseAd
public InterstitialAdInternal constructAdInternal$vungle_ads_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new InterstitialAdInternal(context);
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.model.Placement;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class InterstitialAdInternal extends FullscreenAdInternal {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public InterstitialAdInternal(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdTypeForPlacement(Placement placement) {
Intrinsics.checkNotNullParameter(placement, "placement");
return placement.isInterstitial() || placement.isAppOpen();
}
}

View File

@@ -0,0 +1,5 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface InterstitialAdListener extends FullscreenAdListener {
}

View File

@@ -0,0 +1,22 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class InvalidAdStateError extends VungleError {
public InvalidAdStateError() {
this(0, null, null, null, null, null, 63, null);
}
public /* synthetic */ InvalidAdStateError(int i, Sdk.SDKError.Reason reason, String str, String str2, String str3, String str4, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? VungleError.INVALID_AD_STATE : i, (i2 & 2) != 0 ? null : reason, (i2 & 4) != 0 ? "Ad state is invalid" : str, (i2 & 8) != 0 ? null : str2, (i2 & 16) != 0 ? null : str3, (i2 & 32) == 0 ? str4 : null);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public InvalidAdStateError(int i, Sdk.SDKError.Reason reason, String errorMessage, String str, String str2, String str3) {
super(Integer.valueOf(i), reason, errorMessage, str, str2, str3, null);
Intrinsics.checkNotNullParameter(errorMessage, "errorMessage");
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class InvalidAppId extends VungleError {
public InvalidAppId() {
super(2, Sdk.SDKError.Reason.INVALID_APP_ID, "App ID is empty", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class InvalidWaterfallPlacementError extends VungleError {
public InvalidWaterfallPlacementError(String str) {
super(222, Sdk.SDKError.Reason.INVALID_WATERFALL_PLACEMENT_ID, str + " header bidding status does not match with loadAd parameters", str, null, null, 48, null);
}
}

View File

@@ -0,0 +1,34 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class Metric {
private String meta;
private Sdk.SDKMetric.SDKMetricType metricType;
public final String getMeta() {
return this.meta;
}
public final Sdk.SDKMetric.SDKMetricType getMetricType() {
return this.metricType;
}
public abstract long getValue();
public final void setMeta(String str) {
this.meta = str;
}
public final void setMetricType(Sdk.SDKMetric.SDKMetricType sDKMetricType) {
Intrinsics.checkNotNullParameter(sDKMetricType, "<set-?>");
this.metricType = sDKMetricType;
}
public Metric(Sdk.SDKMetric.SDKMetricType metricType) {
Intrinsics.checkNotNullParameter(metricType, "metricType");
this.metricType = metricType;
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public final class MraidJsError extends VungleError {
/* JADX WARN: Multi-variable type inference failed */
public MraidJsError() {
this(null, 1, 0 == true ? 1 : 0);
}
public /* synthetic */ MraidJsError(String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str);
}
public MraidJsError(String str) {
super(130, Sdk.SDKError.Reason.MRAID_DOWNLOAD_JS_ERROR, str, null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,169 @@
package com.vungle.ads;
import com.vungle.ads.internal.AdInternal;
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 NativeAd$adPlayCallback$1 implements AdPlayCallback {
final /* synthetic */ String $placementId;
final /* synthetic */ NativeAd this$0;
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdRewarded(String str) {
}
public NativeAd$adPlayCallback$1(NativeAd nativeAd, String str) {
this.this$0 = nativeAd;
this.$placementId = str;
}
@Override // com.vungle.ads.internal.presenter.AdPlayCallback
public void onAdStart(String str) {
this.this$0.getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.PLAYING);
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 NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3822onAdStart$lambda0(NativeAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdStart$lambda-0, reason: not valid java name */
public static final void m3822onAdStart$lambda0(NativeAd 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 NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3820onAdImpression$lambda1(NativeAd.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 m3820onAdImpression$lambda1(NativeAd 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) {
this.this$0.getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.FINISHED);
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3819onAdEnd$lambda2(NativeAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdEnd$lambda-2, reason: not valid java name */
public static final void m3819onAdEnd$lambda2(NativeAd 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 NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3818onAdClick$lambda3(NativeAd.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 m3818onAdClick$lambda3(NativeAd 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 NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3821onAdLeftApplication$lambda4(NativeAd.this);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: onAdLeftApplication$lambda-4, reason: not valid java name */
public static final void m3821onAdLeftApplication$lambda4(NativeAd 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");
this.this$0.getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.ERROR);
ThreadUtil threadUtil = ThreadUtil.INSTANCE;
final NativeAd nativeAd = this.this$0;
threadUtil.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$adPlayCallback$1$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
NativeAd$adPlayCallback$1.m3823onFailure$lambda5(NativeAd.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 m3823onFailure$lambda5(NativeAd 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,46 @@
package com.vungle.ads;
import android.graphics.Bitmap;
import android.widget.ImageView;
import com.vungle.ads.internal.util.ThreadUtil;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
/* loaded from: classes4.dex */
public final class NativeAd$displayImage$1 extends Lambda implements Function1 {
final /* synthetic */ ImageView $imageView;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NativeAd$displayImage$1(ImageView imageView) {
super(1);
this.$imageView = imageView;
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
invoke((Bitmap) obj);
return Unit.INSTANCE;
}
public final void invoke(final Bitmap it) {
Intrinsics.checkNotNullParameter(it, "it");
final ImageView imageView = this.$imageView;
if (imageView != null) {
ThreadUtil.INSTANCE.runOnUiThread(new Runnable() { // from class: com.vungle.ads.NativeAd$displayImage$1$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
NativeAd$displayImage$1.m3824invoke$lambda0(imageView, it);
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: invoke$lambda-0, reason: not valid java name */
public static final void m3824invoke$lambda0(ImageView imageView, Bitmap it) {
Intrinsics.checkNotNullParameter(it, "$it");
imageView.setImageBitmap(it);
}
}

View File

@@ -0,0 +1,426 @@
package com.vungle.ads;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.ImpressionTracker;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.load.AdLoaderCallback;
import com.vungle.ads.internal.model.AdPayload;
import com.vungle.ads.internal.platform.Platform;
import com.vungle.ads.internal.presenter.AdEventListener;
import com.vungle.ads.internal.presenter.NativeAdPresenter;
import com.vungle.ads.internal.presenter.NativePresenterDelegate;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.ui.WatermarkView;
import com.vungle.ads.internal.ui.view.MediaView;
import com.vungle.ads.internal.util.ImageLoader;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.LazyThreadSafetyMode;
import kotlin.collections.CollectionsKt__CollectionsJVMKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class NativeAd extends BaseAd {
public static final int BOTTOM_LEFT = 2;
public static final int BOTTOM_RIGHT = 3;
public static final Companion Companion = new Companion(null);
public static final int TOP_LEFT = 0;
public static final int TOP_RIGHT = 1;
private MediaView adContentView;
private ImageView adIconView;
private int adOptionsPosition;
private NativeAdOptionsView adOptionsView;
private final NativeAd$adPlayCallback$1 adPlayCallback;
private FrameLayout adRootView;
private Collection<? extends View> clickableViews;
private final Lazy executors$delegate;
private final Lazy imageLoader$delegate;
private final Lazy impressionTracker$delegate;
private Map<String, String> nativeAdAssetMap;
private NativeAdPresenter presenter;
@Retention(RetentionPolicy.RUNTIME)
public @interface AdOptionsPosition {
}
@AdOptionsPosition
public static /* synthetic */ void getAdOptionsPosition$annotations() {
}
public final int getAdOptionsPosition() {
return this.adOptionsPosition;
}
public final void setAdOptionsPosition(int i) {
this.adOptionsPosition = i;
}
private NativeAd(final Context context, String str, AdConfig adConfig) {
super(context, str, adConfig);
Lazy lazy;
Lazy lazy2;
Lazy lazy3;
lazy = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: com.vungle.ads.NativeAd$imageLoader$2
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final ImageLoader invoke() {
Executors executors;
ImageLoader companion = ImageLoader.Companion.getInstance();
executors = NativeAd.this.getExecutors();
companion.init(executors.getIoExecutor());
return companion;
}
});
this.imageLoader$delegate = lazy;
ServiceLocator.Companion companion = ServiceLocator.Companion;
lazy2 = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.NativeAd$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.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;
lazy3 = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: com.vungle.ads.NativeAd$impressionTracker$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final ImpressionTracker invoke() {
return new ImpressionTracker(context);
}
});
this.impressionTracker$delegate = lazy3;
this.adOptionsPosition = 1;
this.adOptionsView = new NativeAdOptionsView(context);
this.adPlayCallback = new NativeAd$adPlayCallback$1(this, str);
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public NativeAd(Context context, String placementId) {
this(context, placementId, new AdConfig());
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
@Override // com.vungle.ads.BaseAd
public NativeAdInternal constructAdInternal$vungle_ads_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new NativeAdInternal(context);
}
private final ImageLoader getImageLoader() {
return (ImageLoader) this.imageLoader$delegate.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
public final Executors getExecutors() {
return (Executors) this.executors$delegate.getValue();
}
private final ImpressionTracker getImpressionTracker() {
return (ImpressionTracker) this.impressionTracker$delegate.getValue();
}
@Override // com.vungle.ads.BaseAd
public void onAdLoaded$vungle_ads_release(AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
super.onAdLoaded$vungle_ads_release(advertisement);
this.nativeAdAssetMap = advertisement.getMRAIDArgsInMap();
}
public final String getAppIcon() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_APP_ICON)) == null) ? "" : str;
}
public final String getAdTitle() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_APP_NAME)) == null) ? "" : str;
}
public final String getAdBodyText() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_APP_DESCRIPTION)) == null) ? "" : str;
}
public final String getAdCallToActionText() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_CTA_BUTTON_TEXT)) == null) ? "" : str;
}
public final Double getAdStarRating() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
if (map == null || (str = map.get(NativeAdInternal.TOKEN_APP_RATING_VALUE)) == null) {
str = "";
}
if (TextUtils.isEmpty(str)) {
return null;
}
try {
return Double.valueOf(str);
} catch (Exception unused) {
return null;
}
}
public final String getAdSponsoredText() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_SPONSORED_BY)) == null) ? "" : str;
}
public final boolean hasCallToAction() {
return getCtaUrl$vungle_ads_release().length() > 0;
}
public final String getPrivacyIconUrl$vungle_ads_release() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_VUNGLE_PRIVACY_ICON_URL)) == null) ? "" : str;
}
public final String getPrivacyUrl$vungle_ads_release() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_VUNGLE_PRIVACY_URL)) == null) ? "" : str;
}
public final String getCtaUrl$vungle_ads_release() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_CTA_BUTTON_URL)) == null) ? "" : str;
}
private final String getMainImagePath() {
String str;
Map<String, String> map = this.nativeAdAssetMap;
return (map == null || (str = map.get(NativeAdInternal.TOKEN_MAIN_IMAGE)) == null) ? "" : str;
}
public final void unregisterView() {
if (getAdInternal$vungle_ads_release().getAdState() == AdInternal.AdState.FINISHED) {
return;
}
Collection<? extends View> collection = this.clickableViews;
if (collection != null) {
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
((View) it.next()).setOnClickListener(null);
}
}
Map<String, String> map = this.nativeAdAssetMap;
if (map != null) {
map.clear();
}
getImpressionTracker().destroy();
MediaView mediaView = this.adContentView;
if (mediaView != null) {
mediaView.destroy();
}
this.adOptionsView.destroy();
NativeAdPresenter nativeAdPresenter = this.presenter;
if (nativeAdPresenter != null) {
nativeAdPresenter.detach();
}
}
public final void registerViewForInteraction(FrameLayout rootView, MediaView mediaView, ImageView imageView, Collection<? extends View> collection) {
Lazy lazy;
String str;
Intrinsics.checkNotNullParameter(rootView, "rootView");
Intrinsics.checkNotNullParameter(mediaView, "mediaView");
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.logMetric$vungle_ads_release(new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.PLAY_AD_API), (r13 & 2) != 0 ? null : getPlacementId(), (r13 & 4) != 0 ? null : getCreativeId(), (r13 & 8) != 0 ? null : getEventId(), (r13 & 16) != 0 ? null : null);
getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(analyticsClient, getResponseToShowMetric$vungle_ads_release(), getPlacementId(), getCreativeId(), getEventId(), (String) null, 16, (Object) null);
getShowToPresentMetric$vungle_ads_release().markStart();
getShowToFailMetric$vungle_ads_release().markStart();
VungleError canPlayAd = getAdInternal$vungle_ads_release().canPlayAd(true);
if (canPlayAd != null) {
if (getAdInternal$vungle_ads_release().isErrorTerminal$vungle_ads_release(canPlayAd.getCode())) {
getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.ERROR);
Map<String, String> map = this.nativeAdAssetMap;
if (map != null) {
map.clear();
}
}
BaseAdListener adListener = getAdListener();
if (adListener != null) {
adListener.onAdFailedToPlay(this, canPlayAd);
return;
}
return;
}
this.adRootView = rootView;
this.adContentView = mediaView;
this.adIconView = imageView;
this.clickableViews = collection;
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context = getContext();
lazy = LazyKt__LazyJVMKt.lazy(LazyThreadSafetyMode.SYNCHRONIZED, new Function0() { // from class: com.vungle.ads.NativeAd$registerViewForInteraction$$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);
}
});
Context context2 = getContext();
AdLoaderCallback 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.presenter.NativePresenterDelegate");
this.presenter = new NativeAdPresenter(context2, (NativePresenterDelegate) adInternal$vungle_ads_release, getAdInternal$vungle_ads_release().getAdvertisement(), getExecutors().getJobExecutor(), m3813registerViewForInteraction$lambda1(lazy));
Map<String, String> map2 = this.nativeAdAssetMap;
if (map2 == null || (str = map2.get(NativeAdInternal.TOKEN_OM_SDK_DATA)) == null) {
str = "";
}
NativeAdPresenter nativeAdPresenter = this.presenter;
if (nativeAdPresenter != null) {
nativeAdPresenter.initOMTracker(str);
}
NativeAdPresenter nativeAdPresenter2 = this.presenter;
if (nativeAdPresenter2 != null) {
nativeAdPresenter2.startTracking(rootView);
}
NativeAdPresenter nativeAdPresenter3 = this.presenter;
if (nativeAdPresenter3 != null) {
nativeAdPresenter3.setEventListener(new AdEventListener(this.adPlayCallback, getAdInternal$vungle_ads_release().getPlacement()));
}
this.adOptionsView.setOnClickListener(new View.OnClickListener() { // from class: com.vungle.ads.NativeAd$$ExternalSyntheticLambda0
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
NativeAd.m3814registerViewForInteraction$lambda2(NativeAd.this, view);
}
});
if (collection == null) {
collection = CollectionsKt__CollectionsJVMKt.listOf(mediaView);
}
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
((View) it.next()).setOnClickListener(new View.OnClickListener() { // from class: com.vungle.ads.NativeAd$$ExternalSyntheticLambda1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
NativeAd.m3815registerViewForInteraction$lambda4$lambda3(NativeAd.this, view);
}
});
}
this.adOptionsView.renderTo(rootView, this.adOptionsPosition);
getImpressionTracker().addView(rootView, new ImpressionTracker.ImpressionListener() { // from class: com.vungle.ads.NativeAd$$ExternalSyntheticLambda2
@Override // com.vungle.ads.internal.ImpressionTracker.ImpressionListener
public final void onImpression(View view) {
NativeAd.m3816registerViewForInteraction$lambda5(NativeAd.this, view);
}
});
displayImage(getMainImagePath(), mediaView.getMainImage$vungle_ads_release());
displayImage(getAppIcon(), imageView);
displayImage(getPrivacyIconUrl$vungle_ads_release(), this.adOptionsView.getPrivacyIcon$vungle_ads_release());
String watermark$vungle_ads_release = getAdConfig().getWatermark$vungle_ads_release();
if (watermark$vungle_ads_release != null) {
Context context3 = rootView.getContext();
Intrinsics.checkNotNullExpressionValue(context3, "rootView.context");
WatermarkView watermarkView = new WatermarkView(context3, watermark$vungle_ads_release);
rootView.addView(watermarkView);
watermarkView.bringToFront();
}
NativeAdPresenter nativeAdPresenter4 = this.presenter;
if (nativeAdPresenter4 != null) {
nativeAdPresenter4.prepare();
}
}
/* renamed from: registerViewForInteraction$lambda-1, reason: not valid java name */
private static final Platform m3813registerViewForInteraction$lambda1(Lazy lazy) {
return (Platform) lazy.getValue();
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: registerViewForInteraction$lambda-2, reason: not valid java name */
public static final void m3814registerViewForInteraction$lambda2(NativeAd this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
NativeAdPresenter nativeAdPresenter = this$0.presenter;
if (nativeAdPresenter != null) {
nativeAdPresenter.processCommand("openPrivacy", this$0.getPrivacyUrl$vungle_ads_release());
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: registerViewForInteraction$lambda-4$lambda-3, reason: not valid java name */
public static final void m3815registerViewForInteraction$lambda4$lambda3(NativeAd this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
NativeAdPresenter nativeAdPresenter = this$0.presenter;
if (nativeAdPresenter != null) {
nativeAdPresenter.processCommand(NativeAdPresenter.DOWNLOAD, this$0.getCtaUrl$vungle_ads_release());
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: registerViewForInteraction$lambda-5, reason: not valid java name */
public static final void m3816registerViewForInteraction$lambda5(NativeAd this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
NativeAdPresenter nativeAdPresenter = this$0.presenter;
if (nativeAdPresenter != null) {
NativeAdPresenter.processCommand$default(nativeAdPresenter, "videoViewed", null, 2, null);
}
NativeAdPresenter nativeAdPresenter2 = this$0.presenter;
if (nativeAdPresenter2 != null) {
nativeAdPresenter2.processCommand("tpat", Constants.CHECKPOINT_0);
}
NativeAdPresenter nativeAdPresenter3 = this$0.presenter;
if (nativeAdPresenter3 != null) {
nativeAdPresenter3.onImpression();
}
}
public final void performCTA() {
NativeAdPresenter nativeAdPresenter = this.presenter;
if (nativeAdPresenter != null) {
nativeAdPresenter.processCommand(NativeAdPresenter.DOWNLOAD, getCtaUrl$vungle_ads_release());
}
}
private final void displayImage(String str, ImageView imageView) {
getImageLoader().displayImage(str, new NativeAd$displayImage$1(imageView));
}
}

View File

@@ -0,0 +1,75 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.model.BidPayload;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.presenter.NativePresenterDelegate;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class NativeAdInternal extends AdInternal implements NativePresenterDelegate {
public static final Companion Companion = new Companion(null);
public static final String TOKEN_APP_DESCRIPTION = "APP_DESCRIPTION";
public static final String TOKEN_APP_ICON = "APP_ICON";
public static final String TOKEN_APP_NAME = "APP_NAME";
public static final String TOKEN_APP_RATING_VALUE = "APP_RATING_VALUE";
public static final String TOKEN_CTA_BUTTON_TEXT = "CTA_BUTTON_TEXT";
public static final String TOKEN_CTA_BUTTON_URL = "CTA_BUTTON_URL";
public static final String TOKEN_MAIN_IMAGE = "MAIN_IMAGE";
public static final String TOKEN_OM_SDK_DATA = "OM_SDK_DATA";
public static final String TOKEN_SPONSORED_BY = "SPONSORED_BY";
public static final String TOKEN_VUNGLE_PRIVACY_ICON_URL = "VUNGLE_PRIVACY_ICON_URL";
public static final String TOKEN_VUNGLE_PRIVACY_URL = "VUNGLE_PRIVACY_URL";
@Override // com.vungle.ads.internal.AdInternal
public VungleAdSize getAdSizeForAdRequest() {
return null;
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdSize(VungleAdSize vungleAdSize) {
return true;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NativeAdInternal(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
}
@Override // com.vungle.ads.internal.presenter.NativePresenterDelegate
public String getPlacementRefId() {
Placement placement = getPlacement();
if (placement != null) {
return placement.getReferenceId();
}
return null;
}
@Override // com.vungle.ads.internal.presenter.NativePresenterDelegate
public List<String> getImpressionUrls() {
BidPayload bidPayload = getBidPayload();
if (bidPayload != null) {
return bidPayload.getImpression();
}
return null;
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdTypeForPlacement(Placement placement) {
Intrinsics.checkNotNullParameter(placement, "placement");
return placement.isNative();
}
}

View File

@@ -0,0 +1,5 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface NativeAdListener extends BaseAdListener {
}

View File

@@ -0,0 +1,115 @@
package com.vungle.ads;
import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.vungle.ads.NativeAd;
import com.vungle.ads.internal.util.ViewUtility;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class NativeAdOptionsView extends FrameLayout {
private static final int AD_OPTIONS_VIEW_SIZE = 20;
public static final Companion Companion = new Companion(null);
private ImageView icon;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NativeAdOptionsView(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
initView(context);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NativeAdOptionsView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
Intrinsics.checkNotNullParameter(context, "context");
initView(context);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public NativeAdOptionsView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
Intrinsics.checkNotNullParameter(context, "context");
initView(context);
}
private final void initView(Context context) {
this.icon = new ImageView(context);
int dpToPixels = ViewUtility.INSTANCE.dpToPixels(context, 20);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(dpToPixels, dpToPixels);
ImageView imageView = this.icon;
ImageView imageView2 = null;
if (imageView == null) {
Intrinsics.throwUninitializedPropertyAccessException("icon");
imageView = null;
}
imageView.setLayoutParams(layoutParams);
ImageView imageView3 = this.icon;
if (imageView3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("icon");
} else {
imageView2 = imageView3;
}
addView(imageView2);
}
public final ImageView getPrivacyIcon$vungle_ads_release() {
ImageView imageView = this.icon;
if (imageView != null) {
return imageView;
}
Intrinsics.throwUninitializedPropertyAccessException("icon");
return null;
}
public final void renderTo(FrameLayout rootView, @NativeAd.AdOptionsPosition int i) {
Intrinsics.checkNotNullParameter(rootView, "rootView");
if (getParent() != null) {
ViewParent parent = getParent();
Intrinsics.checkNotNull(parent, "null cannot be cast to non-null type android.view.ViewGroup");
((ViewGroup) parent).removeView(this);
}
rootView.addView(this);
ViewUtility viewUtility = ViewUtility.INSTANCE;
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
int dpToPixels = viewUtility.dpToPixels(context, 20);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(dpToPixels, dpToPixels);
if (i == 0) {
layoutParams.gravity = 8388659;
} else if (i == 1) {
layoutParams.gravity = 8388661;
} else if (i == 2) {
layoutParams.gravity = 8388691;
} else if (i != 3) {
layoutParams.gravity = 8388661;
} else {
layoutParams.gravity = 8388693;
}
setLayoutParams(layoutParams);
rootView.requestLayout();
}
public final void destroy() {
removeAllViews();
if (getParent() != null) {
ViewParent parent = getParent();
Intrinsics.checkNotNull(parent, "null cannot be cast to non-null type android.view.ViewGroup");
((ViewGroup) parent).removeView(this);
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class NetworkPermissionsNotGranted extends VungleError {
public NetworkPermissionsNotGranted() {
super(Integer.valueOf(VungleError.NETWORK_PERMISSIONS_NOT_GRANTED), null, null, null, null, null, 62, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class NetworkUnreachable extends VungleError {
public NetworkUnreachable() {
super(Integer.valueOf(VungleError.NETWORK_UNREACHABLE), Sdk.SDKError.Reason.API_REQUEST_ERROR, "Config: Network Unreachable", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,8 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class NoServeError extends VungleError {
public NoServeError() {
super(10001, null, null, null, null, null, 62, null);
}
}

View File

@@ -0,0 +1,41 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class OneShotTimeIntervalMetric extends TimeIntervalMetric {
private boolean alreadyLogged;
public final boolean isLogged() {
return this.alreadyLogged;
}
public final void markLogged() {
this.alreadyLogged = true;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public OneShotTimeIntervalMetric(Sdk.SDKMetric.SDKMetricType metricType) {
super(metricType);
Intrinsics.checkNotNullParameter(metricType, "metricType");
}
public final boolean alreadyMetered$vungle_ads_release() {
return (getValueFirst() == null || getValueSecond() == null) ? false : true;
}
@Override // com.vungle.ads.TimeIntervalMetric
public void markStart() {
if (getValueFirst() == null) {
super.markStart();
}
}
@Override // com.vungle.ads.TimeIntervalMetric
public void markEnd() {
if (getValueSecond() == null) {
super.markEnd();
}
}
}

View File

@@ -0,0 +1,20 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* loaded from: classes4.dex */
public final class OutOfMemory extends VungleError {
/* JADX WARN: Multi-variable type inference failed */
public OutOfMemory() {
this(null, 1, 0 == true ? 1 : 0);
}
public /* synthetic */ OutOfMemory(String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : str);
}
public OutOfMemory(String str) {
super(3001, Sdk.SDKError.Reason.OUT_OF_MEMORY, str, null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class PlacementAdTypeMismatchError extends VungleError {
public PlacementAdTypeMismatchError(String str) {
super(207, Sdk.SDKError.Reason.PLACEMENT_AD_TYPE_MISMATCH, str + " Ad type does not match with placement type.", str, null, null, 48, null);
}
}

View File

@@ -0,0 +1,13 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class PlacementNotFoundError extends VungleError {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public PlacementNotFoundError(String placementId) {
super(201, Sdk.SDKError.Reason.INVALID_PLACEMENT_ID, "Placement '" + placementId + "' is invalid", placementId, null, null, 48, null);
Intrinsics.checkNotNullParameter(placementId, "placementId");
}
}

View File

@@ -0,0 +1,13 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class PrivacyUrlError extends VungleError {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public PrivacyUrlError(String privacyUrl) {
super(136, Sdk.SDKError.Reason.PRIVACY_URL_ERROR, "Failed to open privacy url: " + privacyUrl, null, null, null, 56, null);
Intrinsics.checkNotNullParameter(privacyUrl, "privacyUrl");
}
}

View File

@@ -0,0 +1,333 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class R {
public static final class attr {
public static int alpha = 0x7f040055;
public static int buttonSize = 0x7f040074;
public static int circleCrop = 0x7f040085;
public static int colorScheme = 0x7f040094;
public static int font = 0x7f0400d8;
public static int fontProviderAuthority = 0x7f0400da;
public static int fontProviderCerts = 0x7f0400db;
public static int fontProviderFetchStrategy = 0x7f0400dd;
public static int fontProviderFetchTimeout = 0x7f0400de;
public static int fontProviderPackage = 0x7f0400df;
public static int fontProviderQuery = 0x7f0400e0;
public static int fontProviderSystemFontFamily = 0x7f0400e1;
public static int fontStyle = 0x7f0400e2;
public static int fontVariationSettings = 0x7f0400e3;
public static int fontWeight = 0x7f0400e4;
public static int imageAspectRatio = 0x7f0400f1;
public static int imageAspectRatioAdjust = 0x7f0400f2;
public static int lStar = 0x7f0400fa;
public static int nestedScrollViewStyle = 0x7f040123;
public static int queryPatterns = 0x7f040138;
public static int scopeUris = 0x7f040141;
public static int shortcutMatchRequired = 0x7f04014d;
public static int ttcIndex = 0x7f04019c;
private attr() {
}
}
public static final class color {
public static int androidx_core_ripple_material_light = 0x7f060025;
public static int androidx_core_secondary_text_default_material_light = 0x7f060026;
public static int common_google_signin_btn_text_dark = 0x7f060068;
public static int common_google_signin_btn_text_dark_default = 0x7f060069;
public static int common_google_signin_btn_text_dark_disabled = 0x7f06006a;
public static int common_google_signin_btn_text_dark_focused = 0x7f06006b;
public static int common_google_signin_btn_text_dark_pressed = 0x7f06006c;
public static int common_google_signin_btn_text_light = 0x7f06006d;
public static int common_google_signin_btn_text_light_default = 0x7f06006e;
public static int common_google_signin_btn_text_light_disabled = 0x7f06006f;
public static int common_google_signin_btn_text_light_focused = 0x7f060070;
public static int common_google_signin_btn_text_light_pressed = 0x7f060071;
public static int common_google_signin_btn_tint = 0x7f060072;
public static int notification_action_color_filter = 0x7f0600e7;
public static int notification_icon_bg_color = 0x7f0600e8;
public static int ripple_material_light = 0x7f0600f3;
public static int secondary_text_default_material_light = 0x7f0600f5;
private color() {
}
}
public static final class dimen {
public static int compat_button_inset_horizontal_material = 0x7f070095;
public static int compat_button_inset_vertical_material = 0x7f070096;
public static int compat_button_padding_horizontal_material = 0x7f070097;
public static int compat_button_padding_vertical_material = 0x7f070098;
public static int compat_control_corner_material = 0x7f070099;
public static int compat_notification_large_icon_max_height = 0x7f07009a;
public static int compat_notification_large_icon_max_width = 0x7f07009b;
public static int notification_action_icon_size = 0x7f070105;
public static int notification_action_text_size = 0x7f070106;
public static int notification_big_circle_margin = 0x7f070107;
public static int notification_content_margin_start = 0x7f070108;
public static int notification_large_icon_height = 0x7f070109;
public static int notification_large_icon_width = 0x7f07010a;
public static int notification_main_column_padding_top = 0x7f07010b;
public static int notification_media_narrow_margin = 0x7f07010c;
public static int notification_right_icon_size = 0x7f07010d;
public static int notification_right_side_padding_top = 0x7f07010e;
public static int notification_small_icon_background_padding = 0x7f07010f;
public static int notification_small_icon_size_as_large = 0x7f070110;
public static int notification_subtext_size = 0x7f070111;
public static int notification_top_pad = 0x7f070112;
public static int notification_top_pad_large_text = 0x7f070113;
private dimen() {
}
}
public static final class drawable {
public static int common_full_open_on_phone = 0x7f0800ff;
public static int common_google_signin_btn_icon_dark = 0x7f080100;
public static int common_google_signin_btn_icon_dark_focused = 0x7f080101;
public static int common_google_signin_btn_icon_dark_normal = 0x7f080102;
public static int common_google_signin_btn_icon_dark_normal_background = 0x7f080103;
public static int common_google_signin_btn_icon_disabled = 0x7f080104;
public static int common_google_signin_btn_icon_light = 0x7f080105;
public static int common_google_signin_btn_icon_light_focused = 0x7f080106;
public static int common_google_signin_btn_icon_light_normal = 0x7f080107;
public static int common_google_signin_btn_icon_light_normal_background = 0x7f080108;
public static int common_google_signin_btn_text_dark = 0x7f080109;
public static int common_google_signin_btn_text_dark_focused = 0x7f08010a;
public static int common_google_signin_btn_text_dark_normal = 0x7f08010b;
public static int common_google_signin_btn_text_dark_normal_background = 0x7f08010c;
public static int common_google_signin_btn_text_disabled = 0x7f08010d;
public static int common_google_signin_btn_text_light = 0x7f08010e;
public static int common_google_signin_btn_text_light_focused = 0x7f08010f;
public static int common_google_signin_btn_text_light_normal = 0x7f080110;
public static int common_google_signin_btn_text_light_normal_background = 0x7f080111;
public static int googleg_disabled_color_18 = 0x7f080163;
public static int googleg_standard_color_18 = 0x7f080164;
public static int notification_action_background = 0x7f080241;
public static int notification_bg = 0x7f080242;
public static int notification_bg_low = 0x7f080243;
public static int notification_bg_low_normal = 0x7f080244;
public static int notification_bg_low_pressed = 0x7f080245;
public static int notification_bg_normal = 0x7f080246;
public static int notification_bg_normal_pressed = 0x7f080247;
public static int notification_icon_background = 0x7f080248;
public static int notification_template_icon_bg = 0x7f08024a;
public static int notification_template_icon_low_bg = 0x7f08024b;
public static int notification_tile_bg = 0x7f08024c;
public static int notify_panel_notification_icon_bg = 0x7f08024d;
private drawable() {
}
}
public static final class id {
public static int accessibility_action_clickable_span = 0x7f0a0009;
public static int accessibility_custom_action_0 = 0x7f0a000a;
public static int accessibility_custom_action_1 = 0x7f0a000b;
public static int accessibility_custom_action_10 = 0x7f0a000c;
public static int accessibility_custom_action_11 = 0x7f0a000d;
public static int accessibility_custom_action_12 = 0x7f0a000e;
public static int accessibility_custom_action_13 = 0x7f0a000f;
public static int accessibility_custom_action_14 = 0x7f0a0010;
public static int accessibility_custom_action_15 = 0x7f0a0011;
public static int accessibility_custom_action_16 = 0x7f0a0012;
public static int accessibility_custom_action_17 = 0x7f0a0013;
public static int accessibility_custom_action_18 = 0x7f0a0014;
public static int accessibility_custom_action_19 = 0x7f0a0015;
public static int accessibility_custom_action_2 = 0x7f0a0016;
public static int accessibility_custom_action_20 = 0x7f0a0017;
public static int accessibility_custom_action_21 = 0x7f0a0018;
public static int accessibility_custom_action_22 = 0x7f0a0019;
public static int accessibility_custom_action_23 = 0x7f0a001a;
public static int accessibility_custom_action_24 = 0x7f0a001b;
public static int accessibility_custom_action_25 = 0x7f0a001c;
public static int accessibility_custom_action_26 = 0x7f0a001d;
public static int accessibility_custom_action_27 = 0x7f0a001e;
public static int accessibility_custom_action_28 = 0x7f0a001f;
public static int accessibility_custom_action_29 = 0x7f0a0020;
public static int accessibility_custom_action_3 = 0x7f0a0021;
public static int accessibility_custom_action_30 = 0x7f0a0022;
public static int accessibility_custom_action_31 = 0x7f0a0023;
public static int accessibility_custom_action_4 = 0x7f0a0024;
public static int accessibility_custom_action_5 = 0x7f0a0025;
public static int accessibility_custom_action_6 = 0x7f0a0026;
public static int accessibility_custom_action_7 = 0x7f0a0027;
public static int accessibility_custom_action_8 = 0x7f0a0028;
public static int accessibility_custom_action_9 = 0x7f0a0029;
public static int action_container = 0x7f0a0032;
public static int action_divider = 0x7f0a0034;
public static int action_image = 0x7f0a0035;
public static int action_text = 0x7f0a003c;
public static int actions = 0x7f0a003d;
public static int adjust_height = 0x7f0a0044;
public static int adjust_width = 0x7f0a0045;
public static int async = 0x7f0a0088;
public static int auto = 0x7f0a0089;
public static int blocking = 0x7f0a0091;
public static int chronometer = 0x7f0a00a6;
public static int dark = 0x7f0a00bc;
public static int dialog_button = 0x7f0a00c1;
public static int forever = 0x7f0a0107;
public static int icon = 0x7f0a014a;
public static int icon_group = 0x7f0a014b;
public static int icon_only = 0x7f0a014c;
public static int info = 0x7f0a0151;
public static int italic = 0x7f0a0156;
public static int light = 0x7f0a015c;
public static int line1 = 0x7f0a015d;
public static int line3 = 0x7f0a015e;
public static int none = 0x7f0a022e;
public static int normal = 0x7f0a022f;
public static int notification_background = 0x7f0a0230;
public static int notification_main_column = 0x7f0a0231;
public static int notification_main_column_container = 0x7f0a0232;
public static int right_icon = 0x7f0a0248;
public static int right_side = 0x7f0a0249;
public static int standard = 0x7f0a0267;
public static int tag_accessibility_actions = 0x7f0a0270;
public static int tag_accessibility_clickable_spans = 0x7f0a0271;
public static int tag_accessibility_heading = 0x7f0a0272;
public static int tag_accessibility_pane_title = 0x7f0a0273;
public static int tag_on_apply_window_listener = 0x7f0a0274;
public static int tag_on_receive_content_listener = 0x7f0a0275;
public static int tag_on_receive_content_mime_types = 0x7f0a0276;
public static int tag_screen_reader_focusable = 0x7f0a0277;
public static int tag_state_description = 0x7f0a0278;
public static int tag_transition_group = 0x7f0a0279;
public static int tag_unhandled_key_event_manager = 0x7f0a027a;
public static int tag_unhandled_key_listeners = 0x7f0a027b;
public static int tag_window_insets_animation_callback = 0x7f0a027c;
public static int text = 0x7f0a027d;
public static int text2 = 0x7f0a027e;
public static int time = 0x7f0a0283;
public static int title = 0x7f0a0284;
public static int view_tree_lifecycle_owner = 0x7f0a0290;
public static int wide = 0x7f0a0296;
private id() {
}
}
public static final class integer {
public static int google_play_services_version = 0x7f0b000f;
public static int status_bar_notification_info_maxnum = 0x7f0b0014;
private integer() {
}
}
public static final class layout {
public static int custom_dialog = 0x7f0d0033;
public static int notification_action = 0x7f0d009f;
public static int notification_action_tombstone = 0x7f0d00a0;
public static int notification_template_custom_big = 0x7f0d00a7;
public static int notification_template_icon_group = 0x7f0d00a8;
public static int notification_template_part_chronometer = 0x7f0d00ac;
public static int notification_template_part_time = 0x7f0d00ad;
private layout() {
}
}
public static final class string {
public static int common_google_play_services_enable_button = 0x7f12009f;
public static int common_google_play_services_enable_text = 0x7f1200a0;
public static int common_google_play_services_enable_title = 0x7f1200a1;
public static int common_google_play_services_install_button = 0x7f1200a2;
public static int common_google_play_services_install_text = 0x7f1200a3;
public static int common_google_play_services_install_title = 0x7f1200a4;
public static int common_google_play_services_notification_channel_name = 0x7f1200a5;
public static int common_google_play_services_notification_ticker = 0x7f1200a6;
public static int common_google_play_services_unknown_issue = 0x7f1200a7;
public static int common_google_play_services_unsupported_text = 0x7f1200a8;
public static int common_google_play_services_update_button = 0x7f1200a9;
public static int common_google_play_services_update_text = 0x7f1200aa;
public static int common_google_play_services_update_title = 0x7f1200ab;
public static int common_google_play_services_updating_text = 0x7f1200ac;
public static int common_google_play_services_wear_update_text = 0x7f1200ad;
public static int common_open_on_phone = 0x7f1200ae;
public static int common_signin_button_text = 0x7f1200af;
public static int common_signin_button_text_long = 0x7f1200b0;
public static int status_bar_notification_info_overflow = 0x7f120187;
private string() {
}
}
public static final class style {
public static int TextAppearance_Compat_Notification = 0x7f130147;
public static int TextAppearance_Compat_Notification_Info = 0x7f130148;
public static int TextAppearance_Compat_Notification_Line2 = 0x7f13014a;
public static int TextAppearance_Compat_Notification_Time = 0x7f13014d;
public static int TextAppearance_Compat_Notification_Title = 0x7f13014f;
public static int Widget_Compat_NotificationActionContainer = 0x7f1301c1;
public static int Widget_Compat_NotificationActionText = 0x7f1301c2;
private style() {
}
}
public static final class styleable {
public static int Capability_queryPatterns = 0x00000000;
public static int Capability_shortcutMatchRequired = 0x00000001;
public static int ColorStateListItem_alpha = 0x00000003;
public static int ColorStateListItem_android_alpha = 0x00000001;
public static int ColorStateListItem_android_color = 0x00000000;
public static int ColorStateListItem_android_lStar = 0x00000002;
public static int ColorStateListItem_lStar = 0x00000004;
public static int FontFamilyFont_android_font = 0x00000000;
public static int FontFamilyFont_android_fontStyle = 0x00000002;
public static int FontFamilyFont_android_fontVariationSettings = 0x00000004;
public static int FontFamilyFont_android_fontWeight = 0x00000001;
public static int FontFamilyFont_android_ttcIndex = 0x00000003;
public static int FontFamilyFont_font = 0x00000005;
public static int FontFamilyFont_fontStyle = 0x00000006;
public static int FontFamilyFont_fontVariationSettings = 0x00000007;
public static int FontFamilyFont_fontWeight = 0x00000008;
public static int FontFamilyFont_ttcIndex = 0x00000009;
public static int FontFamily_fontProviderAuthority = 0x00000000;
public static int FontFamily_fontProviderCerts = 0x00000001;
public static int FontFamily_fontProviderFallbackQuery = 0x00000002;
public static int FontFamily_fontProviderFetchStrategy = 0x00000003;
public static int FontFamily_fontProviderFetchTimeout = 0x00000004;
public static int FontFamily_fontProviderPackage = 0x00000005;
public static int FontFamily_fontProviderQuery = 0x00000006;
public static int FontFamily_fontProviderSystemFontFamily = 0x00000007;
public static int GradientColorItem_android_color = 0x00000000;
public static int GradientColorItem_android_offset = 0x00000001;
public static int GradientColor_android_centerColor = 0x00000007;
public static int GradientColor_android_centerX = 0x00000003;
public static int GradientColor_android_centerY = 0x00000004;
public static int GradientColor_android_endColor = 0x00000001;
public static int GradientColor_android_endX = 0x0000000a;
public static int GradientColor_android_endY = 0x0000000b;
public static int GradientColor_android_gradientRadius = 0x00000005;
public static int GradientColor_android_startColor = 0x00000000;
public static int GradientColor_android_startX = 0x00000008;
public static int GradientColor_android_startY = 0x00000009;
public static int GradientColor_android_tileMode = 0x00000006;
public static int GradientColor_android_type = 0x00000002;
public static int LoadingImageView_circleCrop = 0x00000000;
public static int LoadingImageView_imageAspectRatio = 0x00000001;
public static int LoadingImageView_imageAspectRatioAdjust = 0x00000002;
public static int SignInButton_buttonSize = 0x00000000;
public static int SignInButton_colorScheme = 0x00000001;
public static int SignInButton_scopeUris = 0x00000002;
public static int[] Capability = {com.ea.games.r3_row.R.attr.queryPatterns, com.ea.games.r3_row.R.attr.shortcutMatchRequired};
public static int[] ColorStateListItem = {android.R.attr.color, android.R.attr.alpha, android.R.attr.lStar, com.ea.games.r3_row.R.attr.alpha, com.ea.games.r3_row.R.attr.lStar};
public static int[] FontFamily = {com.ea.games.r3_row.R.attr.fontProviderAuthority, com.ea.games.r3_row.R.attr.fontProviderCerts, com.ea.games.r3_row.R.attr.fontProviderFallbackQuery, com.ea.games.r3_row.R.attr.fontProviderFetchStrategy, com.ea.games.r3_row.R.attr.fontProviderFetchTimeout, com.ea.games.r3_row.R.attr.fontProviderPackage, com.ea.games.r3_row.R.attr.fontProviderQuery, com.ea.games.r3_row.R.attr.fontProviderSystemFontFamily};
public static int[] FontFamilyFont = {android.R.attr.font, android.R.attr.fontWeight, android.R.attr.fontStyle, android.R.attr.ttcIndex, android.R.attr.fontVariationSettings, com.ea.games.r3_row.R.attr.font, com.ea.games.r3_row.R.attr.fontStyle, com.ea.games.r3_row.R.attr.fontVariationSettings, com.ea.games.r3_row.R.attr.fontWeight, com.ea.games.r3_row.R.attr.ttcIndex};
public static int[] GradientColor = {android.R.attr.startColor, android.R.attr.endColor, android.R.attr.type, android.R.attr.centerX, android.R.attr.centerY, android.R.attr.gradientRadius, android.R.attr.tileMode, android.R.attr.centerColor, android.R.attr.startX, android.R.attr.startY, android.R.attr.endX, android.R.attr.endY};
public static int[] GradientColorItem = {android.R.attr.color, android.R.attr.offset};
public static int[] LoadingImageView = {com.ea.games.r3_row.R.attr.circleCrop, com.ea.games.r3_row.R.attr.imageAspectRatio, com.ea.games.r3_row.R.attr.imageAspectRatioAdjust};
public static int[] SignInButton = {com.ea.games.r3_row.R.attr.buttonSize, com.ea.games.r3_row.R.attr.colorScheme, com.ea.games.r3_row.R.attr.scopeUris};
private styleable() {
}
}
private R() {
}
}

View File

@@ -0,0 +1,58 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.AdInternal;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class RewardedAd extends BaseFullscreenAd {
public /* synthetic */ RewardedAd(Context context, String str, AdConfig adConfig, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, str, (i & 4) != 0 ? new AdConfig() : adConfig);
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RewardedAd(Context context, String placementId, AdConfig adConfig) {
super(context, placementId, adConfig);
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
}
@Override // com.vungle.ads.BaseAd
public RewardedAdInternal constructAdInternal$vungle_ads_release(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return new RewardedAdInternal(context);
}
private final RewardedAdInternal getRewardedAdInternal() {
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.RewardedAdInternal");
return (RewardedAdInternal) adInternal$vungle_ads_release;
}
public final void setUserId(String userId) {
Intrinsics.checkNotNullParameter(userId, "userId");
getRewardedAdInternal().setUserId$vungle_ads_release(userId);
}
public final void setAlertTitleText(String titleText) {
Intrinsics.checkNotNullParameter(titleText, "titleText");
getRewardedAdInternal().setAlertTitleText$vungle_ads_release(titleText);
}
public final void setAlertBodyText(String bodyText) {
Intrinsics.checkNotNullParameter(bodyText, "bodyText");
getRewardedAdInternal().setAlertBodyText$vungle_ads_release(bodyText);
}
public final void setAlertCloseButtonText(String closeButtonText) {
Intrinsics.checkNotNullParameter(closeButtonText, "closeButtonText");
getRewardedAdInternal().setAlertCloseButtonText$vungle_ads_release(closeButtonText);
}
public final void setAlertContinueButtonText(String continueButtonText) {
Intrinsics.checkNotNullParameter(continueButtonText, "continueButtonText");
getRewardedAdInternal().setAlertContinueButtonText$vungle_ads_release(continueButtonText);
}
}

View File

@@ -0,0 +1,102 @@
package com.vungle.ads;
import android.content.Context;
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.PresenterDelegate;
import com.vungle.ads.internal.ui.AdActivity;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class RewardedAdInternal extends FullscreenAdInternal implements PresenterDelegate {
private String alertBodyText;
private String alertCloseButtonText;
private String alertContinueButtonText;
private String alertTitleText;
private String userId;
@Override // com.vungle.ads.internal.presenter.PresenterDelegate
public String getAlertBodyText() {
return this.alertBodyText;
}
public final String getAlertBodyText$vungle_ads_release() {
return this.alertBodyText;
}
@Override // com.vungle.ads.internal.presenter.PresenterDelegate
public String getAlertCloseButtonText() {
return this.alertCloseButtonText;
}
public final String getAlertCloseButtonText$vungle_ads_release() {
return this.alertCloseButtonText;
}
@Override // com.vungle.ads.internal.presenter.PresenterDelegate
public String getAlertContinueButtonText() {
return this.alertContinueButtonText;
}
public final String getAlertContinueButtonText$vungle_ads_release() {
return this.alertContinueButtonText;
}
@Override // com.vungle.ads.internal.presenter.PresenterDelegate
public String getAlertTitleText() {
return this.alertTitleText;
}
public final String getAlertTitleText$vungle_ads_release() {
return this.alertTitleText;
}
@Override // com.vungle.ads.internal.presenter.PresenterDelegate
public String getUserId() {
return this.userId;
}
public final String getUserId$vungle_ads_release() {
return this.userId;
}
public final void setAlertBodyText$vungle_ads_release(String str) {
this.alertBodyText = str;
}
public final void setAlertCloseButtonText$vungle_ads_release(String str) {
this.alertCloseButtonText = str;
}
public final void setAlertContinueButtonText$vungle_ads_release(String str) {
this.alertContinueButtonText = str;
}
public final void setAlertTitleText$vungle_ads_release(String str) {
this.alertTitleText = str;
}
public final void setUserId$vungle_ads_release(String str) {
this.userId = str;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public RewardedAdInternal(Context context) {
super(context);
Intrinsics.checkNotNullParameter(context, "context");
}
@Override // com.vungle.ads.internal.AdInternal
public boolean isValidAdTypeForPlacement(Placement placement) {
Intrinsics.checkNotNullParameter(placement, "placement");
return placement.isRewardedVideo();
}
@Override // com.vungle.ads.internal.AdInternal
public void renderAd$vungle_ads_release(AdPlayCallback adPlayCallback, AdPayload advertisement) {
Intrinsics.checkNotNullParameter(advertisement, "advertisement");
AdActivity.Companion.setPresenterDelegate$vungle_ads_release(this);
super.renderAd$vungle_ads_release(adPlayCallback, advertisement);
}
}

View File

@@ -0,0 +1,6 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public interface RewardedAdListener extends FullscreenAdListener {
void onAdRewarded(BaseAd baseAd);
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class SdkAlreadyInitialized extends VungleError {
public SdkAlreadyInitialized() {
super(null, Sdk.SDKError.Reason.ALREADY_INITIALIZED, "Config: Vungle SDK is already initialized", null, null, null, 57, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class SdkInitializationInProgress extends VungleError {
public SdkInitializationInProgress() {
super(3, Sdk.SDKError.Reason.CURRENTLY_INITIALIZING, "Config: Init Ongoing", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class SdkNotInitialized extends VungleError {
public SdkNotInitialized() {
super(10003, Sdk.SDKError.Reason.SDK_NOT_INITIALIZED, "Config: SDK response is null", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class SdkVersionTooLow extends VungleError {
public SdkVersionTooLow() {
super(Integer.valueOf(VungleError.SDK_VERSION_BELOW_REQUIRED_VERSION), Sdk.SDKError.Reason.API_REQUEST_ERROR, "Config: SDK is supported only for API versions 21 and above", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,381 @@
package com.vungle.ads;
import android.annotation.SuppressLint;
import android.content.Context;
import androidx.annotation.Keep;
import androidx.annotation.VisibleForTesting;
import com.google.android.gms.ads.RequestConfiguration;
import com.vungle.ads.internal.bidding.BidTokenEncoder;
import com.vungle.ads.internal.downloader.AssetDownloader;
import com.vungle.ads.internal.downloader.Downloader;
import com.vungle.ads.internal.executor.Executors;
import com.vungle.ads.internal.executor.SDKExecutors;
import com.vungle.ads.internal.executor.VungleThreadPoolExecutor;
import com.vungle.ads.internal.locale.LocaleInfo;
import com.vungle.ads.internal.locale.SystemLocaleInfo;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.omsdk.OMInjector;
import com.vungle.ads.internal.omsdk.OMTracker;
import com.vungle.ads.internal.persistence.FilePreferences;
import com.vungle.ads.internal.platform.AndroidPlatform;
import com.vungle.ads.internal.platform.Platform;
import com.vungle.ads.internal.signals.SignalManager;
import com.vungle.ads.internal.task.JobCreator;
import com.vungle.ads.internal.task.JobRunner;
import com.vungle.ads.internal.task.JobRunnerThreadPriorityHelper;
import com.vungle.ads.internal.task.VungleJobCreator;
import com.vungle.ads.internal.task.VungleJobRunner;
import com.vungle.ads.internal.util.ConcurrencyTimeoutProvider;
import com.vungle.ads.internal.util.PathProvider;
import java.util.HashMap;
import java.util.Map;
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;
/* loaded from: classes4.dex */
public final class ServiceLocator {
public static final Companion Companion = new Companion(null);
@SuppressLint({"StaticFieldLeak"})
private static volatile ServiceLocator INSTANCE;
private final Map<Class<?>, Object> cache;
private final Map<Class<?>, Creator<?>> creators;
private final Context ctx;
public /* synthetic */ ServiceLocator(Context context, DefaultConstructorMarker defaultConstructorMarker) {
this(context);
}
private ServiceLocator(Context context) {
Context applicationContext = context.getApplicationContext();
Intrinsics.checkNotNullExpressionValue(applicationContext, "context.applicationContext");
this.ctx = applicationContext;
this.creators = new HashMap();
this.cache = new HashMap();
buildCreators();
}
public final synchronized <T> T getService(Class<T> serviceClass) {
Intrinsics.checkNotNullParameter(serviceClass, "serviceClass");
return (T) getOrBuild(serviceClass);
}
public final synchronized <T> boolean isCreated(Class<T> serviceClass) {
Intrinsics.checkNotNullParameter(serviceClass, "serviceClass");
return this.cache.containsKey(getServiceClass(serviceClass));
}
/* JADX INFO: Access modifiers changed from: private */
public final <T> T getOrBuild(Class<T> cls) {
Class<?> serviceClass = getServiceClass(cls);
T t = (T) this.cache.get(serviceClass);
if (t != null) {
return t;
}
Creator<?> creator = this.creators.get(serviceClass);
if (creator == null) {
throw new IllegalArgumentException("Unknown class");
}
T t2 = (T) creator.create();
if (creator.isSingleton()) {
this.cache.put(serviceClass, t2);
}
return t2;
}
@VisibleForTesting
public final <T> void bindService$vungle_ads_release(Class<?> serviceClass, T t) {
Intrinsics.checkNotNullParameter(serviceClass, "serviceClass");
this.cache.put(serviceClass, t);
}
private final Class<?> getServiceClass(Class<?> cls) {
for (Class<?> cls2 : this.creators.keySet()) {
if (cls2.isAssignableFrom(cls)) {
return cls2;
}
}
throw new IllegalArgumentException("Unknown dependency for " + cls);
}
private final void buildCreators() {
this.creators.put(JobCreator.class, new Creator<JobCreator>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$1
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public JobCreator create() {
Context context;
Object orBuild;
context = ServiceLocator.this.ctx;
orBuild = ServiceLocator.this.getOrBuild(PathProvider.class);
return new VungleJobCreator(context, (PathProvider) orBuild);
}
});
this.creators.put(JobRunner.class, new Creator<JobRunner>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$2
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public JobRunner create() {
Object orBuild;
Object orBuild2;
orBuild = ServiceLocator.this.getOrBuild(JobCreator.class);
orBuild2 = ServiceLocator.this.getOrBuild(Executors.class);
return new VungleJobRunner((JobCreator) orBuild, ((Executors) orBuild2).getJobExecutor(), new JobRunnerThreadPriorityHelper());
}
});
this.creators.put(VungleApiClient.class, new Creator<VungleApiClient>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$3
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public VungleApiClient create() {
Context context;
Object orBuild;
Object orBuild2;
context = ServiceLocator.this.ctx;
orBuild = ServiceLocator.this.getOrBuild(Platform.class);
orBuild2 = ServiceLocator.this.getOrBuild(FilePreferences.class);
return new VungleApiClient(context, (Platform) orBuild, (FilePreferences) orBuild2);
}
});
this.creators.put(Platform.class, new Creator<Platform>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$4
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public Platform create() {
Object orBuild;
Context context;
orBuild = ServiceLocator.this.getOrBuild(Executors.class);
context = ServiceLocator.this.ctx;
return new AndroidPlatform(context, ((Executors) orBuild).getUaExecutor());
}
});
this.creators.put(Executors.class, new Creator<Executors>(this) { // from class: com.vungle.ads.ServiceLocator$buildCreators$5
{
super(this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public Executors create() {
return new SDKExecutors();
}
});
this.creators.put(OMInjector.class, new Creator<OMInjector>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$6
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public OMInjector create() {
Context context;
context = ServiceLocator.this.ctx;
return new OMInjector(context);
}
});
this.creators.put(OMTracker.Factory.class, new Creator<OMTracker.Factory>(this) { // from class: com.vungle.ads.ServiceLocator$buildCreators$7
{
super(this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public OMTracker.Factory create() {
return new OMTracker.Factory();
}
});
this.creators.put(FilePreferences.class, new Creator<FilePreferences>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$8
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public FilePreferences create() {
Object orBuild;
Object orBuild2;
FilePreferences.Companion companion = FilePreferences.Companion;
orBuild = ServiceLocator.this.getOrBuild(Executors.class);
VungleThreadPoolExecutor ioExecutor = ((Executors) orBuild).getIoExecutor();
orBuild2 = ServiceLocator.this.getOrBuild(PathProvider.class);
return FilePreferences.Companion.get$default(companion, ioExecutor, (PathProvider) orBuild2, null, 4, null);
}
});
this.creators.put(LocaleInfo.class, new Creator<LocaleInfo>(this) { // from class: com.vungle.ads.ServiceLocator$buildCreators$9
{
super(this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public LocaleInfo create() {
return new SystemLocaleInfo();
}
});
this.creators.put(BidTokenEncoder.class, new Creator<BidTokenEncoder>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$10
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public BidTokenEncoder create() {
Context context;
context = ServiceLocator.this.ctx;
return new BidTokenEncoder(context);
}
});
this.creators.put(PathProvider.class, new Creator<PathProvider>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$11
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public PathProvider create() {
Context context;
context = ServiceLocator.this.ctx;
return new PathProvider(context);
}
});
this.creators.put(Downloader.class, new Creator<Downloader>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$12
{
super(false);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public Downloader create() {
Object orBuild;
Object orBuild2;
orBuild = ServiceLocator.this.getOrBuild(Executors.class);
VungleThreadPoolExecutor downloaderExecutor = ((Executors) orBuild).getDownloaderExecutor();
orBuild2 = ServiceLocator.this.getOrBuild(PathProvider.class);
return new AssetDownloader(downloaderExecutor, (PathProvider) orBuild2);
}
});
this.creators.put(ConcurrencyTimeoutProvider.class, new Creator<ConcurrencyTimeoutProvider>(this) { // from class: com.vungle.ads.ServiceLocator$buildCreators$13
{
super(this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public ConcurrencyTimeoutProvider create() {
return new ConcurrencyTimeoutProvider();
}
});
this.creators.put(SignalManager.class, new Creator<SignalManager>() { // from class: com.vungle.ads.ServiceLocator$buildCreators$14
{
super(ServiceLocator.this, false, 1, null);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // com.vungle.ads.ServiceLocator.Creator
public SignalManager create() {
Context context;
context = ServiceLocator.this.ctx;
return new SignalManager(context);
}
});
}
public abstract class Creator<T> {
private final boolean isSingleton;
public abstract T create();
public final boolean isSingleton() {
return this.isSingleton;
}
public Creator(boolean z) {
this.isSingleton = z;
}
public /* synthetic */ Creator(ServiceLocator serviceLocator, boolean z, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? true : z);
}
}
@Keep
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@VisibleForTesting
public static /* synthetic */ void getINSTANCE$vungle_ads_release$annotations() {
}
private Companion() {
}
public final ServiceLocator getINSTANCE$vungle_ads_release() {
return ServiceLocator.INSTANCE;
}
public final void setINSTANCE$vungle_ads_release(ServiceLocator serviceLocator) {
ServiceLocator.INSTANCE = serviceLocator;
}
public final ServiceLocator getInstance(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
ServiceLocator iNSTANCE$vungle_ads_release = getINSTANCE$vungle_ads_release();
if (iNSTANCE$vungle_ads_release == null) {
synchronized (this) {
Companion companion = ServiceLocator.Companion;
ServiceLocator iNSTANCE$vungle_ads_release2 = companion.getINSTANCE$vungle_ads_release();
if (iNSTANCE$vungle_ads_release2 == null) {
iNSTANCE$vungle_ads_release2 = new ServiceLocator(context, null);
companion.setINSTANCE$vungle_ads_release(iNSTANCE$vungle_ads_release2);
}
iNSTANCE$vungle_ads_release = iNSTANCE$vungle_ads_release2;
}
}
return iNSTANCE$vungle_ads_release;
}
public final /* synthetic */ <T> Lazy inject(final Context context) {
Lazy lazy;
Intrinsics.checkNotNullParameter(context, "context");
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
Intrinsics.needClassReification();
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.ServiceLocator$Companion$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: [T, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final T invoke() {
ServiceLocator companion = ServiceLocator.Companion.getInstance(context);
Intrinsics.reifiedOperationMarker(4, RequestConfiguration.MAX_AD_CONTENT_RATING_T);
return companion.getService(Object.class);
}
});
return lazy;
}
public final synchronized void deInit() {
setINSTANCE$vungle_ads_release(null);
}
}
}

View File

@@ -0,0 +1,42 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class SingleValueMetric extends Metric {
private Long value;
/* renamed from: getValue, reason: collision with other method in class */
public final Long m3825getValue() {
return this.value;
}
public final void setValue(Long l) {
this.value = l;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SingleValueMetric(Sdk.SDKMetric.SDKMetricType metricType) {
super(metricType);
Intrinsics.checkNotNullParameter(metricType, "metricType");
}
public final void markTime() {
this.value = Long.valueOf(System.currentTimeMillis());
}
public final void addValue(long j) {
Long l = this.value;
this.value = Long.valueOf((l != null ? l.longValue() : 0L) + j);
}
@Override // com.vungle.ads.Metric
public long getValue() {
Long l = this.value;
if (l != null) {
return l.longValue();
}
return 0L;
}
}

View File

@@ -0,0 +1,41 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public class TimeIntervalMetric extends DualValueMetric {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TimeIntervalMetric(Sdk.SDKMetric.SDKMetricType metricType) {
super(metricType);
Intrinsics.checkNotNullParameter(metricType, "metricType");
}
public void markStart() {
setValueFirst(Long.valueOf(getCurrentTime()));
}
public void markEnd() {
setValueSecond(Long.valueOf(getCurrentTime()));
}
public final long calculateIntervalDuration() {
long currentTime = getCurrentTime();
Long valueSecond = getValueSecond();
long longValue = valueSecond != null ? valueSecond.longValue() : currentTime;
Long valueFirst = getValueFirst();
if (valueFirst != null) {
currentTime = valueFirst.longValue();
}
return longValue - currentTime;
}
private final long getCurrentTime() {
return System.currentTimeMillis();
}
@Override // com.vungle.ads.Metric
public long getValue() {
return calculateIntervalDuration();
}
}

View File

@@ -0,0 +1,13 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class TpatRetryFailure extends VungleError {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public TpatRetryFailure(String url) {
super(137, Sdk.SDKError.Reason.TPAT_RETRY_FAILED, "Pinging Tpat did not succeed during all allowed reries. Failed url is " + url, null, null, null, 56, null);
Intrinsics.checkNotNullParameter(url, "url");
}
}

View File

@@ -0,0 +1,10 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes4.dex */
public final class UnknownConfigurationError extends VungleError {
public UnknownConfigurationError() {
super(0, Sdk.SDKError.Reason.UNKNOWN_ERROR, "Config: Unknown Error", null, null, null, 56, null);
}
}

View File

@@ -0,0 +1,13 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class UnknownExceptionCode extends VungleError {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public UnknownExceptionCode(String errorMessage) {
super(Integer.valueOf(VungleError.UNKNOWN_EXCEPTION_CODE), Sdk.SDKError.Reason.UNKNOWN_ERROR, errorMessage, null, null, null, 56, null);
Intrinsics.checkNotNullParameter(errorMessage, "errorMessage");
}
}

View File

@@ -0,0 +1,157 @@
package com.vungle.ads;
import android.content.Context;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.util.ViewUtility;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public final class VungleAdSize {
private final int height;
private boolean isAdaptiveHeight;
private boolean isAdaptiveWidth;
private final int width;
public static final Companion Companion = new Companion(null);
public static final VungleAdSize BANNER = new VungleAdSize(Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 50);
public static final VungleAdSize BANNER_SHORT = new VungleAdSize(300, 50);
public static final VungleAdSize BANNER_LEADERBOARD = new VungleAdSize(728, 90);
public static final VungleAdSize MREC = new VungleAdSize(300, 250);
public static final VungleAdSize getAdSizeWithWidth(Context context, int i) {
return Companion.getAdSizeWithWidth(context, i);
}
public static final VungleAdSize getAdSizeWithWidthAndHeight(int i, int i2) {
return Companion.getAdSizeWithWidthAndHeight(i, i2);
}
public static final VungleAdSize getAdSizeWithWidthAndMaxHeight(int i, int i2) {
return Companion.getAdSizeWithWidthAndMaxHeight(i, i2);
}
public static final VungleAdSize getValidAdSizeFromSize(int i, int i2, String str) {
return Companion.getValidAdSizeFromSize(i, i2, str);
}
public final int getHeight() {
return this.height;
}
public final int getWidth() {
return this.width;
}
public final boolean isAdaptiveHeight$vungle_ads_release() {
return this.isAdaptiveHeight;
}
public final boolean isAdaptiveWidth$vungle_ads_release() {
return this.isAdaptiveWidth;
}
public final boolean isValidSize$vungle_ads_release() {
return this.width >= 0 && this.height >= 0;
}
public final void setAdaptiveHeight$vungle_ads_release(boolean z) {
this.isAdaptiveHeight = z;
}
public final void setAdaptiveWidth$vungle_ads_release(boolean z) {
this.isAdaptiveWidth = z;
}
public VungleAdSize(int i, int i2) {
this.width = i;
this.height = i2;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final VungleAdSize getAdSizeWithWidth(Context context, int i) {
Intrinsics.checkNotNullParameter(context, "context");
int intValue = ((Number) ViewUtility.INSTANCE.getDeviceWidthAndHeightWithOrientation(context, 0).component2()).intValue();
if (i < 0) {
i = 0;
}
VungleAdSize vungleAdSize = new VungleAdSize(i, intValue);
if (vungleAdSize.getWidth() == 0) {
vungleAdSize.setAdaptiveWidth$vungle_ads_release(true);
}
vungleAdSize.setAdaptiveHeight$vungle_ads_release(true);
return vungleAdSize;
}
public final VungleAdSize getAdSizeWithWidthAndMaxHeight(int i, int i2) {
if (i < 0) {
i = 0;
}
if (i2 < 0) {
i2 = 0;
}
VungleAdSize vungleAdSize = new VungleAdSize(i, i2);
if (vungleAdSize.getWidth() == 0) {
vungleAdSize.setAdaptiveWidth$vungle_ads_release(true);
}
vungleAdSize.setAdaptiveHeight$vungle_ads_release(true);
return vungleAdSize;
}
public final VungleAdSize getAdSizeWithWidthAndHeight(int i, int i2) {
if (i < 0) {
i = 0;
}
if (i2 < 0) {
i2 = 0;
}
VungleAdSize vungleAdSize = new VungleAdSize(i, i2);
if (vungleAdSize.getWidth() == 0) {
vungleAdSize.setAdaptiveWidth$vungle_ads_release(true);
}
if (vungleAdSize.getHeight() == 0) {
vungleAdSize.setAdaptiveHeight$vungle_ads_release(true);
}
return vungleAdSize;
}
public final VungleAdSize getValidAdSizeFromSize(int i, int i2, String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
Placement placement = ConfigManager.INSTANCE.getPlacement(placementId);
if (placement != null) {
if (!placement.isInline()) {
placement = null;
}
if (placement != null) {
return VungleAdSize.Companion.getAdSizeWithWidthAndHeight(i, i2);
}
}
VungleAdSize vungleAdSize = VungleAdSize.MREC;
if (i >= vungleAdSize.getWidth() && i2 >= vungleAdSize.getHeight()) {
return vungleAdSize;
}
VungleAdSize vungleAdSize2 = VungleAdSize.BANNER_LEADERBOARD;
if (i >= vungleAdSize2.getWidth() && i2 >= vungleAdSize2.getHeight()) {
return vungleAdSize2;
}
VungleAdSize vungleAdSize3 = VungleAdSize.BANNER;
if (i >= vungleAdSize3.getWidth() && i2 >= vungleAdSize3.getHeight()) {
return vungleAdSize3;
}
VungleAdSize vungleAdSize4 = VungleAdSize.BANNER_SHORT;
return (i < vungleAdSize4.getWidth() || i2 < vungleAdSize4.getHeight()) ? getAdSizeWithWidthAndHeight(i, i2) : vungleAdSize4;
}
}
public String toString() {
return "VungleAdSize(width=" + this.width + ", height=" + this.height + ')';
}
}

View File

@@ -0,0 +1,147 @@
package com.vungle.ads;
import android.app.Application;
import android.content.Context;
import androidx.annotation.Keep;
import com.vungle.ads.fpd.FirstPartyData;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.VungleInitializer;
import com.vungle.ads.internal.VungleInternal;
import com.vungle.ads.internal.model.Placement;
import com.vungle.ads.internal.network.VungleApiClient;
import com.vungle.ads.internal.util.Logger;
import java.util.HashSet;
import java.util.List;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsKt;
/* loaded from: classes4.dex */
public final class VungleAds {
public static final String TAG = "VungleAds";
public static final Companion Companion = new Companion(null);
private static VungleInternal vungleInternal = new VungleInternal();
private static VungleInitializer initializer = new VungleInitializer();
public static final FirstPartyData firstPartyData = new FirstPartyData();
@Keep
public enum WrapperFramework {
admob,
air,
cocos2dx,
corona,
dfp,
heyzap,
marmalade,
mopub,
unity,
fyber,
ironsource,
upsight,
appodeal,
aerserv,
adtoapp,
tapdaq,
vunglehbs,
max,
none
}
public static final String getBiddingToken(Context context) {
return Companion.getBiddingToken(context);
}
public static final String getSdkVersion() {
return Companion.getSdkVersion();
}
public static final void init(Context context, String str, InitializationListener initializationListener) {
Companion.init(context, str, initializationListener);
}
public static final boolean isInitialized() {
return Companion.isInitialized();
}
public static final boolean isInline(String str) {
return Companion.isInline(str);
}
public static final void setIntegrationName(WrapperFramework wrapperFramework, String str) {
Companion.setIntegrationName(wrapperFramework, str);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final void init(Context appContext, String appId, InitializationListener callback) {
Intrinsics.checkNotNullParameter(appContext, "context");
Intrinsics.checkNotNullParameter(appId, "appId");
Intrinsics.checkNotNullParameter(callback, "callback");
if (!(appContext instanceof Application)) {
appContext = appContext.getApplicationContext();
}
VungleInitializer vungleInitializer = VungleAds.initializer;
Intrinsics.checkNotNullExpressionValue(appContext, "appContext");
vungleInitializer.init(appId, appContext, callback);
}
public final boolean isInitialized() {
return VungleAds.initializer.isInitialized();
}
public final String getBiddingToken(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
return VungleAds.vungleInternal.getAvailableBidTokens(context);
}
public final String getSdkVersion() {
return VungleAds.vungleInternal.getSdkVersion();
}
public final boolean isInline(String placementId) {
Intrinsics.checkNotNullParameter(placementId, "placementId");
Placement placement = ConfigManager.INSTANCE.getPlacement(placementId);
if (placement != null) {
return placement.isInline();
}
return false;
}
public final void setIntegrationName(WrapperFramework wrapperFramework, String wrapperFrameworkVersion) {
String str;
List split$default;
Intrinsics.checkNotNullParameter(wrapperFramework, "wrapperFramework");
Intrinsics.checkNotNullParameter(wrapperFrameworkVersion, "wrapperFrameworkVersion");
if (wrapperFramework != WrapperFramework.none) {
VungleApiClient.Companion companion = VungleApiClient.Companion;
companion.setWRAPPER_FRAMEWORK_SELECTED$vungle_ads_release(wrapperFramework);
String headerUa = companion.getHeaderUa();
if (wrapperFrameworkVersion.length() > 0) {
str = '/' + wrapperFrameworkVersion;
} else {
str = "";
}
String str2 = wrapperFramework + str;
split$default = StringsKt__StringsKt.split$default((CharSequence) headerUa, new String[]{";"}, false, 0, 6, (Object) null);
if (new HashSet(split$default).add(str2)) {
companion.setHeaderUa(headerUa + ';' + str2);
}
} else {
Logger.Companion.e(VungleAds.TAG, "Wrapper is null or is none");
}
if (isInitialized()) {
Logger.Companion.w(VungleAds.TAG, "VUNGLE WARNING: SDK already initialized, you should've set wrapper info before");
}
}
public final void deInit$vungle_ads_release() {
VungleAds.initializer.deInit$vungle_ads_release();
}
}
}

View File

@@ -0,0 +1,491 @@
package com.vungle.ads;
import android.content.Context;
import android.content.IntentFilter;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.RelativeLayout;
import com.vungle.ads.ServiceLocator;
import com.vungle.ads.internal.AdInternal;
import com.vungle.ads.internal.BannerAdImpl;
import com.vungle.ads.internal.ConfigManager;
import com.vungle.ads.internal.ImpressionTracker;
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.omsdk.OMTracker;
import com.vungle.ads.internal.platform.Platform;
import com.vungle.ads.internal.presenter.AdEventListener;
import com.vungle.ads.internal.presenter.AdPlayCallbackWrapper;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
import com.vungle.ads.internal.protos.Sdk;
import com.vungle.ads.internal.ui.VungleWebClient;
import com.vungle.ads.internal.ui.WatermarkView;
import com.vungle.ads.internal.ui.view.MRAIDAdWidget;
import com.vungle.ads.internal.util.Logger;
import com.vungle.ads.internal.util.RingerModeReceiver;
import com.vungle.ads.internal.util.ViewUtility;
import java.util.concurrent.atomic.AtomicBoolean;
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;
/* loaded from: classes4.dex */
public final class VungleBannerView extends RelativeLayout {
public static final Companion Companion = new Companion(null);
private static final String TAG = "VungleBannerView";
private BannerAdListener adListener;
private final VungleAdSize adSize;
private final BannerAdImpl adViewImpl;
private MRAIDAdWidget adWidget;
private int calculatedPixelHeight;
private int calculatedPixelWidth;
private final AtomicBoolean destroyed;
private WatermarkView imageView;
private final Lazy impressionTracker$delegate;
private final AtomicBoolean isAdAttachedToWindow;
private final AtomicBoolean isAdDownloaded;
private boolean isOnImpressionCalled;
private final String placementId;
private MRAIDPresenter presenter;
private final AtomicBoolean presenterStarted;
private final RingerModeReceiver ringerModeReceiver;
public final BannerAdListener getAdListener() {
return this.adListener;
}
public final VungleAdSize getAdSize() {
return this.adSize;
}
public final String getPlacementId() {
return this.placementId;
}
public final void setAdListener(BannerAdListener bannerAdListener) {
this.adListener = bannerAdListener;
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public VungleBannerView(final Context context, String placementId, VungleAdSize adSize) {
super(context);
Lazy lazy;
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(placementId, "placementId");
Intrinsics.checkNotNullParameter(adSize, "adSize");
this.placementId = placementId;
this.adSize = adSize;
this.ringerModeReceiver = new RingerModeReceiver();
BannerAdImpl bannerAdImpl = new BannerAdImpl(context, placementId, adSize, new AdConfig());
this.adViewImpl = bannerAdImpl;
this.destroyed = new AtomicBoolean(false);
this.presenterStarted = new AtomicBoolean(false);
this.isAdDownloaded = new AtomicBoolean(false);
this.isAdAttachedToWindow = new AtomicBoolean(false);
lazy = LazyKt__LazyJVMKt.lazy(new Function0() { // from class: com.vungle.ads.VungleBannerView$impressionTracker$2
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final ImpressionTracker invoke() {
return new ImpressionTracker(context);
}
});
this.impressionTracker$delegate = lazy;
bannerAdImpl.setAdListener(new BannerAdListener() { // from class: com.vungle.ads.VungleBannerView.1
@Override // com.vungle.ads.BaseAdListener
public void onAdLoaded(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
VungleBannerView.this.onBannerAdLoaded(baseAd);
}
@Override // com.vungle.ads.BaseAdListener
public void onAdStart(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdStart(baseAd);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdImpression(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdImpression(baseAd);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdEnd(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdEnd(baseAd);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdClicked(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdClicked(baseAd);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdLeftApplication(BaseAd baseAd) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdLeftApplication(baseAd);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdFailedToLoad(BaseAd baseAd, VungleError adError) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
Intrinsics.checkNotNullParameter(adError, "adError");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdFailedToLoad(baseAd, adError);
}
}
@Override // com.vungle.ads.BaseAdListener
public void onAdFailedToPlay(BaseAd baseAd, VungleError adError) {
Intrinsics.checkNotNullParameter(baseAd, "baseAd");
Intrinsics.checkNotNullParameter(adError, "adError");
BannerAdListener adListener = VungleBannerView.this.getAdListener();
if (adListener != null) {
adListener.onAdFailedToPlay(baseAd, adError);
}
}
});
}
public final AdConfig getAdConfig() {
return this.adViewImpl.getAdConfig();
}
public final String getCreativeId() {
return this.adViewImpl.getCreativeId();
}
public final String getEventId() {
return this.adViewImpl.getEventId();
}
private final ImpressionTracker getImpressionTracker() {
return (ImpressionTracker) this.impressionTracker$delegate.getValue();
}
public final VungleAdSize getAdViewSize() {
return this.adViewImpl.getAdViewSize();
}
public static /* synthetic */ void load$default(VungleBannerView vungleBannerView, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
vungleBannerView.load(str);
}
public final void load(String str) {
this.adViewImpl.load(str);
}
public final void finishAd() {
finishAdInternal(true);
}
@Override // android.view.View
public void onWindowVisibilityChanged(int i) {
super.onWindowVisibilityChanged(i);
setAdVisibility(i == 0);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
Logger.Companion companion = Logger.Companion;
companion.d(TAG, "onAttachedToWindow(): " + hashCode());
this.isAdAttachedToWindow.set(true);
if (this.adViewImpl.getAdInternal$vungle_ads_release().getPlacement() != null) {
getContext().registerReceiver(this.ringerModeReceiver, new IntentFilter("android.media.RINGER_MODE_CHANGED"));
companion.d(TAG, "registerReceiver(): " + this.ringerModeReceiver.hashCode());
}
renderAd();
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
Logger.Companion.d(TAG, "onDetachedFromWindow(): " + hashCode());
this.isAdAttachedToWindow.set(false);
if (this.adViewImpl.getAdInternal$vungle_ads_release().getPlacement() != null) {
getContext().unregisterReceiver(this.ringerModeReceiver);
}
}
private final void setAdVisibility(boolean z) {
MRAIDPresenter mRAIDPresenter;
if (!this.isOnImpressionCalled || this.destroyed.get() || (mRAIDPresenter = this.presenter) == null) {
return;
}
mRAIDPresenter.setAdVisibility(z);
}
private final void checkHardwareAcceleration() {
Logger.Companion.w(TAG, "hardwareAccelerated = " + isHardwareAccelerated());
if (isHardwareAccelerated()) {
return;
}
AnalyticsClient.INSTANCE.logMetric$vungle_ads_release(Sdk.SDKMetric.SDKMetricType.HARDWARE_ACCELERATE_DISABLED, (r15 & 2) != 0 ? 0L : 0L, (r15 & 4) != 0 ? null : this.placementId, (r15 & 8) != 0 ? null : getCreativeId(), (r15 & 16) != 0 ? null : getEventId(), (r15 & 32) == 0 ? null : null);
}
/* JADX INFO: Access modifiers changed from: private */
public final void finishAdInternal(boolean z) {
if (this.destroyed.get()) {
return;
}
this.destroyed.set(true);
int i = (z ? 4 : 0) | 2;
MRAIDPresenter mRAIDPresenter = this.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.stop();
}
MRAIDPresenter mRAIDPresenter2 = this.presenter;
if (mRAIDPresenter2 != null) {
mRAIDPresenter2.detach(i);
}
getImpressionTracker().destroy();
try {
ViewParent parent = getParent();
if (parent != null && (parent instanceof ViewGroup)) {
((ViewGroup) parent).removeView(this);
}
removeAllViews();
} catch (Exception e) {
Logger.Companion.d(TAG, "Removing webView error: " + e);
}
}
private final void renderAd() {
if (!this.isAdDownloaded.get() || !this.isAdAttachedToWindow.get() || this.destroyed.get()) {
Logger.Companion.d(TAG, "renderAd() - not ready");
return;
}
if (!this.presenterStarted.getAndSet(true)) {
MRAIDPresenter mRAIDPresenter = this.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.prepare();
}
getImpressionTracker().addView(this, new ImpressionTracker.ImpressionListener() { // from class: com.vungle.ads.VungleBannerView$$ExternalSyntheticLambda0
@Override // com.vungle.ads.internal.ImpressionTracker.ImpressionListener
public final void onImpression(View view) {
VungleBannerView.m3826renderAd$lambda1(VungleBannerView.this, view);
}
});
}
MRAIDAdWidget mRAIDAdWidget = this.adWidget;
if (mRAIDAdWidget != null) {
if (!Intrinsics.areEqual(mRAIDAdWidget != null ? mRAIDAdWidget.getParent() : null, this)) {
addView(this.adWidget, this.calculatedPixelWidth, this.calculatedPixelHeight);
WatermarkView watermarkView = this.imageView;
if (watermarkView != null) {
addView(watermarkView, this.calculatedPixelWidth, this.calculatedPixelHeight);
WatermarkView watermarkView2 = this.imageView;
if (watermarkView2 != null) {
watermarkView2.bringToFront();
}
}
}
}
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams != null) {
layoutParams.height = this.calculatedPixelHeight;
layoutParams.width = this.calculatedPixelWidth;
requestLayout();
}
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: renderAd$lambda-1, reason: not valid java name */
public static final void m3826renderAd$lambda1(VungleBannerView this$0, View view) {
Intrinsics.checkNotNullParameter(this$0, "this$0");
Logger.Companion.d(TAG, "ImpressionTracker checked the banner view become visible.");
this$0.isOnImpressionCalled = true;
this$0.checkHardwareAcceleration();
MRAIDPresenter mRAIDPresenter = this$0.presenter;
if (mRAIDPresenter != null) {
mRAIDPresenter.start();
}
}
/* JADX INFO: Access modifiers changed from: private */
public final void onBannerAdLoaded(BaseAd baseAd) {
AnalyticsClient analyticsClient = AnalyticsClient.INSTANCE;
analyticsClient.logMetric$vungle_ads_release(new SingleValueMetric(Sdk.SDKMetric.SDKMetricType.PLAY_AD_API), (r13 & 2) != 0 ? null : this.placementId, (r13 & 4) != 0 ? null : getCreativeId(), (r13 & 8) != 0 ? null : getEventId(), (r13 & 16) != 0 ? null : null);
VungleError canPlayAd = this.adViewImpl.getAdInternal$vungle_ads_release().canPlayAd(true);
if (canPlayAd != null) {
if (this.adViewImpl.getAdInternal$vungle_ads_release().isErrorTerminal$vungle_ads_release(canPlayAd.getCode())) {
this.adViewImpl.getAdInternal$vungle_ads_release().setAdState(AdInternal.AdState.ERROR);
}
BannerAdListener bannerAdListener = this.adListener;
if (bannerAdListener != null) {
bannerAdListener.onAdFailedToPlay(baseAd, canPlayAd);
return;
}
return;
}
AdPayload advertisement = this.adViewImpl.getAdInternal$vungle_ads_release().getAdvertisement();
Placement placement = this.adViewImpl.getAdInternal$vungle_ads_release().getPlacement();
if (advertisement == null || placement == null) {
BannerAdListener bannerAdListener2 = this.adListener;
if (bannerAdListener2 != null) {
bannerAdListener2.onAdFailedToPlay(baseAd, new InternalError(VungleError.AD_UNABLE_TO_PLAY, null, 2, null));
return;
}
return;
}
this.adViewImpl.getAdInternal$vungle_ads_release().cancelDownload$vungle_ads_release();
willPresentAdView(advertisement, placement, getAdViewSize());
this.adViewImpl.getResponseToShowMetric$vungle_ads_release().markEnd();
AnalyticsClient.logMetric$vungle_ads_release$default(analyticsClient, this.adViewImpl.getResponseToShowMetric$vungle_ads_release(), this.placementId, getCreativeId(), getEventId(), (String) null, 16, (Object) null);
this.adViewImpl.getShowToPresentMetric$vungle_ads_release().markStart();
this.adViewImpl.getShowToFailMetric$vungle_ads_release().markStart();
this.isAdDownloaded.set(true);
BannerAdListener bannerAdListener3 = this.adListener;
if (bannerAdListener3 != null) {
bannerAdListener3.onAdLoaded(baseAd);
}
renderAd();
}
private final void willPresentAdView(AdPayload adPayload, Placement placement, VungleAdSize vungleAdSize) {
Lazy lazy;
Lazy lazy2;
Lazy lazy3;
ViewUtility viewUtility = ViewUtility.INSTANCE;
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "context");
this.calculatedPixelHeight = viewUtility.dpToPixels(context, vungleAdSize.getHeight());
Context context2 = getContext();
Intrinsics.checkNotNullExpressionValue(context2, "context");
this.calculatedPixelWidth = viewUtility.dpToPixels(context2, vungleAdSize.getWidth());
final AdPlayCallbackWrapper adPlayCallback$vungle_ads_release = this.adViewImpl.getAdPlayCallback$vungle_ads_release();
final Placement placement2 = this.adViewImpl.getAdInternal$vungle_ads_release().getPlacement();
AdEventListener adEventListener = new AdEventListener(adPlayCallback$vungle_ads_release, placement2) { // from class: com.vungle.ads.VungleBannerView$willPresentAdView$adEventListener$1
};
try {
Context context3 = getContext();
Intrinsics.checkNotNullExpressionValue(context3, "context");
MRAIDAdWidget mRAIDAdWidget = new MRAIDAdWidget(context3);
this.adWidget = mRAIDAdWidget;
mRAIDAdWidget.setCloseDelegate(new MRAIDAdWidget.CloseDelegate() { // from class: com.vungle.ads.VungleBannerView$willPresentAdView$2
@Override // com.vungle.ads.internal.ui.view.MRAIDAdWidget.CloseDelegate
public void close() {
VungleBannerView.this.finishAdInternal(false);
}
});
ServiceLocator.Companion companion = ServiceLocator.Companion;
final Context context4 = getContext();
Intrinsics.checkNotNullExpressionValue(context4, "context");
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.SYNCHRONIZED;
lazy = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.VungleBannerView$willPresentAdView$$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.Executors, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Executors invoke() {
return ServiceLocator.Companion.getInstance(context4).getService(Executors.class);
}
});
final Context context5 = getContext();
Intrinsics.checkNotNullExpressionValue(context5, "context");
lazy2 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.VungleBannerView$willPresentAdView$$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.OMTracker$Factory, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final OMTracker.Factory invoke() {
return ServiceLocator.Companion.getInstance(context5).getService(OMTracker.Factory.class);
}
});
OMTracker make = m3828willPresentAdView$lambda4(lazy2).make(ConfigManager.INSTANCE.omEnabled() && adPayload.omEnabled());
final Context context6 = getContext();
Intrinsics.checkNotNullExpressionValue(context6, "context");
lazy3 = LazyKt__LazyJVMKt.lazy(lazyThreadSafetyMode, new Function0() { // from class: com.vungle.ads.VungleBannerView$willPresentAdView$$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.platform.Platform, java.lang.Object] */
@Override // kotlin.jvm.functions.Function0
public final Platform invoke() {
return ServiceLocator.Companion.getInstance(context6).getService(Platform.class);
}
});
VungleWebClient vungleWebClient = new VungleWebClient(adPayload, placement, m3827willPresentAdView$lambda3(lazy).getOffloadExecutor(), null, m3829willPresentAdView$lambda5(lazy3), 8, null);
this.ringerModeReceiver.setWebClient(vungleWebClient);
vungleWebClient.setWebViewObserver(make);
MRAIDPresenter mRAIDPresenter = new MRAIDPresenter(mRAIDAdWidget, adPayload, placement, vungleWebClient, m3827willPresentAdView$lambda3(lazy).getJobExecutor(), make, this.adViewImpl.getAdInternal$vungle_ads_release().getBidPayload(), m3829willPresentAdView$lambda5(lazy3));
mRAIDPresenter.setEventListener(adEventListener);
this.presenter = mRAIDPresenter;
String watermark$vungle_ads_release = getAdConfig().getWatermark$vungle_ads_release();
if (watermark$vungle_ads_release != null) {
Context context7 = getContext();
Intrinsics.checkNotNullExpressionValue(context7, "context");
this.imageView = new WatermarkView(context7, watermark$vungle_ads_release);
}
} catch (InstantiationException e) {
AdCantPlayWithoutWebView adCantPlayWithoutWebView = new AdCantPlayWithoutWebView();
adCantPlayWithoutWebView.setPlacementId$vungle_ads_release(adCantPlayWithoutWebView.getPlacementId());
adCantPlayWithoutWebView.setEventId$vungle_ads_release(adCantPlayWithoutWebView.getEventId());
adCantPlayWithoutWebView.setCreativeId$vungle_ads_release(adCantPlayWithoutWebView.getCreativeId());
adEventListener.onError(adCantPlayWithoutWebView.logError$vungle_ads_release(), this.placementId);
throw e;
}
}
/* renamed from: willPresentAdView$lambda-3, reason: not valid java name */
private static final Executors m3827willPresentAdView$lambda3(Lazy lazy) {
return (Executors) lazy.getValue();
}
/* renamed from: willPresentAdView$lambda-4, reason: not valid java name */
private static final OMTracker.Factory m3828willPresentAdView$lambda4(Lazy lazy) {
return (OMTracker.Factory) lazy.getValue();
}
/* renamed from: willPresentAdView$lambda-5, reason: not valid java name */
private static final Platform m3829willPresentAdView$lambda5(Lazy lazy) {
return (Platform) lazy.getValue();
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,348 @@
package com.vungle.ads;
import com.vungle.ads.internal.protos.Sdk;
import java.util.HashMap;
import java.util.Map;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes4.dex */
public abstract class VungleError extends Exception {
public static final int AD_ALREADY_FAILED = 206;
public static final int AD_ALREADY_LOADED = 204;
public static final int AD_CLOSED_MISSING_HEARTBEAT = 318;
public static final int AD_CLOSED_TEMPLATE_ERROR = 317;
public static final int AD_CONSUMED = 202;
public static final int AD_EXPIRED = 304;
public static final int AD_EXPIRED_ON_PLAY = 307;
public static final int AD_FAILED_TO_DOWNLOAD = 10011;
public static final int AD_HTML_FAILED_TO_LOAD = 310;
public static final int AD_IS_LOADING = 203;
public static final int AD_IS_PLAYING = 205;
public static final int AD_LOAD_FAIL_RETRY_AFTER = 221;
public static final int AD_MARKUP_INVALID = 10040;
public static final int AD_NOT_LOADED = 210;
public static final int AD_RENDER_NETWORK_ERROR = 10038;
public static final int AD_RESPONSE_EMPTY = 215;
public static final int AD_RESPONSE_INVALID_TEMPLATE_TYPE = 216;
public static final int AD_RESPONSE_RETRY_AFTER = 220;
public static final int AD_RESPONSE_TIMED_OUT = 217;
public static final int AD_UNABLE_TO_PLAY = 10010;
public static final int AD_WIN_NOTIFICATION_ERROR = 308;
public static final int ALREADY_INITIALIZED = 4;
public static final int ALREADY_PLAYING_ANOTHER_AD = 10015;
public static final int API_FAILED_STATUS_CODE = 104;
public static final int API_REQUEST_ERROR = 101;
public static final int API_RESPONSE_DATA_ERROR = 102;
public static final int API_RESPONSE_DECODE_ERROR = 103;
public static final int ASSET_DOWNLOAD_ERROR = 10024;
public static final int ASSET_FAILED_INSUFFICIENT_SPACE = 126;
public static final int ASSET_FAILED_MAX_SPACE_EXCEEDED = 127;
public static final int ASSET_FAILED_STATUS_CODE = 117;
public static final int ASSET_FAILED_TO_DELETE = 309;
public static final int ASSET_REQUEST_ERROR = 112;
public static final int ASSET_RESPONSE_DATA_ERROR = 113;
public static final int ASSET_WRITE_ERROR = 114;
public static final int BANNER_VIEW_INVALID_SIZE = 500;
public static final int CONCURRENT_PLAYBACK_UNSUPPORTED = 400;
public static final int CONFIGURATION_ERROR = 10003;
public static final int CREATIVE_ERROR = 10041;
public static final int CURRENTLY_INITIALIZING = 3;
public static final Companion Companion = new Companion(null);
public static final int DEEPLINK_OPEN_FAILED = 312;
public static final int DEFAULT = 10000;
public static final int EMPTY_TPAT_ERROR = 129;
public static final int EVALUATE_JAVASCRIPT_FAILED = 313;
private static final Map<Integer, String> EXCEPTION_CODE_TO_MESSAGE_MAP;
public static final int GENERATE_JSON_DATA_ERROR = 316;
public static final int GZIP_ENCODE_ERROR = 116;
public static final int HEARTBEAT_ERROR = 10043;
public static final int INVALID_ADS_ENDPOINT = 122;
public static final int INVALID_ADUNIT_BID_PAYLOAD = 213;
public static final int INVALID_AD_STATE = 10042;
public static final int INVALID_APP_ID = 2;
public static final int INVALID_ASSET_URL = 111;
public static final int INVALID_BID_PAYLOAD = 208;
public static final int INVALID_CONFIG_RESPONSE = 135;
public static final int INVALID_CTA_URL = 110;
public static final int INVALID_EVENT_ID_ERROR = 200;
public static final int INVALID_GZIP_BID_PAYLOAD = 214;
public static final int INVALID_IFA_STATUS = 302;
public static final int INVALID_INDEX_URL = 115;
public static final int INVALID_JSON_BID_PAYLOAD = 209;
public static final int INVALID_LOG_ERROR_ENDPOINT = 124;
public static final int INVALID_METRICS_ENDPOINT = 125;
public static final int INVALID_PLACEMENT_ID = 201;
public static final int INVALID_REQUEST_BUILDER_ERROR = 106;
public static final int INVALID_RI_ENDPOINT = 123;
public static final int INVALID_SIZE = 10028;
public static final int INVALID_TEMPLATE_URL = 105;
public static final int INVALID_TPAT_KEY = 128;
public static final int INVALID_WATERFALL_PLACEMENT = 222;
public static final int JSON_ENCODE_ERROR = 119;
public static final int JSON_PARAMS_ENCODE_ERROR = 315;
public static final int LINK_COMMAND_OPEN_FAILED = 314;
public static final int MRAID_BRIDGE_ERROR = 305;
public static final int MRAID_DOWNLOAD_JS_ERROR = 130;
public static final int MRAID_ERROR = 301;
public static final int MRAID_JS_CALL_EMPTY = 311;
public static final int MRAID_JS_COPY_FAILED = 219;
public static final int MRAID_JS_DOES_NOT_EXIST = 218;
public static final int MRAID_JS_WRITE_FAILED = 131;
public static final int NATIVE_ASSET_ERROR = 600;
public static final int NETWORK_ERROR = 10020;
public static final int NETWORK_PERMISSIONS_NOT_GRANTED = 10034;
public static final int NETWORK_TIMEOUT = 10047;
public static final int NETWORK_UNREACHABLE = 10033;
public static final int NO_SERVE = 10001;
public static final int NO_SPACE_TO_DOWNLOAD_ASSETS = 10019;
public static final int OMSDK_COPY_ERROR = 2003;
public static final int OMSDK_DOWNLOAD_JS_ERROR = 132;
public static final int OMSDK_JS_WRITE_FAILED = 133;
public static final int OUT_OF_MEMORY = 3001;
public static final int PLACEMENT_AD_TYPE_MISMATCH = 207;
public static final int PLACEMENT_NOT_FOUND = 10013;
public static final int PLACEMENT_SLEEP = 212;
public static final int PRIVACY_URL_ERROR = 136;
public static final int PROTOBUF_SERIALIZATION_ERROR = 118;
public static final int REACHABILITY_INITIALIZATION_FAILED = 2005;
public static final int SDK_NOT_INITIALIZED = 6;
public static final int SDK_VERSION_BELOW_REQUIRED_VERSION = 10035;
public static final int SERVER_RETRY_ERROR = 10014;
public static final int STORE_KIT_LOAD_ERROR = 2002;
public static final int STORE_OVERLAY_LOAD_ERROR = 2004;
public static final int STORE_REGION_CODE_ERROR = 134;
public static final int TEMPLATE_UNZIP_ERROR = 109;
public static final int TPAT_ERROR = 121;
public static final int TPAT_RETRY_FAILED = 137;
public static final int UNKNOWN_ERROR = 0;
public static final int UNKNOWN_EXCEPTION_CODE = 10048;
public static final int UNKNOWN_RADIO_ACCESS_TECHNOLOGY = 2006;
public static final int UNRECOGNIZED = -1;
public static final int USER_AGENT_ERROR = 7;
public static final int WEBVIEW_RENDER_UNRESPONSIVE = 10032;
public static final int WEB_CRASH = 10031;
public static final int WEB_VIEW_FAILED_NAVIGATION = 2001;
public static final int WEB_VIEW_WEB_CONTENT_PROCESS_DID_TERMINATE = 2000;
private final int code;
private String creativeId;
private final String errorMessage;
private String eventId;
private final Sdk.SDKError.Reason loggableReason;
private String placementId;
public /* synthetic */ VungleError(Integer num, Sdk.SDKError.Reason reason, String str, String str2, String str3, String str4, DefaultConstructorMarker defaultConstructorMarker) {
this(num, reason, str, str2, str3, str4);
}
public final int getCode() {
return this.code;
}
public final String getCreativeId() {
return this.creativeId;
}
public final String getErrorMessage() {
return this.errorMessage;
}
public final String getEventId() {
return this.eventId;
}
@Override // java.lang.Throwable
public String getLocalizedMessage() {
return this.errorMessage;
}
public final Sdk.SDKError.Reason getLoggableReason() {
return this.loggableReason;
}
public final String getPlacementId() {
return this.placementId;
}
public final void setCreativeId(String str) {
this.creativeId = str;
}
public final VungleError setCreativeId$vungle_ads_release(String str) {
this.creativeId = str;
return this;
}
public final void setEventId(String str) {
this.eventId = str;
}
public final VungleError setEventId$vungle_ads_release(String str) {
this.eventId = str;
return this;
}
public final void setPlacementId(String str) {
this.placementId = str;
}
public final VungleError setPlacementId$vungle_ads_release(String str) {
this.placementId = str;
return this;
}
public /* synthetic */ VungleError(Integer num, Sdk.SDKError.Reason reason, String str, String str2, String str3, String str4, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? null : num, (i & 2) != 0 ? null : reason, (i & 4) != 0 ? null : str, (i & 8) != 0 ? null : str2, (i & 16) != 0 ? null : str3, (i & 32) == 0 ? str4 : null, null);
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private VungleError(java.lang.Integer r4, com.vungle.ads.internal.protos.Sdk.SDKError.Reason r5, java.lang.String r6, java.lang.String r7, java.lang.String r8, java.lang.String r9) {
/*
r3 = this;
r0 = 10000(0x2710, float:1.4013E-41)
if (r6 != 0) goto L13
com.vungle.ads.VungleError$Companion r1 = com.vungle.ads.VungleError.Companion
if (r4 == 0) goto Ld
int r2 = r4.intValue()
goto Le
Ld:
r2 = r0
Le:
java.lang.String r1 = r1.getLocalizedMessage(r2)
goto L14
L13:
r1 = r6
L14:
r3.<init>(r1)
r3.loggableReason = r5
r3.placementId = r7
r3.creativeId = r8
r3.eventId = r9
if (r4 == 0) goto L26
int r5 = r4.intValue()
goto L2d
L26:
kotlin.jvm.internal.Intrinsics.checkNotNull(r5)
int r5 = r5.getNumber()
L2d:
r3.code = r5
if (r6 != 0) goto L3d
com.vungle.ads.VungleError$Companion r5 = com.vungle.ads.VungleError.Companion
if (r4 == 0) goto L39
int r0 = r4.intValue()
L39:
java.lang.String r6 = r5.getLocalizedMessage(r0)
L3d:
r3.errorMessage = r6
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.vungle.ads.VungleError.<init>(java.lang.Integer, com.vungle.ads.internal.protos.Sdk$SDKError$Reason, java.lang.String, java.lang.String, java.lang.String, java.lang.String):void");
}
public final VungleError logError$vungle_ads_release() {
logErrorNoReturnValue$vungle_ads_release();
return this;
}
public final void logErrorNoReturnValue$vungle_ads_release() {
Sdk.SDKError.Reason reason = this.loggableReason;
if (reason != null) {
AnalyticsClient.INSTANCE.logError$vungle_ads_release(reason, this.errorMessage, this.placementId, this.creativeId, this.eventId);
}
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!Intrinsics.areEqual(getClass(), obj != null ? obj.getClass() : null)) {
return false;
}
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type com.vungle.ads.VungleError");
VungleError vungleError = (VungleError) obj;
return this.code == vungleError.code && this.loggableReason == vungleError.loggableReason && Intrinsics.areEqual(this.errorMessage, vungleError.errorMessage) && Intrinsics.areEqual(this.placementId, vungleError.placementId) && Intrinsics.areEqual(this.creativeId, vungleError.creativeId) && Intrinsics.areEqual(this.eventId, vungleError.eventId);
}
public int hashCode() {
int hashCode = Integer.hashCode(this.code) * 31;
Sdk.SDKError.Reason reason = this.loggableReason;
int hashCode2 = (((hashCode + (reason != null ? reason.hashCode() : 0)) * 31) + this.errorMessage.hashCode()) * 31;
String str = this.placementId;
int hashCode3 = (hashCode2 + (str != null ? str.hashCode() : 0)) * 31;
String str2 = this.creativeId;
int hashCode4 = (hashCode3 + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.eventId;
return hashCode4 + (str3 != null ? str3.hashCode() : 0);
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final String getLocalizedMessage(int i) {
String str = (String) VungleError.EXCEPTION_CODE_TO_MESSAGE_MAP.get(Integer.valueOf(i));
if (str == null) {
new UnknownExceptionCode("No adequate description for exceptionCode=" + i).logErrorNoReturnValue$vungle_ads_release();
}
if (str != null) {
return str;
}
return "Unknown Exception Code: " + i;
}
public final Sdk.SDKError.Reason codeToLoggableReason(int i) {
Sdk.SDKError.Reason forNumber = Sdk.SDKError.Reason.forNumber(i);
Intrinsics.checkNotNullExpressionValue(forNumber, "forNumber(errorCode)");
return forNumber;
}
}
static {
HashMap hashMap = new HashMap();
hashMap.put(10000, "");
hashMap.put(10003, "Configuration Error Occurred. Please check your appID and placementIDs, and try again when network connectivity is available.");
hashMap.put(10001, "No advertisements are available for your current bid. Please try again later.");
hashMap.put(0, "Unknown Error Occurred.");
hashMap.put(304, "The advertisement in the cache has expired and can no longer be played. Please load another ad");
hashMap.put(3, "There is already an ongoing operation for the action you requested. Please wait until the operation finished before starting another.");
hashMap.put(6, "Vungle is not initialized/no longer initialized. Please call Vungle.init() to reinitialize.");
hashMap.put(Integer.valueOf(AD_UNABLE_TO_PLAY), "Unable to play advertisement");
hashMap.put(Integer.valueOf(AD_FAILED_TO_DOWNLOAD), "Advertisement failed to download");
hashMap.put(Integer.valueOf(PLACEMENT_NOT_FOUND), "Placement is not valid");
hashMap.put(Integer.valueOf(SERVER_RETRY_ERROR), "Remote Server responded with http Retry-After, SDK will retry this request.");
hashMap.put(Integer.valueOf(ALREADY_PLAYING_ANOTHER_AD), "Vungle is already playing different ad.");
hashMap.put(Integer.valueOf(NO_SPACE_TO_DOWNLOAD_ASSETS), "There is not enough file system size on a device to download assets for an ad.");
hashMap.put(Integer.valueOf(NETWORK_ERROR), "Network error. Try again later");
hashMap.put(Integer.valueOf(ASSET_DOWNLOAD_ERROR), "Assets download failed.");
hashMap.put(Integer.valueOf(INVALID_SIZE), "Ad size is invalid");
hashMap.put(Integer.valueOf(WEB_CRASH), "Android web view has crashed");
hashMap.put(Integer.valueOf(WEBVIEW_RENDER_UNRESPONSIVE), "Android web view render became unresponsive, please clean-up your Webview process if any");
hashMap.put(Integer.valueOf(NETWORK_UNREACHABLE), "Network error. Please check if network is available and permission for network access is granted.");
hashMap.put(Integer.valueOf(NETWORK_PERMISSIONS_NOT_GRANTED), "Network permissions not granted. Please check manifest for android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE");
hashMap.put(Integer.valueOf(SDK_VERSION_BELOW_REQUIRED_VERSION), "The SDK minimum version should not be overridden. Will not work as expected.");
hashMap.put(Integer.valueOf(AD_RENDER_NETWORK_ERROR), "Ad rendering failed due to network connectivity issue");
hashMap.put(3001, "Out of memory");
hashMap.put(Integer.valueOf(AD_MARKUP_INVALID), "Invalid ad markup");
hashMap.put(Integer.valueOf(CREATIVE_ERROR), "Creative error occurred");
hashMap.put(Integer.valueOf(INVALID_AD_STATE), "Invalid ad state ");
hashMap.put(Integer.valueOf(HEARTBEAT_ERROR), "Heartbeat not received within a valid time window");
hashMap.put(2, "App id is invalid.");
hashMap.put(207, "Ad type does not match with placement type.");
hashMap.put(400, "Concurrent playback not supported");
hashMap.put(Integer.valueOf(NETWORK_TIMEOUT), "Request timeout.");
hashMap.put(137, "Pinging Tpat did not succeed during all allowed reries.");
hashMap.put(130, "Failed to download mraid js.");
hashMap.put(113, "Server returned an unexpected response object or failed to load the downloaded data.");
hashMap.put(222, "Placement header bidding type does not match with loadAd call.");
hashMap.put(136, "Failed to open privacy url");
EXCEPTION_CODE_TO_MESSAGE_MAP = hashMap;
}
}

View File

@@ -0,0 +1,11 @@
package com.vungle.ads;
/* loaded from: classes4.dex */
public final class VungleErrorKt {
private static final String CONCURRENT_PLAYBACK_UNSUPPORTED_MESSAGE = "Concurrent playback not supported";
private static final String INVALID_WATERFALL_PLACEMENT_MESSAGE = "header bidding status does not match with loadAd parameters";
private static final String NETWORK_ERROR_MESSAGE = "Network error. Try again later";
private static final String PLACEMENT_AD_TYPE_MISMATCH_MESSAGE = "Ad type does not match with placement type.";
private static final String PRIVACY_URL_ERROR_MESSAGE = "Failed to open privacy url";
private static final String TPAT_RETRY_FAILED_MESSAGE = "Pinging Tpat did not succeed during all allowed reries.";
}

View File

@@ -0,0 +1,61 @@
package com.vungle.ads;
import com.ironsource.zk;
import com.vungle.ads.internal.privacy.PrivacyConsent;
import com.vungle.ads.internal.privacy.PrivacyManager;
/* loaded from: classes4.dex */
public final class VunglePrivacySettings {
public static final VunglePrivacySettings INSTANCE = new VunglePrivacySettings();
private VunglePrivacySettings() {
}
public static final void setCOPPAStatus(boolean z) {
PrivacyManager.INSTANCE.updateCoppaConsent(z);
}
public static final String getCOPPAStatus() {
return PrivacyManager.INSTANCE.getCoppaStatus().name();
}
public static final void setGDPRStatus(boolean z, String str) {
String value;
if (z) {
value = PrivacyConsent.OPT_IN.getValue();
} else {
value = PrivacyConsent.OPT_OUT.getValue();
}
PrivacyManager.INSTANCE.updateGdprConsent(value, zk.b, str);
}
public static final String getGDPRStatus() {
return PrivacyManager.INSTANCE.getConsentStatus();
}
public static final String getGDPRMessageVersion() {
return PrivacyManager.INSTANCE.getConsentMessageVersion();
}
public static final String getGDPRSource() {
return PrivacyManager.INSTANCE.getConsentSource();
}
public static final long getGDPRTimestamp() {
return PrivacyManager.INSTANCE.getConsentTimestamp();
}
public static final void setCCPAStatus(boolean z) {
PrivacyConsent privacyConsent;
if (z) {
privacyConsent = PrivacyConsent.OPT_IN;
} else {
privacyConsent = PrivacyConsent.OPT_OUT;
}
PrivacyManager.INSTANCE.updateCcpaConsent(privacyConsent);
}
public static final String getCCPAStatus() {
return PrivacyManager.INSTANCE.getCcpaStatus();
}
}

View File

@@ -0,0 +1,63 @@
package com.vungle.ads.fpd;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.ranges.IntRange;
/* loaded from: classes4.dex */
public enum AgeRange {
AGE_18_20(1, new IntRange(18, 20)),
AGE_21_30(2, new IntRange(21, 30)),
AGE_31_40(3, new IntRange(31, 40)),
AGE_41_50(4, new IntRange(41, 50)),
AGE_51_60(5, new IntRange(51, 60)),
AGE_61_70(6, new IntRange(61, 70)),
AGE_71_75(7, new IntRange(71, 75)),
OTHERS(0, new IntRange(Integer.MIN_VALUE, Integer.MAX_VALUE));
public static final Companion Companion = new Companion(null);
private final int id;
private final IntRange range;
public final int getId() {
return this.id;
}
public final IntRange getRange() {
return this.range;
}
AgeRange(int i, IntRange intRange) {
this.id = i;
this.range = intRange;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final AgeRange fromAge$vungle_ads_release(int i) {
AgeRange ageRange;
AgeRange[] values = AgeRange.values();
int length = values.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
ageRange = null;
break;
}
ageRange = values[i2];
IntRange range = ageRange.getRange();
int first = range.getFirst();
if (i <= range.getLast() && first <= i) {
break;
}
i2++;
}
return ageRange == null ? AgeRange.OTHERS : ageRange;
}
}
}

View File

@@ -0,0 +1,110 @@
package com.vungle.ads.fpd;
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;
/* loaded from: classes4.dex */
public final class Demographic$$serializer implements GeneratedSerializer<Demographic> {
public static final Demographic$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
Demographic$$serializer demographic$$serializer = new Demographic$$serializer();
INSTANCE = demographic$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.fpd.Demographic", demographic$$serializer, 4);
pluginGeneratedSerialDescriptor.addElement("age_range", true);
pluginGeneratedSerialDescriptor.addElement("length_of_residence", true);
pluginGeneratedSerialDescriptor.addElement("median_home_value_usd", true);
pluginGeneratedSerialDescriptor.addElement("monthly_housing_payment_usd", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private Demographic$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public Demographic m3830deserialize(Decoder decoder) {
Object obj;
Object obj2;
Object obj3;
int i;
Object obj4;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj5 = null;
if (beginStructure.decodeSequentially()) {
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, IntSerializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, (Object) null);
i = 15;
} else {
boolean z = true;
int i2 = 0;
Object obj6 = null;
Object obj7 = null;
Object obj8 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z = false;
} else if (decodeElementIndex == 0) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, IntSerializer.INSTANCE, obj5);
i2 |= 1;
} else if (decodeElementIndex == 1) {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, IntSerializer.INSTANCE, obj6);
i2 |= 2;
} else if (decodeElementIndex == 2) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, obj7);
i2 |= 4;
} else {
if (decodeElementIndex != 3) {
throw new UnknownFieldException(decodeElementIndex);
}
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, obj8);
i2 |= 8;
}
}
obj = obj6;
obj2 = obj7;
obj3 = obj8;
Object obj9 = obj5;
i = i2;
obj4 = obj9;
}
beginStructure.endStructure(descriptor2);
return new Demographic(i, (Integer) obj4, (Integer) obj, (Integer) obj2, (Integer) obj3, null);
}
public void serialize(Encoder encoder, Demographic value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
Demographic.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,115 @@
package com.vungle.ads.fpd;
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.SerializationConstructorMarker;
@Serializable
/* loaded from: classes4.dex */
public final class Demographic {
public static final Companion Companion = new Companion(null);
private Integer ageRange;
private Integer lengthOfResidence;
private Integer medianHomeValueUSD;
private Integer monthlyHousingPaymentUSD;
@SerialName("age_range")
private static /* synthetic */ void getAgeRange$annotations() {
}
@SerialName("length_of_residence")
private static /* synthetic */ void getLengthOfResidence$annotations() {
}
@SerialName("median_home_value_usd")
private static /* synthetic */ void getMedianHomeValueUSD$annotations() {
}
@SerialName("monthly_housing_payment_usd")
private static /* synthetic */ void getMonthlyHousingPaymentUSD$annotations() {
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<Demographic> serializer() {
return Demographic$$serializer.INSTANCE;
}
}
public Demographic() {
}
public /* synthetic */ Demographic(int i, @SerialName("age_range") Integer num, @SerialName("length_of_residence") Integer num2, @SerialName("median_home_value_usd") Integer num3, @SerialName("monthly_housing_payment_usd") Integer num4, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.ageRange = null;
} else {
this.ageRange = num;
}
if ((i & 2) == 0) {
this.lengthOfResidence = null;
} else {
this.lengthOfResidence = num2;
}
if ((i & 4) == 0) {
this.medianHomeValueUSD = null;
} else {
this.medianHomeValueUSD = num3;
}
if ((i & 8) == 0) {
this.monthlyHousingPaymentUSD = null;
} else {
this.monthlyHousingPaymentUSD = num4;
}
}
public static final void write$Self(Demographic self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.ageRange != null) {
output.encodeNullableSerializableElement(serialDesc, 0, IntSerializer.INSTANCE, self.ageRange);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.lengthOfResidence != null) {
output.encodeNullableSerializableElement(serialDesc, 1, IntSerializer.INSTANCE, self.lengthOfResidence);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.medianHomeValueUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 2, IntSerializer.INSTANCE, self.medianHomeValueUSD);
}
if (!output.shouldEncodeElementDefault(serialDesc, 3) && self.monthlyHousingPaymentUSD == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 3, IntSerializer.INSTANCE, self.monthlyHousingPaymentUSD);
}
public final Demographic setAgeRange(int i) {
this.ageRange = Integer.valueOf(AgeRange.Companion.fromAge$vungle_ads_release(i).getId());
return this;
}
public final Demographic setLengthOfResidence(int i) {
this.lengthOfResidence = Integer.valueOf(LengthOfResidence.Companion.fromYears$vungle_ads_release(i).getId());
return this;
}
public final Demographic setMedianHomeValueUSD(int i) {
this.medianHomeValueUSD = Integer.valueOf(MedianHomeValueUSD.Companion.fromPrice$vungle_ads_release(i).getId());
return this;
}
public final Demographic setMonthlyHousingCosts(int i) {
this.monthlyHousingPaymentUSD = Integer.valueOf(MonthlyHousingCosts.Companion.fromCost$vungle_ads_release(i).getId());
return this;
}
}

View File

@@ -0,0 +1,126 @@
package com.vungle.ads.fpd;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
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.StringSerializer;
/* loaded from: classes4.dex */
public final class FirstPartyData$$serializer implements GeneratedSerializer<FirstPartyData> {
public static final FirstPartyData$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
FirstPartyData$$serializer firstPartyData$$serializer = new FirstPartyData$$serializer();
INSTANCE = firstPartyData$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.fpd.FirstPartyData", firstPartyData$$serializer, 5);
pluginGeneratedSerialDescriptor.addElement("session_context", true);
pluginGeneratedSerialDescriptor.addElement("demographic", true);
pluginGeneratedSerialDescriptor.addElement("location", true);
pluginGeneratedSerialDescriptor.addElement(ImpressionData.IMPRESSION_DATA_KEY_REVENUE, true);
pluginGeneratedSerialDescriptor.addElement("custom_data", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private FirstPartyData$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(SessionContext$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(Demographic$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(Location$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(Revenue$$serializer.INSTANCE), BuiltinSerializersKt.getNullable(new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE))};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public FirstPartyData m3831deserialize(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);
boolean z = false;
Object obj6 = null;
if (beginStructure.decodeSequentially()) {
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, SessionContext$$serializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 1, Demographic$$serializer.INSTANCE, (Object) null);
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, Location$$serializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, Revenue$$serializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), (Object) null);
i = 31;
} else {
boolean z2 = true;
int i2 = 0;
Object obj7 = null;
Object obj8 = null;
Object obj9 = null;
Object obj10 = null;
while (z2) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
if (decodeElementIndex == -1) {
z2 = z;
} else if (decodeElementIndex != 0) {
if (decodeElementIndex == 1) {
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, Demographic$$serializer.INSTANCE, obj7);
i2 |= 2;
} else if (decodeElementIndex == 2) {
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, Location$$serializer.INSTANCE, obj8);
i2 |= 4;
} else if (decodeElementIndex == 3) {
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, Revenue$$serializer.INSTANCE, obj9);
i2 |= 8;
} else {
if (decodeElementIndex != 4) {
throw new UnknownFieldException(decodeElementIndex);
}
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), obj10);
i2 |= 16;
}
z = false;
} else {
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, SessionContext$$serializer.INSTANCE, obj6);
i2 |= 1;
z = false;
}
}
obj = obj7;
obj2 = obj8;
obj3 = obj9;
obj4 = obj10;
Object obj11 = obj6;
i = i2;
obj5 = obj11;
}
beginStructure.endStructure(descriptor2);
return new FirstPartyData(i, (SessionContext) obj5, (Demographic) obj, (Location) obj2, (Revenue) obj3, (Map) obj4, null);
}
public void serialize(Encoder encoder, FirstPartyData value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
FirstPartyData.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,178 @@
package com.vungle.ads.fpd;
import com.ironsource.mediationsdk.impressionData.ImpressionData;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
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.LinkedHashMapSerializer;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class FirstPartyData {
public static final Companion Companion = new Companion(null);
private Map<String, String> _customData;
private volatile Demographic _demographic;
private volatile Location _location;
private volatile Revenue _revenue;
private volatile SessionContext _sessionContext;
@SerialName("custom_data")
private static /* synthetic */ void get_customData$annotations() {
}
@SerialName("demographic")
private static /* synthetic */ void get_demographic$annotations() {
}
@SerialName("location")
private static /* synthetic */ void get_location$annotations() {
}
@SerialName(ImpressionData.IMPRESSION_DATA_KEY_REVENUE)
private static /* synthetic */ void get_revenue$annotations() {
}
@SerialName("session_context")
private static /* synthetic */ void get_sessionContext$annotations() {
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<FirstPartyData> serializer() {
return FirstPartyData$$serializer.INSTANCE;
}
}
public FirstPartyData() {
}
public /* synthetic */ FirstPartyData(int i, @SerialName("session_context") SessionContext sessionContext, @SerialName("demographic") Demographic demographic, @SerialName("location") Location location, @SerialName("revenue") Revenue revenue, @SerialName("custom_data") Map map, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this._sessionContext = null;
} else {
this._sessionContext = sessionContext;
}
if ((i & 2) == 0) {
this._demographic = null;
} else {
this._demographic = demographic;
}
if ((i & 4) == 0) {
this._location = null;
} else {
this._location = location;
}
if ((i & 8) == 0) {
this._revenue = null;
} else {
this._revenue = revenue;
}
if ((i & 16) == 0) {
this._customData = null;
} else {
this._customData = map;
}
}
public static final void write$Self(FirstPartyData self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self._sessionContext != null) {
output.encodeNullableSerializableElement(serialDesc, 0, SessionContext$$serializer.INSTANCE, self._sessionContext);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self._demographic != null) {
output.encodeNullableSerializableElement(serialDesc, 1, Demographic$$serializer.INSTANCE, self._demographic);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self._location != null) {
output.encodeNullableSerializableElement(serialDesc, 2, Location$$serializer.INSTANCE, self._location);
}
if (output.shouldEncodeElementDefault(serialDesc, 3) || self._revenue != null) {
output.encodeNullableSerializableElement(serialDesc, 3, Revenue$$serializer.INSTANCE, self._revenue);
}
if (!output.shouldEncodeElementDefault(serialDesc, 4) && self._customData == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 4, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), self._customData);
}
public final synchronized SessionContext getSessionContext() {
SessionContext sessionContext;
sessionContext = this._sessionContext;
if (sessionContext == null) {
sessionContext = new SessionContext();
this._sessionContext = sessionContext;
}
return sessionContext;
}
public final synchronized Demographic getDemographic() {
Demographic demographic;
demographic = this._demographic;
if (demographic == null) {
demographic = new Demographic();
this._demographic = demographic;
}
return demographic;
}
public final synchronized Location getLocation() {
Location location;
location = this._location;
if (location == null) {
location = new Location();
this._location = location;
}
return location;
}
public final synchronized Revenue getRevenue() {
Revenue revenue;
revenue = this._revenue;
if (revenue == null) {
revenue = new Revenue();
this._revenue = revenue;
}
return revenue;
}
public final synchronized Map<String, String> getCustomData() {
Map<String, String> map;
map = this._customData;
if (map == null) {
map = new ConcurrentHashMap<>();
this._customData = map;
}
return map;
}
public final synchronized void clearAll() {
try {
this._sessionContext = null;
this._demographic = null;
this._location = null;
this._revenue = null;
Map<String, String> map = this._customData;
if (map != null) {
map.clear();
}
this._customData = null;
} catch (Throwable th) {
throw th;
}
}
}

View File

@@ -0,0 +1,65 @@
package com.vungle.ads.fpd;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.ranges.IntRange;
/* loaded from: classes4.dex */
public enum LengthOfResidence {
LESS_THAN_ONE_YEAR(0, new IntRange(Integer.MIN_VALUE, 0)),
ONE_TO_FIVE_YEARS(1, new IntRange(1, 5)),
SIX_TO_TEN_YEARS(2, new IntRange(6, 10)),
ELEVEN_TO_TWENTY_YEARS(3, new IntRange(11, 20)),
TWENTY_ONE_TO_THIRTY_YEARS(4, new IntRange(21, 30)),
THIRTY_ONE_TO_FORTY_YEARS(5, new IntRange(31, 40)),
FORTY_ONE_TO_FIFTY_YEARS(6, new IntRange(41, 50)),
FIFTY_ONE_TO_SIXTY_YEARS(7, new IntRange(51, 60)),
SIXTY_ONE_TO_SEVENTY_YEARS(8, new IntRange(61, 70)),
OVER_SEVENTY_ONE_YEARS(9, new IntRange(71, Integer.MAX_VALUE));
public static final Companion Companion = new Companion(null);
private final int id;
private final IntRange range;
public final int getId() {
return this.id;
}
public final IntRange getRange() {
return this.range;
}
LengthOfResidence(int i, IntRange intRange) {
this.id = i;
this.range = intRange;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final LengthOfResidence fromYears$vungle_ads_release(int i) {
LengthOfResidence lengthOfResidence;
LengthOfResidence[] values = LengthOfResidence.values();
int length = values.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
lengthOfResidence = null;
break;
}
lengthOfResidence = values[i2];
IntRange range = lengthOfResidence.getRange();
int first = range.getFirst();
if (i <= range.getLast() && first <= i) {
break;
}
i2++;
}
return lengthOfResidence == null ? LengthOfResidence.LESS_THAN_ONE_YEAR : lengthOfResidence;
}
}
}

View File

@@ -0,0 +1,103 @@
package com.vungle.ads.fpd;
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.StringSerializer;
/* loaded from: classes4.dex */
public final class Location$$serializer implements GeneratedSerializer<Location> {
public static final Location$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
Location$$serializer location$$serializer = new Location$$serializer();
INSTANCE = location$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.fpd.Location", location$$serializer, 3);
pluginGeneratedSerialDescriptor.addElement("country", true);
pluginGeneratedSerialDescriptor.addElement("region_state", true);
pluginGeneratedSerialDescriptor.addElement("dma", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private Location$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public Location m3832deserialize(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, 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, 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, IntSerializer.INSTANCE, obj6);
i2 |= 4;
}
}
obj = obj5;
obj2 = obj6;
Object obj7 = obj4;
i = i2;
obj3 = obj7;
}
beginStructure.endStructure(descriptor2);
return new Location(i, (String) obj3, (String) obj, (Integer) obj2, null);
}
public void serialize(Encoder encoder, Location value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
Location.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,100 @@
package com.vungle.ads.fpd;
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.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class Location {
public static final Companion Companion = new Companion(null);
private String country;
private Integer dma;
private String regionState;
@SerialName("country")
private static /* synthetic */ void getCountry$annotations() {
}
@SerialName("dma")
private static /* synthetic */ void getDma$annotations() {
}
@SerialName("region_state")
private static /* synthetic */ void getRegionState$annotations() {
}
public final Location setCountry(String country) {
Intrinsics.checkNotNullParameter(country, "country");
this.country = country;
return this;
}
public final Location setRegionState(String regionState) {
Intrinsics.checkNotNullParameter(regionState, "regionState");
this.regionState = regionState;
return this;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<Location> serializer() {
return Location$$serializer.INSTANCE;
}
}
public Location() {
}
public /* synthetic */ Location(int i, @SerialName("country") String str, @SerialName("region_state") String str2, @SerialName("dma") Integer num, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.country = null;
} else {
this.country = str;
}
if ((i & 2) == 0) {
this.regionState = null;
} else {
this.regionState = str2;
}
if ((i & 4) == 0) {
this.dma = null;
} else {
this.dma = num;
}
}
public static final void write$Self(Location self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.country != null) {
output.encodeNullableSerializableElement(serialDesc, 0, StringSerializer.INSTANCE, self.country);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.regionState != null) {
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.regionState);
}
if (!output.shouldEncodeElementDefault(serialDesc, 2) && self.dma == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 2, IntSerializer.INSTANCE, self.dma);
}
public final Location setDma(int i) {
this.dma = Integer.valueOf(i);
return this;
}
}

View File

@@ -0,0 +1,66 @@
package com.vungle.ads.fpd;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ogg.DefaultOggSeeker;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.ranges.IntRange;
/* loaded from: classes4.dex */
public enum MedianHomeValueUSD {
UNDER_100K(0, new IntRange(Integer.MIN_VALUE, DefaultOggSeeker.MATCH_BYTE_RANGE)),
FROM_100K_TO_300K(1, new IntRange(100001, 300000)),
FROM_300K_TO_500K(2, new IntRange(300001, 500000)),
FROM_500K_TO_700K(3, new IntRange(500001, 700000)),
FROM_700K_TO_900K(4, new IntRange(700001, 900000)),
FROM_900K_TO_1M1(5, new IntRange(900001, 1100000)),
FROM_1M1_TO_1M3(6, new IntRange(1100001, 1300000)),
FROM_1M3_TO_1M5(7, new IntRange(1300001, 1500000)),
FROM_1M5_TO_1M7(8, new IntRange(1500001, 1700000)),
OVER_1M7(9, new IntRange(1700001, Integer.MAX_VALUE));
public static final Companion Companion = new Companion(null);
private final int id;
private final IntRange range;
public final int getId() {
return this.id;
}
public final IntRange getRange() {
return this.range;
}
MedianHomeValueUSD(int i, IntRange intRange) {
this.id = i;
this.range = intRange;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final MedianHomeValueUSD fromPrice$vungle_ads_release(int i) {
MedianHomeValueUSD medianHomeValueUSD;
MedianHomeValueUSD[] values = MedianHomeValueUSD.values();
int length = values.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
medianHomeValueUSD = null;
break;
}
medianHomeValueUSD = values[i2];
IntRange range = medianHomeValueUSD.getRange();
int first = range.getFirst();
if (i <= range.getLast() && first <= i) {
break;
}
i2++;
}
return medianHomeValueUSD == null ? MedianHomeValueUSD.UNDER_100K : medianHomeValueUSD;
}
}
}

View File

@@ -0,0 +1,66 @@
package com.vungle.ads.fpd;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.ranges.IntRange;
/* loaded from: classes4.dex */
public enum MonthlyHousingCosts {
UNDER_500(0, new IntRange(Integer.MIN_VALUE, 500)),
FROM_500_TO_1000(1, new IntRange(501, 1000)),
FROM_1000_TO_1500(2, new IntRange(1001, 1500)),
FROM_1500_TO_2000(3, new IntRange(1501, 2000)),
FROM_2000_TO_2500(4, new IntRange(2001, 2500)),
FROM_2500_TO_3000(5, new IntRange(2501, 3000)),
FROM_3000_TO_3500(6, new IntRange(3001, IronSourceConstants.BN_AUCTION_REQUEST)),
FROM_3500_TO_4000(7, new IntRange(IronSourceConstants.BN_AUCTION_FAILED, 4000)),
FROM_4000_TO_4500(8, new IntRange(IronSourceConstants.NT_LOAD, IronSourceConstants.NT_AUCTION_REQUEST)),
OVER_4500(9, new IntRange(IronSourceConstants.NT_AUCTION_FAILED, Integer.MAX_VALUE));
public static final Companion Companion = new Companion(null);
private final int id;
private final IntRange range;
public final int getId() {
return this.id;
}
public final IntRange getRange() {
return this.range;
}
MonthlyHousingCosts(int i, IntRange intRange) {
this.id = i;
this.range = intRange;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final MonthlyHousingCosts fromCost$vungle_ads_release(int i) {
MonthlyHousingCosts monthlyHousingCosts;
MonthlyHousingCosts[] values = MonthlyHousingCosts.values();
int length = values.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
monthlyHousingCosts = null;
break;
}
monthlyHousingCosts = values[i2];
IntRange range = monthlyHousingCosts.getRange();
int first = range.getFirst();
if (i <= range.getLast() && first <= i) {
break;
}
i2++;
}
return monthlyHousingCosts == null ? MonthlyHousingCosts.UNDER_500 : monthlyHousingCosts;
}
}
}

View File

@@ -0,0 +1,301 @@
package com.vungle.ads.fpd;
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.FloatSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class Revenue$$serializer implements GeneratedSerializer<Revenue> {
public static final Revenue$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
Revenue$$serializer revenue$$serializer = new Revenue$$serializer();
INSTANCE = revenue$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.fpd.Revenue", revenue$$serializer, 17);
pluginGeneratedSerialDescriptor.addElement("total_earnings_usd", true);
pluginGeneratedSerialDescriptor.addElement("earnings_by_placement_usd", true);
pluginGeneratedSerialDescriptor.addElement("top_n_adomain", true);
pluginGeneratedSerialDescriptor.addElement("is_user_a_purchaser", true);
pluginGeneratedSerialDescriptor.addElement("is_user_a_subscriber", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_total_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_median_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_mean_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_total_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_median_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_mean_spend_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_user_pltv_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_user_ltv_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_user_pltv_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_user_ltv_usd", true);
pluginGeneratedSerialDescriptor.addElement("last_7_days_placement_fill_rate", true);
pluginGeneratedSerialDescriptor.addElement("last_30_days_placement_fill_rate", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private Revenue$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(new ArrayListSerializer(StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(BooleanSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public Revenue m3833deserialize(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;
int i;
Object obj14;
Object obj15;
Object obj16;
Object obj17;
Object obj18;
int i2;
Object obj19;
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, FloatSerializer.INSTANCE, (Object) null);
Object decodeNullableSerializableElement2 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, FloatSerializer.INSTANCE, (Object) null);
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, new ArrayListSerializer(StringSerializer.INSTANCE), (Object) null);
obj11 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, BooleanSerializer.INSTANCE, (Object) null);
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, BooleanSerializer.INSTANCE, (Object) null);
obj17 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, FloatSerializer.INSTANCE, (Object) null);
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, FloatSerializer.INSTANCE, (Object) null);
obj16 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, FloatSerializer.INSTANCE, (Object) null);
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, FloatSerializer.INSTANCE, (Object) null);
obj15 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, FloatSerializer.INSTANCE, (Object) null);
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, FloatSerializer.INSTANCE, (Object) null);
obj14 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, FloatSerializer.INSTANCE, (Object) null);
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, FloatSerializer.INSTANCE, (Object) null);
obj13 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, FloatSerializer.INSTANCE, (Object) null);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, FloatSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, FloatSerializer.INSTANCE, (Object) null);
i = 131071;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 16, FloatSerializer.INSTANCE, (Object) null);
obj2 = decodeNullableSerializableElement;
obj3 = decodeNullableSerializableElement2;
} 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;
int i3 = 0;
Object obj37 = null;
while (z) {
Object obj38 = obj23;
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
obj19 = obj22;
obj20 = obj30;
obj21 = obj38;
z = false;
obj23 = obj21;
obj30 = obj20;
obj22 = obj19;
case 0:
obj19 = obj22;
obj20 = obj30;
obj21 = obj38;
obj33 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, FloatSerializer.INSTANCE, obj33);
i3 |= 1;
obj34 = obj34;
obj23 = obj21;
obj30 = obj20;
obj22 = obj19;
case 1:
obj19 = obj22;
obj20 = obj30;
obj21 = obj38;
obj34 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, FloatSerializer.INSTANCE, obj34);
i3 |= 2;
obj35 = obj35;
obj23 = obj21;
obj30 = obj20;
obj22 = obj19;
case 2:
obj19 = obj22;
obj20 = obj30;
obj21 = obj38;
obj35 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, new ArrayListSerializer(StringSerializer.INSTANCE), obj35);
i3 |= 4;
obj36 = obj36;
obj23 = obj21;
obj30 = obj20;
obj22 = obj19;
case 3:
obj19 = obj22;
obj20 = obj30;
obj21 = obj38;
obj36 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, BooleanSerializer.INSTANCE, obj36);
i3 |= 8;
obj23 = obj21;
obj30 = obj20;
obj22 = obj19;
case 4:
obj19 = obj22;
obj20 = obj30;
obj23 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, BooleanSerializer.INSTANCE, obj38);
i3 |= 16;
obj30 = obj20;
obj22 = obj19;
case 5:
i3 |= 32;
obj30 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, FloatSerializer.INSTANCE, obj30);
obj22 = obj22;
obj23 = obj38;
case 6:
obj18 = obj30;
obj31 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, FloatSerializer.INSTANCE, obj31);
i3 |= 64;
obj23 = obj38;
obj30 = obj18;
case 7:
obj18 = obj30;
obj29 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, FloatSerializer.INSTANCE, obj29);
i3 |= 128;
obj23 = obj38;
obj30 = obj18;
case 8:
obj18 = obj30;
obj28 = beginStructure.decodeNullableSerializableElement(descriptor2, 8, FloatSerializer.INSTANCE, obj28);
i3 |= 256;
obj23 = obj38;
obj30 = obj18;
case 9:
obj18 = obj30;
obj27 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, FloatSerializer.INSTANCE, obj27);
i3 |= 512;
obj23 = obj38;
obj30 = obj18;
case 10:
obj18 = obj30;
obj32 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, FloatSerializer.INSTANCE, obj32);
i3 |= 1024;
obj23 = obj38;
obj30 = obj18;
case 11:
obj18 = obj30;
obj26 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, FloatSerializer.INSTANCE, obj26);
i3 |= 2048;
obj23 = obj38;
obj30 = obj18;
case 12:
obj18 = obj30;
obj25 = beginStructure.decodeNullableSerializableElement(descriptor2, 12, FloatSerializer.INSTANCE, obj25);
i3 |= 4096;
obj23 = obj38;
obj30 = obj18;
case 13:
obj18 = obj30;
obj22 = beginStructure.decodeNullableSerializableElement(descriptor2, 13, FloatSerializer.INSTANCE, obj22);
i3 |= 8192;
obj23 = obj38;
obj30 = obj18;
case 14:
obj18 = obj30;
obj24 = beginStructure.decodeNullableSerializableElement(descriptor2, 14, FloatSerializer.INSTANCE, obj24);
i3 |= 16384;
obj23 = obj38;
obj30 = obj18;
case 15:
obj18 = obj30;
obj37 = beginStructure.decodeNullableSerializableElement(descriptor2, 15, FloatSerializer.INSTANCE, obj37);
i2 = 32768;
i3 |= i2;
obj23 = obj38;
obj30 = obj18;
case 16:
obj18 = obj30;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 16, FloatSerializer.INSTANCE, obj);
i2 = 65536;
i3 |= i2;
obj23 = obj38;
obj30 = obj18;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
Object obj39 = obj22;
Object obj40 = obj23;
Object obj41 = obj30;
obj2 = obj33;
obj3 = obj34;
obj4 = obj37;
obj5 = obj24;
obj6 = obj25;
obj7 = obj28;
obj8 = obj31;
obj9 = obj32;
obj10 = obj35;
obj11 = obj36;
obj12 = obj40;
obj13 = obj39;
i = i3;
obj14 = obj26;
obj15 = obj27;
obj16 = obj29;
obj17 = obj41;
}
beginStructure.endStructure(descriptor2);
return new Revenue(i, (Float) obj2, (Float) obj3, (List) obj10, (Boolean) obj11, (Boolean) obj12, (Float) obj17, (Float) obj8, (Float) obj16, (Float) obj7, (Float) obj15, (Float) obj9, (Float) obj14, (Float) obj6, (Float) obj13, (Float) obj5, (Float) obj4, (Float) obj, null);
}
public void serialize(Encoder encoder, Revenue value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
Revenue.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,384 @@
package com.vungle.ads.fpd;
import com.vungle.ads.internal.util.RangeUtil;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt___CollectionsKt;
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.ArrayListSerializer;
import kotlinx.serialization.internal.BooleanSerializer;
import kotlinx.serialization.internal.FloatSerializer;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class Revenue {
public static final Companion Companion = new Companion(null);
private Float earningsByPlacementUSD;
private Boolean isUserAPurchaser;
private Boolean isUserASubscriber;
private Float last30DaysMeanSpendUSD;
private Float last30DaysMedianSpendUSD;
private Float last30DaysPlacementFillRate;
private Float last30DaysTotalSpendUSD;
private Float last30DaysUserLtvUSD;
private Float last30DaysUserPltvUSD;
private Float last7DaysMeanSpendUSD;
private Float last7DaysMedianSpendUSD;
private Float last7DaysPlacementFillRate;
private Float last7DaysTotalSpendUSD;
private Float last7DaysUserLtvUSD;
private Float last7DaysUserPltvUSD;
private List<String> topNAdomain;
private Float totalEarningsUSD;
@SerialName("earnings_by_placement_usd")
private static /* synthetic */ void getEarningsByPlacementUSD$annotations() {
}
@SerialName("last_30_days_mean_spend_usd")
private static /* synthetic */ void getLast30DaysMeanSpendUSD$annotations() {
}
@SerialName("last_30_days_median_spend_usd")
private static /* synthetic */ void getLast30DaysMedianSpendUSD$annotations() {
}
@SerialName("last_30_days_placement_fill_rate")
private static /* synthetic */ void getLast30DaysPlacementFillRate$annotations() {
}
@SerialName("last_30_days_total_spend_usd")
private static /* synthetic */ void getLast30DaysTotalSpendUSD$annotations() {
}
@SerialName("last_30_days_user_ltv_usd")
private static /* synthetic */ void getLast30DaysUserLtvUSD$annotations() {
}
@SerialName("last_30_days_user_pltv_usd")
private static /* synthetic */ void getLast30DaysUserPltvUSD$annotations() {
}
@SerialName("last_7_days_mean_spend_usd")
private static /* synthetic */ void getLast7DaysMeanSpendUSD$annotations() {
}
@SerialName("last_7_days_median_spend_usd")
private static /* synthetic */ void getLast7DaysMedianSpendUSD$annotations() {
}
@SerialName("last_7_days_placement_fill_rate")
private static /* synthetic */ void getLast7DaysPlacementFillRate$annotations() {
}
@SerialName("last_7_days_total_spend_usd")
private static /* synthetic */ void getLast7DaysTotalSpendUSD$annotations() {
}
@SerialName("last_7_days_user_ltv_usd")
private static /* synthetic */ void getLast7DaysUserLtvUSD$annotations() {
}
@SerialName("last_7_days_user_pltv_usd")
private static /* synthetic */ void getLast7DaysUserPltvUSD$annotations() {
}
@SerialName("top_n_adomain")
private static /* synthetic */ void getTopNAdomain$annotations() {
}
@SerialName("total_earnings_usd")
private static /* synthetic */ void getTotalEarningsUSD$annotations() {
}
@SerialName("is_user_a_purchaser")
private static /* synthetic */ void isUserAPurchaser$annotations() {
}
@SerialName("is_user_a_subscriber")
private static /* synthetic */ void isUserASubscriber$annotations() {
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<Revenue> serializer() {
return Revenue$$serializer.INSTANCE;
}
}
public Revenue() {
}
public /* synthetic */ Revenue(int i, @SerialName("total_earnings_usd") Float f, @SerialName("earnings_by_placement_usd") Float f2, @SerialName("top_n_adomain") List list, @SerialName("is_user_a_purchaser") Boolean bool, @SerialName("is_user_a_subscriber") Boolean bool2, @SerialName("last_7_days_total_spend_usd") Float f3, @SerialName("last_7_days_median_spend_usd") Float f4, @SerialName("last_7_days_mean_spend_usd") Float f5, @SerialName("last_30_days_total_spend_usd") Float f6, @SerialName("last_30_days_median_spend_usd") Float f7, @SerialName("last_30_days_mean_spend_usd") Float f8, @SerialName("last_7_days_user_pltv_usd") Float f9, @SerialName("last_7_days_user_ltv_usd") Float f10, @SerialName("last_30_days_user_pltv_usd") Float f11, @SerialName("last_30_days_user_ltv_usd") Float f12, @SerialName("last_7_days_placement_fill_rate") Float f13, @SerialName("last_30_days_placement_fill_rate") Float f14, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.totalEarningsUSD = null;
} else {
this.totalEarningsUSD = f;
}
if ((i & 2) == 0) {
this.earningsByPlacementUSD = null;
} else {
this.earningsByPlacementUSD = f2;
}
if ((i & 4) == 0) {
this.topNAdomain = null;
} else {
this.topNAdomain = list;
}
if ((i & 8) == 0) {
this.isUserAPurchaser = null;
} else {
this.isUserAPurchaser = bool;
}
if ((i & 16) == 0) {
this.isUserASubscriber = null;
} else {
this.isUserASubscriber = bool2;
}
if ((i & 32) == 0) {
this.last7DaysTotalSpendUSD = null;
} else {
this.last7DaysTotalSpendUSD = f3;
}
if ((i & 64) == 0) {
this.last7DaysMedianSpendUSD = null;
} else {
this.last7DaysMedianSpendUSD = f4;
}
if ((i & 128) == 0) {
this.last7DaysMeanSpendUSD = null;
} else {
this.last7DaysMeanSpendUSD = f5;
}
if ((i & 256) == 0) {
this.last30DaysTotalSpendUSD = null;
} else {
this.last30DaysTotalSpendUSD = f6;
}
if ((i & 512) == 0) {
this.last30DaysMedianSpendUSD = null;
} else {
this.last30DaysMedianSpendUSD = f7;
}
if ((i & 1024) == 0) {
this.last30DaysMeanSpendUSD = null;
} else {
this.last30DaysMeanSpendUSD = f8;
}
if ((i & 2048) == 0) {
this.last7DaysUserPltvUSD = null;
} else {
this.last7DaysUserPltvUSD = f9;
}
if ((i & 4096) == 0) {
this.last7DaysUserLtvUSD = null;
} else {
this.last7DaysUserLtvUSD = f10;
}
if ((i & 8192) == 0) {
this.last30DaysUserPltvUSD = null;
} else {
this.last30DaysUserPltvUSD = f11;
}
if ((i & 16384) == 0) {
this.last30DaysUserLtvUSD = null;
} else {
this.last30DaysUserLtvUSD = f12;
}
if ((32768 & i) == 0) {
this.last7DaysPlacementFillRate = null;
} else {
this.last7DaysPlacementFillRate = f13;
}
if ((i & 65536) == 0) {
this.last30DaysPlacementFillRate = null;
} else {
this.last30DaysPlacementFillRate = f14;
}
}
public static final void write$Self(Revenue self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.totalEarningsUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 0, FloatSerializer.INSTANCE, self.totalEarningsUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.earningsByPlacementUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 1, FloatSerializer.INSTANCE, self.earningsByPlacementUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.topNAdomain != null) {
output.encodeNullableSerializableElement(serialDesc, 2, new ArrayListSerializer(StringSerializer.INSTANCE), self.topNAdomain);
}
if (output.shouldEncodeElementDefault(serialDesc, 3) || self.isUserAPurchaser != null) {
output.encodeNullableSerializableElement(serialDesc, 3, BooleanSerializer.INSTANCE, self.isUserAPurchaser);
}
if (output.shouldEncodeElementDefault(serialDesc, 4) || self.isUserASubscriber != null) {
output.encodeNullableSerializableElement(serialDesc, 4, BooleanSerializer.INSTANCE, self.isUserASubscriber);
}
if (output.shouldEncodeElementDefault(serialDesc, 5) || self.last7DaysTotalSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 5, FloatSerializer.INSTANCE, self.last7DaysTotalSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 6) || self.last7DaysMedianSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 6, FloatSerializer.INSTANCE, self.last7DaysMedianSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 7) || self.last7DaysMeanSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 7, FloatSerializer.INSTANCE, self.last7DaysMeanSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 8) || self.last30DaysTotalSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 8, FloatSerializer.INSTANCE, self.last30DaysTotalSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 9) || self.last30DaysMedianSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 9, FloatSerializer.INSTANCE, self.last30DaysMedianSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 10) || self.last30DaysMeanSpendUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 10, FloatSerializer.INSTANCE, self.last30DaysMeanSpendUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 11) || self.last7DaysUserPltvUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 11, FloatSerializer.INSTANCE, self.last7DaysUserPltvUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 12) || self.last7DaysUserLtvUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 12, FloatSerializer.INSTANCE, self.last7DaysUserLtvUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 13) || self.last30DaysUserPltvUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 13, FloatSerializer.INSTANCE, self.last30DaysUserPltvUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 14) || self.last30DaysUserLtvUSD != null) {
output.encodeNullableSerializableElement(serialDesc, 14, FloatSerializer.INSTANCE, self.last30DaysUserLtvUSD);
}
if (output.shouldEncodeElementDefault(serialDesc, 15) || self.last7DaysPlacementFillRate != null) {
output.encodeNullableSerializableElement(serialDesc, 15, FloatSerializer.INSTANCE, self.last7DaysPlacementFillRate);
}
if (!output.shouldEncodeElementDefault(serialDesc, 16) && self.last30DaysPlacementFillRate == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 16, FloatSerializer.INSTANCE, self.last30DaysPlacementFillRate);
}
public final Revenue setTotalEarningsUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.totalEarningsUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setEarningsByPlacement(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.earningsByPlacementUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setTopNAdomain(List<String> list) {
this.topNAdomain = list != null ? CollectionsKt___CollectionsKt.toMutableList((Collection) list) : null;
return this;
}
public final Revenue setIsUserAPurchaser(boolean z) {
this.isUserAPurchaser = Boolean.valueOf(z);
return this;
}
public final Revenue setIsUserASubscriber(boolean z) {
this.isUserASubscriber = Boolean.valueOf(z);
return this;
}
public final Revenue setLast7DaysMedianSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last7DaysMedianSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast7DaysTotalSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last7DaysTotalSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysTotalSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last30DaysTotalSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast7DaysMeanSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last7DaysMeanSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysMedianSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last30DaysMedianSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysMeanSpendUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last30DaysMeanSpendUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast7DaysUserPltvUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last7DaysUserPltvUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast7DaysUserLtvUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last7DaysUserLtvUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysUserPltvUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last30DaysUserPltvUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysUserLtvUsd(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.last30DaysUserLtvUSD = Float.valueOf(f);
}
return this;
}
public final Revenue setLast7DaysPlacementFillRate(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.last7DaysPlacementFillRate = Float.valueOf(f);
}
return this;
}
public final Revenue setLast30DaysPlacementFillRate(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.last30DaysPlacementFillRate = Float.valueOf(f);
}
return this;
}
}

View File

@@ -0,0 +1,204 @@
package com.vungle.ads.fpd;
import com.facebook.internal.NativeProtocol;
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.FloatSerializer;
import kotlinx.serialization.internal.GeneratedSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.PluginGeneratedSerialDescriptor;
import kotlinx.serialization.internal.StringSerializer;
/* loaded from: classes4.dex */
public final class SessionContext$$serializer implements GeneratedSerializer<SessionContext> {
public static final SessionContext$$serializer INSTANCE;
public static final /* synthetic */ SerialDescriptor descriptor;
public SerialDescriptor getDescriptor() {
return descriptor;
}
static {
SessionContext$$serializer sessionContext$$serializer = new SessionContext$$serializer();
INSTANCE = sessionContext$$serializer;
SerialDescriptor pluginGeneratedSerialDescriptor = new PluginGeneratedSerialDescriptor("com.vungle.ads.fpd.SessionContext", sessionContext$$serializer, 12);
pluginGeneratedSerialDescriptor.addElement("level_percentile", true);
pluginGeneratedSerialDescriptor.addElement("page", true);
pluginGeneratedSerialDescriptor.addElement("time_spent", true);
pluginGeneratedSerialDescriptor.addElement("signup_date", true);
pluginGeneratedSerialDescriptor.addElement("user_score_percentile", true);
pluginGeneratedSerialDescriptor.addElement("user_id", true);
pluginGeneratedSerialDescriptor.addElement(NativeProtocol.AUDIENCE_FRIENDS, true);
pluginGeneratedSerialDescriptor.addElement("user_level_percentile", true);
pluginGeneratedSerialDescriptor.addElement("health_percentile", true);
pluginGeneratedSerialDescriptor.addElement("session_start_time", true);
pluginGeneratedSerialDescriptor.addElement("session_duration", true);
pluginGeneratedSerialDescriptor.addElement("in_game_purchases_usd", true);
descriptor = pluginGeneratedSerialDescriptor;
}
private SessionContext$$serializer() {
}
public KSerializer<?>[] childSerializers() {
return new KSerializer[]{BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(StringSerializer.INSTANCE), BuiltinSerializersKt.getNullable(new ArrayListSerializer(StringSerializer.INSTANCE)), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(IntSerializer.INSTANCE), BuiltinSerializersKt.getNullable(FloatSerializer.INSTANCE)};
}
/* renamed from: deserialize, reason: merged with bridge method [inline-methods] */
public SessionContext m3834deserialize(Decoder decoder) {
Object obj;
int i;
Object obj2;
Object obj3;
Object obj4;
Object obj5;
Object obj6;
Object obj7;
Object obj8;
Object obj9;
Object obj10;
Object obj11;
Object obj12;
Object obj13;
Intrinsics.checkNotNullParameter(decoder, "decoder");
SerialDescriptor descriptor2 = getDescriptor();
CompositeDecoder beginStructure = decoder.beginStructure(descriptor2);
Object obj14 = null;
if (beginStructure.decodeSequentially()) {
obj2 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, FloatSerializer.INSTANCE, (Object) null);
obj12 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, (Object) null);
obj6 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, (Object) null);
obj11 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, (Object) null);
obj5 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, FloatSerializer.INSTANCE, (Object) null);
obj10 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, StringSerializer.INSTANCE, (Object) null);
obj4 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, new ArrayListSerializer(StringSerializer.INSTANCE), (Object) null);
obj9 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, FloatSerializer.INSTANCE, (Object) null);
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 8, FloatSerializer.INSTANCE, (Object) null);
obj8 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, IntSerializer.INSTANCE, (Object) null);
obj3 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, (Object) null);
obj7 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, FloatSerializer.INSTANCE, (Object) null);
i = 4095;
} else {
boolean z = true;
int i2 = 0;
Object obj15 = null;
Object obj16 = null;
Object obj17 = null;
obj = null;
Object obj18 = null;
Object obj19 = null;
Object obj20 = null;
Object obj21 = null;
Object obj22 = null;
Object obj23 = null;
Object obj24 = null;
while (z) {
int decodeElementIndex = beginStructure.decodeElementIndex(descriptor2);
switch (decodeElementIndex) {
case -1:
z = false;
obj14 = obj14;
obj15 = obj15;
case 0:
i2 |= 1;
obj14 = beginStructure.decodeNullableSerializableElement(descriptor2, 0, FloatSerializer.INSTANCE, obj14);
obj15 = obj15;
case 1:
obj13 = obj14;
obj15 = beginStructure.decodeNullableSerializableElement(descriptor2, 1, StringSerializer.INSTANCE, obj15);
i2 |= 2;
obj14 = obj13;
case 2:
obj13 = obj14;
obj24 = beginStructure.decodeNullableSerializableElement(descriptor2, 2, IntSerializer.INSTANCE, obj24);
i2 |= 4;
obj14 = obj13;
case 3:
obj13 = obj14;
obj23 = beginStructure.decodeNullableSerializableElement(descriptor2, 3, IntSerializer.INSTANCE, obj23);
i2 |= 8;
obj14 = obj13;
case 4:
obj13 = obj14;
obj22 = beginStructure.decodeNullableSerializableElement(descriptor2, 4, FloatSerializer.INSTANCE, obj22);
i2 |= 16;
obj14 = obj13;
case 5:
obj13 = obj14;
obj19 = beginStructure.decodeNullableSerializableElement(descriptor2, 5, StringSerializer.INSTANCE, obj19);
i2 |= 32;
obj14 = obj13;
case 6:
obj13 = obj14;
obj21 = beginStructure.decodeNullableSerializableElement(descriptor2, 6, new ArrayListSerializer(StringSerializer.INSTANCE), obj21);
i2 |= 64;
obj14 = obj13;
case 7:
obj13 = obj14;
obj18 = beginStructure.decodeNullableSerializableElement(descriptor2, 7, FloatSerializer.INSTANCE, obj18);
i2 |= 128;
obj14 = obj13;
case 8:
obj13 = obj14;
obj = beginStructure.decodeNullableSerializableElement(descriptor2, 8, FloatSerializer.INSTANCE, obj);
i2 |= 256;
obj14 = obj13;
case 9:
obj13 = obj14;
obj17 = beginStructure.decodeNullableSerializableElement(descriptor2, 9, IntSerializer.INSTANCE, obj17);
i2 |= 512;
obj14 = obj13;
case 10:
obj20 = beginStructure.decodeNullableSerializableElement(descriptor2, 10, IntSerializer.INSTANCE, obj20);
i2 |= 1024;
obj14 = obj14;
case 11:
obj13 = obj14;
obj16 = beginStructure.decodeNullableSerializableElement(descriptor2, 11, FloatSerializer.INSTANCE, obj16);
i2 |= 2048;
obj14 = obj13;
default:
throw new UnknownFieldException(decodeElementIndex);
}
}
Object obj25 = obj15;
Object obj26 = obj14;
i = i2;
obj2 = obj26;
obj3 = obj20;
obj4 = obj21;
obj5 = obj22;
obj6 = obj24;
obj7 = obj16;
obj8 = obj17;
obj9 = obj18;
obj10 = obj19;
obj11 = obj23;
obj12 = obj25;
}
beginStructure.endStructure(descriptor2);
return new SessionContext(i, (Float) obj2, (String) obj12, (Integer) obj6, (Integer) obj11, (Float) obj5, (String) obj10, (List) obj4, (Float) obj9, (Float) obj, (Integer) obj8, (Integer) obj3, (Float) obj7, null);
}
public void serialize(Encoder encoder, SessionContext value) {
Intrinsics.checkNotNullParameter(encoder, "encoder");
Intrinsics.checkNotNullParameter(value, "value");
SerialDescriptor descriptor2 = getDescriptor();
CompositeEncoder beginStructure = encoder.beginStructure(descriptor2);
SessionContext.write$Self(value, beginStructure, descriptor2);
beginStructure.endStructure(descriptor2);
}
public KSerializer<?>[] typeParametersSerializers() {
return GeneratedSerializer.DefaultImpls.typeParametersSerializers(this);
}
}

View File

@@ -0,0 +1,279 @@
package com.vungle.ads.fpd;
import com.facebook.internal.NativeProtocol;
import com.vungle.ads.internal.util.RangeUtil;
import java.util.Collection;
import java.util.List;
import kotlin.collections.CollectionsKt___CollectionsKt;
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.ArrayListSerializer;
import kotlinx.serialization.internal.FloatSerializer;
import kotlinx.serialization.internal.IntSerializer;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
@Serializable
/* loaded from: classes4.dex */
public final class SessionContext {
public static final Companion Companion = new Companion(null);
private List<String> friends;
private Float healthPercentile;
private Float inGamePurchasesUSD;
private Float levelPercentile;
private String page;
private Integer sessionDuration;
private Integer sessionStartTime;
private Integer signupDate;
private Integer timeSpent;
private String userID;
private Float userLevelPercentile;
private Float userScorePercentile;
@SerialName(NativeProtocol.AUDIENCE_FRIENDS)
private static /* synthetic */ void getFriends$annotations() {
}
@SerialName("health_percentile")
private static /* synthetic */ void getHealthPercentile$annotations() {
}
@SerialName("in_game_purchases_usd")
private static /* synthetic */ void getInGamePurchasesUSD$annotations() {
}
@SerialName("level_percentile")
private static /* synthetic */ void getLevelPercentile$annotations() {
}
@SerialName("page")
private static /* synthetic */ void getPage$annotations() {
}
@SerialName("session_duration")
private static /* synthetic */ void getSessionDuration$annotations() {
}
@SerialName("session_start_time")
private static /* synthetic */ void getSessionStartTime$annotations() {
}
@SerialName("signup_date")
private static /* synthetic */ void getSignupDate$annotations() {
}
@SerialName("time_spent")
private static /* synthetic */ void getTimeSpent$annotations() {
}
@SerialName("user_id")
private static /* synthetic */ void getUserID$annotations() {
}
@SerialName("user_level_percentile")
private static /* synthetic */ void getUserLevelPercentile$annotations() {
}
@SerialName("user_score_percentile")
private static /* synthetic */ void getUserScorePercentile$annotations() {
}
public final SessionContext setPage(String page) {
Intrinsics.checkNotNullParameter(page, "page");
this.page = page;
return this;
}
public final SessionContext setUserID(String userID) {
Intrinsics.checkNotNullParameter(userID, "userID");
this.userID = userID;
return this;
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final KSerializer<SessionContext> serializer() {
return SessionContext$$serializer.INSTANCE;
}
}
public SessionContext() {
}
public /* synthetic */ SessionContext(int i, @SerialName("level_percentile") Float f, @SerialName("page") String str, @SerialName("time_spent") Integer num, @SerialName("signup_date") Integer num2, @SerialName("user_score_percentile") Float f2, @SerialName("user_id") String str2, @SerialName("friends") List list, @SerialName("user_level_percentile") Float f3, @SerialName("health_percentile") Float f4, @SerialName("session_start_time") Integer num3, @SerialName("session_duration") Integer num4, @SerialName("in_game_purchases_usd") Float f5, SerializationConstructorMarker serializationConstructorMarker) {
if ((i & 1) == 0) {
this.levelPercentile = null;
} else {
this.levelPercentile = f;
}
if ((i & 2) == 0) {
this.page = null;
} else {
this.page = str;
}
if ((i & 4) == 0) {
this.timeSpent = null;
} else {
this.timeSpent = num;
}
if ((i & 8) == 0) {
this.signupDate = null;
} else {
this.signupDate = num2;
}
if ((i & 16) == 0) {
this.userScorePercentile = null;
} else {
this.userScorePercentile = f2;
}
if ((i & 32) == 0) {
this.userID = null;
} else {
this.userID = str2;
}
if ((i & 64) == 0) {
this.friends = null;
} else {
this.friends = list;
}
if ((i & 128) == 0) {
this.userLevelPercentile = null;
} else {
this.userLevelPercentile = f3;
}
if ((i & 256) == 0) {
this.healthPercentile = null;
} else {
this.healthPercentile = f4;
}
if ((i & 512) == 0) {
this.sessionStartTime = null;
} else {
this.sessionStartTime = num3;
}
if ((i & 1024) == 0) {
this.sessionDuration = null;
} else {
this.sessionDuration = num4;
}
if ((i & 2048) == 0) {
this.inGamePurchasesUSD = null;
} else {
this.inGamePurchasesUSD = f5;
}
}
public static final void write$Self(SessionContext self, CompositeEncoder output, SerialDescriptor serialDesc) {
Intrinsics.checkNotNullParameter(self, "self");
Intrinsics.checkNotNullParameter(output, "output");
Intrinsics.checkNotNullParameter(serialDesc, "serialDesc");
if (output.shouldEncodeElementDefault(serialDesc, 0) || self.levelPercentile != null) {
output.encodeNullableSerializableElement(serialDesc, 0, FloatSerializer.INSTANCE, self.levelPercentile);
}
if (output.shouldEncodeElementDefault(serialDesc, 1) || self.page != null) {
output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.page);
}
if (output.shouldEncodeElementDefault(serialDesc, 2) || self.timeSpent != null) {
output.encodeNullableSerializableElement(serialDesc, 2, IntSerializer.INSTANCE, self.timeSpent);
}
if (output.shouldEncodeElementDefault(serialDesc, 3) || self.signupDate != null) {
output.encodeNullableSerializableElement(serialDesc, 3, IntSerializer.INSTANCE, self.signupDate);
}
if (output.shouldEncodeElementDefault(serialDesc, 4) || self.userScorePercentile != null) {
output.encodeNullableSerializableElement(serialDesc, 4, FloatSerializer.INSTANCE, self.userScorePercentile);
}
if (output.shouldEncodeElementDefault(serialDesc, 5) || self.userID != null) {
output.encodeNullableSerializableElement(serialDesc, 5, StringSerializer.INSTANCE, self.userID);
}
if (output.shouldEncodeElementDefault(serialDesc, 6) || self.friends != null) {
output.encodeNullableSerializableElement(serialDesc, 6, new ArrayListSerializer(StringSerializer.INSTANCE), self.friends);
}
if (output.shouldEncodeElementDefault(serialDesc, 7) || self.userLevelPercentile != null) {
output.encodeNullableSerializableElement(serialDesc, 7, FloatSerializer.INSTANCE, self.userLevelPercentile);
}
if (output.shouldEncodeElementDefault(serialDesc, 8) || self.healthPercentile != null) {
output.encodeNullableSerializableElement(serialDesc, 8, FloatSerializer.INSTANCE, self.healthPercentile);
}
if (output.shouldEncodeElementDefault(serialDesc, 9) || self.sessionStartTime != null) {
output.encodeNullableSerializableElement(serialDesc, 9, IntSerializer.INSTANCE, self.sessionStartTime);
}
if (output.shouldEncodeElementDefault(serialDesc, 10) || self.sessionDuration != null) {
output.encodeNullableSerializableElement(serialDesc, 10, IntSerializer.INSTANCE, self.sessionDuration);
}
if (!output.shouldEncodeElementDefault(serialDesc, 11) && self.inGamePurchasesUSD == null) {
return;
}
output.encodeNullableSerializableElement(serialDesc, 11, FloatSerializer.INSTANCE, self.inGamePurchasesUSD);
}
public final SessionContext setLevelPercentile(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.levelPercentile = Float.valueOf(f);
}
return this;
}
public final SessionContext setTimeSpent(int i) {
this.timeSpent = Integer.valueOf(i);
return this;
}
public final SessionContext setSignupDate(int i) {
this.signupDate = Integer.valueOf(i);
return this;
}
public final SessionContext setUserScorePercentile(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.userScorePercentile = Float.valueOf(f);
}
return this;
}
public final SessionContext setFriends(List<String> list) {
this.friends = list != null ? CollectionsKt___CollectionsKt.toMutableList((Collection) list) : null;
return this;
}
public final SessionContext setUserLevelPercentile(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.userLevelPercentile = Float.valueOf(f);
}
return this;
}
public final SessionContext setHealthPercentile(float f) {
if (RangeUtil.INSTANCE.isInRange(f, 0.0f, 100.0f)) {
this.healthPercentile = Float.valueOf(f);
}
return this;
}
public final SessionContext setSessionStartTime(int i) {
this.sessionStartTime = Integer.valueOf(i);
return this;
}
public final SessionContext setSessionDuration(int i) {
this.sessionDuration = Integer.valueOf(i);
return this;
}
public final SessionContext setInGamePurchasesUSD(float f) {
if (RangeUtil.isInRange$default(RangeUtil.INSTANCE, f, 0.0f, 0.0f, 4, (Object) null)) {
this.inGamePurchasesUSD = Float.valueOf(f);
}
return this;
}
}

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

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