Perfume Of Love v2.14.9版本的 MD5 值为:16011aefc5a55805771706ce3b259b4e
以下内容为反编译后的 AdConfig.java 源代码,内容仅作参考
package com.inmobi.commons.core.configs;
import android.graphics.Color;
import android.text.TextUtils;
import com.inmobi.commons.utils.json.Constructor;
import com.inmobi.media.fw;
import com.inmobi.media.iz;
import com.inmobi.media.jb;
import com.inmobi.media.jc;
import com.inmobi.media.jd;
import com.inmobi.media.je;
import com.inmobi.media.ke;
import com.mbridge.msdk.foundation.entity.CampaignUnit;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
public final class AdConfig extends fw {
private static final String ALLOWED_CONTENT_TYPE = "allowedContentType";
private static final String DEFAULT_AD_SERVER_URL = "https://ads.inmobi.com/sdk";
private static final boolean DEFAULT_CCT_ENABLED = true;
public static final int DEFAULT_CONTEXTUAL_DATA_EXPIRY_TIME = 86400;
public static final int DEFAULT_CONTEXTUAL_DATA_MAX_RECORDS = 1;
public static final List<String> DEFAULT_CONTEXTUAL_DATA_SKIP_FIELDS = Collections.emptyList();
private static final int DEFAULT_FETCH_TIMEOUT = 60;
private static final int DEFAULT_MAX_POOL_SIZE = 10;
private static final int DEFAULT_MINIMUM_REFRESH_INTERVAL = 20;
private static final int DEFAULT_REFRESH_INTERVAL = 60;
private static final String GESTURE_LIST = "gestures";
private static final String SKIP_FIELDS = "skipFields";
private static final String TAG = "AdConfig";
public a assetCache;
private Map<String, d> cache;
public boolean cctEnabled;
public ContextualDataConfig contextualData;
public int defaultRefreshInterval;
public int fetchTimeout;
public e imai;
public int maxPoolSize;
public int minimumRefreshInterval;
public g mraid;
public i rendering;
public ke timeouts;
public String url;
public k vastVideo;
public m viewability;
public static final class a {
public int maxRetries = 3;
public int retryInterval = 1;
int maxCachedAssets = 10;
public long maxCacheSize = 104857600;
public long timeToLive = 259200;
}
public static final class b {
public byte impressionType = 0;
}
public static final class c {
public boolean bitrate_mandatory = false;
public int headerTimeout = 2000;
}
public static final class e {
public int maxRetries = 3;
public int pingInterval = 60;
public int pingTimeout = 120;
public int maxDbEvents = 500;
public int maxEventBatch = 10;
public long pingCacheExpiry = 10800;
}
public static final class f {
public byte impressionType = 1;
}
public static final class g {
public long expiry = 432000;
public int maxRetries = 3;
public int retryInterval = 60;
public String url = "https://i.l.inmobicdn.net/sdk/sdk/500/android/mraid.js";
}
public static final class h {
public long expiry = 432000;
public int maxRetries = 3;
public int retryInterval = 60;
public String partnerKey = "Inmobi";
public String url = "https://i.l.inmobicdn.net/sdk/sdk/OMID/omsdk-v1.3.17.js";
public boolean omidEnabled = true;
public long webViewRetainTime = 1000;
}
public static final class j {
long maxSaveSize = 5242880;
List<String> allowedContentType = new ArrayList(Collections.singletonList(MimeTypes.VIDEO_MP4));
}
public static final class l {
public int impressionMinPercentageViewed = 50;
public int impressionMinTimeViewed = 2000;
public int videoMinPercentagePlay = 50;
}
public static final class n {
public int impressionMinPercentageViewed = 50;
public int impressionMinTimeViewed = 1000;
public int impressionPollIntervalMillis = 1000;
}
@Override
public final String b() {
return CampaignUnit.JSON_KEY_ADS;
}
public static iz<AdConfig> a() {
return new iz().a(new je("cache", AdConfig.class), (jd) new jc(new Constructor<Map<String, d>>() {
@Override
public final Map<String, d> construct() {
return new HashMap();
}
}, d.class)).a(new je(ALLOWED_CONTENT_TYPE, j.class), (jd) new jb(new Constructor<List<String>>() {
@Override
public final List<String> construct() {
return new ArrayList();
}
}, String.class)).a(new je(ALLOWED_CONTENT_TYPE, k.class), (jd) new jb(new Constructor<List<String>>() {
@Override
public final List<String> construct() {
return new ArrayList();
}
}, String.class)).a(new je(GESTURE_LIST, i.class), (jd) new jb(new Constructor<List<Integer>>() {
@Override
public final List<Integer> construct() {
return new ArrayList();
}
}, Integer.class)).a(new je(SKIP_FIELDS, ContextualDataConfig.class), (jd) new jb(new Constructor<List<String>>() {
@Override
public final List<String> construct() {
return new ArrayList();
}
}, String.class));
}
public AdConfig(String str) {
super(str);
this.maxPoolSize = 10;
this.url = DEFAULT_AD_SERVER_URL;
this.minimumRefreshInterval = 20;
this.defaultRefreshInterval = 60;
this.fetchTimeout = 60;
this.cctEnabled = true;
this.timeouts = ke.a();
this.imai = new e();
this.rendering = new i();
this.mraid = new g();
this.viewability = new m();
this.vastVideo = new k();
this.assetCache = new a();
this.contextualData = new ContextualDataConfig();
HashMap hashMap = new HashMap();
this.cache = hashMap;
hashMap.put("base", new d());
this.cache.put("banner", new d());
this.cache.put("int", new d());
this.cache.put("native", new d());
}
@Override
public final JSONObject c() {
return a().a((iz<AdConfig>) this);
}
@Override
public final boolean d() {
int i2;
int i3;
boolean z;
boolean z2;
if (this.maxPoolSize <= 0) {
return false;
}
this.timeouts.j();
if ((this.url.startsWith("http://") || this.url.startsWith("https://")) && (i2 = this.minimumRefreshInterval) >= 0 && (i3 = this.defaultRefreshInterval) >= 0 && i2 <= i3 && this.fetchTimeout > 0) {
Iterator<Map.Entry<String, d>> it = this.cache.entrySet().iterator();
do {
z = true;
if (it.hasNext()) {
if (it.next().getValue().timeToLive < 0) {
z = false;
continue;
}
} else if (this.imai.maxDbEvents >= 0 && this.imai.maxEventBatch >= 0 && this.imai.maxRetries >= 0 && this.imai.pingInterval >= 0 && this.imai.pingTimeout > 0 && this.imai.pingCacheExpiry > 0 && this.mraid.expiry >= 0 && this.mraid.retryInterval >= 0 && this.mraid.maxRetries >= 0 && ((this.mraid.url.startsWith("http://") || this.mraid.url.startsWith("https://")) && this.timeouts.h() >= 0 && this.timeouts.b() >= 0 && this.timeouts.c() >= 0 && this.timeouts.d() >= 0 && this.timeouts.e() >= 0 && this.timeouts.f() >= 0 && this.timeouts.g() >= 0 && this.timeouts.i() >= 0 && this.rendering.picHeight >= 0 && this.rendering.picWidth >= 0 && this.rendering.picQuality >= 0 && this.rendering.maxVibrationDuration >= 0 && this.rendering.maxVibrationPatternLength >= 0 && this.rendering.savecontent.maxSaveSize >= 0 && this.rendering.webviewBackground != null && this.rendering.webviewBackground.trim().length() != 0 && this.rendering.delayedRedirection > 0 && this.rendering.userTouchResetTime >= 0 && !this.rendering.gestures.isEmpty())) {
try {
Color.parseColor(this.rendering.webviewBackground);
if (this.mraid.maxRetries >= 0 && this.mraid.retryInterval >= 0 && this.mraid.url != null && this.mraid.url.trim().length() != 0) {
if (this.viewability.impressionMinPercentageViewed > 0 && this.viewability.impressionMinPercentageViewed <= 100 && this.viewability.impressionMinTimeViewed >= 0 && this.viewability.displayMinPercentageAnimate > 0 && this.viewability.displayMinPercentageAnimate <= 100 && this.viewability.video.impressionMinPercentageViewed > 0 && this.viewability.video.impressionMinPercentageViewed <= 100 && this.viewability.web.impressionMinPercentageViewed > 0 && this.viewability.web.impressionMinPercentageViewed <= 100 && this.viewability.web.impressionPollIntervalMillis > 0 && this.viewability.web.impressionMinTimeViewed >= 0 && this.viewability.video.impressionMinTimeViewed >= 0 && this.viewability.video.videoMinPercentagePlay > 0 && this.viewability.video.videoMinPercentagePlay <= 100 && this.viewability.visibilityThrottleMillis >= 50 && this.viewability.visibilityThrottleMillis * 5 <= this.viewability.impressionMinTimeViewed && this.viewability.impressionPollIntervalMillis >= 50 && this.viewability.impressionPollIntervalMillis * 4 <= this.viewability.impressionMinTimeViewed) {
h hVar = this.viewability.omidConfig;
if (!(hVar == null || hVar.maxRetries < 0 || hVar.retryInterval < 0 || hVar.url == null || hVar.url.trim().length() == 0 || TextUtils.isEmpty(hVar.partnerKey))) {
z2 = false;
if (!z2 && this.vastVideo.optimalVastVideoSize <= 31457280 && this.vastVideo.optimalVastVideoSize > 0 && this.vastVideo.maxWrapperLimit >= 0 && this.vastVideo.vastMaxAssetSize > 0 && this.vastVideo.vastMaxAssetSize <= 31457280 && this.contextualData.isValid() && this.assetCache.retryInterval >= 0 && this.assetCache.maxCachedAssets <= 20 && this.assetCache.maxCachedAssets >= 0 && this.assetCache.timeToLive >= 0 && this.assetCache.maxCacheSize >= 0 && this.assetCache.maxRetries >= 0) {
}
}
}
z2 = true;
return !z2;
}
} catch (IllegalArgumentException unused) {
}
}
} while (z);
return false;
}
return false;
}
public final d a(String str) {
d dVar = this.cache.get(str);
if (dVar == null) {
d dVar2 = this.cache.get("base");
return dVar2 == null ? new d() : dVar2;
}
return dVar;
}
public static final class ContextualDataConfig {
private int expiryTime;
private int maxAdRecords;
private List<String> skipFields;
private ContextualDataConfig() {
this.skipFields = AdConfig.DEFAULT_CONTEXTUAL_DATA_SKIP_FIELDS;
this.expiryTime = AdConfig.DEFAULT_CONTEXTUAL_DATA_EXPIRY_TIME;
this.maxAdRecords = 1;
}
public final int getMaxAdRecords() {
return this.maxAdRecords;
}
public final List<String> getSkipFields() {
return this.skipFields;
}
public final int getExpiryTime() {
return this.expiryTime;
}
public final boolean isValid() {
return this.maxAdRecords >= 0 && this.expiryTime >= 0;
}
}
public static final class d {
public long timeToLive = 3300;
d() {
}
}
public static final class i {
static final short DEFAULT_NETWORK_LOAD_LIMIT = 50;
public static final int DEFAULT_TOUCH_RESET_TIME = 4;
public static final byte NETWORK_LOAD_LIMIT_DISABLED = -1;
int picWidth = 320;
int picHeight = 480;
int picQuality = 100;
String webviewBackground = "#00000000";
public boolean autoRedirectionEnforcement = true;
public long userTouchResetTime = 4;
int maxVibrationDuration = 5;
int maxVibrationPatternLength = 20;
private long delayedRedirection = 5;
j savecontent = new j();
public boolean shouldRenderPopup = false;
public boolean enablePubMuteControl = false;
public int bannerNetworkLoadsLimit = 50;
public int otherNetworkLoadsLimit = -1;
public List<Integer> gestures = new ArrayList(Arrays.asList(0, 1, 2, 3, 4, 5));
public final int a() {
try {
return Color.parseColor(this.webviewBackground);
} catch (IllegalArgumentException unused) {
String unused2 = AdConfig.TAG;
return Color.parseColor("#00000000");
}
}
}
public static final class m {
static final int MIN_IMPRESSION_POLL_INTERVAL_MILLIS = 50;
static final int MIN_VISIBILITY_THROTTLE_INTERVAL_MILLIS = 50;
public int impressionMinPercentageViewed = 50;
public int impressionMinTimeViewed = 1000;
public int visibilityThrottleMillis = 100;
public int impressionPollIntervalMillis = 250;
public int displayMinPercentageAnimate = 67;
public l video = new l();
public n web = new n();
public h omidConfig = new h();
public b banner = new b();
public f interstitial = new f();
private boolean moatEnabled = true;
public final String toString() {
return "ViewabilityConfig{impressionMinPercentageViewed=" + this.impressionMinPercentageViewed + ", impressionMinTimeViewed=" + this.impressionMinTimeViewed + ", visibilityThrottleMillis=" + this.visibilityThrottleMillis + ", impressionPollIntervalMillis=" + this.impressionPollIntervalMillis + ", displayMinPercentageAnimate=" + this.displayMinPercentageAnimate + ", video=" + this.video + ", web=" + this.web + ", omidConfig=" + this.omidConfig + ", banner=" + this.banner + ", interstitial=" + this.interstitial + ", moatEnabled=" + this.moatEnabled + '}';
}
}
public static final class k {
public int maxWrapperLimit = 3;
public long optimalVastVideoSize = 3145728;
public long vastMaxAssetSize = 31457280;
public c bitRate = new c();
public List<String> allowedContentType = new ArrayList(Arrays.asList(MimeTypes.VIDEO_MP4, "image/jpeg", "image/jpg", "image/gif", "image/png"));
}
}