Files
rr3-apk/decompiled/sources/com/applovin/mediation/MaxAdFormat.java
Daniel Elliott f9d20bb3fc 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>
2026-02-18 14:52:23 -08:00

113 lines
3.7 KiB
Java

package com.applovin.mediation;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import com.applovin.impl.af;
import com.applovin.impl.sdk.n;
import com.applovin.sdk.AppLovinSdkUtils;
import com.ironsource.mediationsdk.l;
import com.vungle.ads.internal.Constants;
import com.vungle.ads.internal.protos.Sdk;
/* loaded from: classes2.dex */
public class MaxAdFormat {
private final String a;
private final String b;
public static final MaxAdFormat BANNER = new MaxAdFormat(l.a, "Banner");
public static final MaxAdFormat MREC = new MaxAdFormat("MREC", "MREC");
public static final MaxAdFormat LEADER = new MaxAdFormat("LEADER", "Leader");
public static final MaxAdFormat INTERSTITIAL = new MaxAdFormat("INTER", "Interstitial");
public static final MaxAdFormat APP_OPEN = new MaxAdFormat("APPOPEN", "App Open");
public static final MaxAdFormat REWARDED = new MaxAdFormat("REWARDED", "Rewarded");
public static final MaxAdFormat REWARDED_INTERSTITIAL = new MaxAdFormat("REWARDED_INTER", "Rewarded Interstitial");
public static final MaxAdFormat NATIVE = new MaxAdFormat("NATIVE", "Native");
private MaxAdFormat(String str, String str2) {
this.a = str;
this.b = str2;
}
@Nullable
public static MaxAdFormat formatFromString(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
if (str.equalsIgnoreCase("banner")) {
return BANNER;
}
if (str.equalsIgnoreCase("mrec")) {
return MREC;
}
if (str.equalsIgnoreCase("native")) {
return NATIVE;
}
if (str.equalsIgnoreCase("leaderboard") || str.equalsIgnoreCase("leader")) {
return LEADER;
}
if (str.equalsIgnoreCase("interstitial") || str.equalsIgnoreCase("inter")) {
return INTERSTITIAL;
}
if (str.equalsIgnoreCase(Constants.PLACEMENT_TYPE_APP_OPEN) || str.equalsIgnoreCase("app_open")) {
return APP_OPEN;
}
if (str.equalsIgnoreCase("rewarded") || str.equalsIgnoreCase("reward")) {
return REWARDED;
}
if (str.equalsIgnoreCase("rewarded_inter") || str.equalsIgnoreCase("rewarded_interstitial")) {
return REWARDED_INTERSTITIAL;
}
n.h("AppLovinSdk", "Unknown ad format: " + str);
return null;
}
public AppLovinSdkUtils.Size getAdaptiveSize(Context context) {
return getAdaptiveSize(-1, context);
}
@Deprecated
public String getDisplayName() {
return this.b;
}
public String getLabel() {
return this.a;
}
public boolean isAdViewAd() {
return this == BANNER || this == MREC || this == LEADER;
}
public boolean isBannerOrLeaderAd() {
return this == BANNER || this == LEADER;
}
public boolean isFullscreenAd() {
return this == INTERSTITIAL || this == APP_OPEN || this == REWARDED || this == REWARDED_INTERSTITIAL;
}
public String toString() {
return "MaxAdFormat{label='" + this.a + "'}";
}
public AppLovinSdkUtils.Size getSize() {
if (this == BANNER) {
return new AppLovinSdkUtils.Size(Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 50);
}
if (this == LEADER) {
return new AppLovinSdkUtils.Size(728, 90);
}
if (this == MREC) {
return new AppLovinSdkUtils.Size(300, 250);
}
return new AppLovinSdkUtils.Size(0, 0);
}
public AppLovinSdkUtils.Size getAdaptiveSize(int i, Context context) {
if (this != BANNER && this != LEADER) {
return getSize();
}
return af.a(i, this, context);
}
}