Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 gl.java 源代码,内容仅作参考
package com.inmobi.media;
import com.inmobi.commons.utils.json.Constructor;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
public class gl extends fz {
private static final long DEFAULT_EXPIRY = 86400;
private static final String DEFAULT_FALLBACK_URL = "https://config.inmobi.com/config-server/v1/config/secure.cfg";
private static final int DEFAULT_MAX_RETRIES = 3;
private static final int DEFAULT_RETRY_INTERVAL = 60;
private static final String DEFAULT_URL = "";
private static final int DEFAULT_WAIT_TIME = 3;
private static final Object sAcquisitionLock = new Object();
private List<a> components;
private b gdpr;
c latestSdkInfo;
private int maxRetries;
private boolean monetizationDisabled;
private int retryInterval;
int waitTime;
public static final class b {
boolean transmitRequest = true;
}
public static final class c {
String version = ig.b();
String url = ig.e();
}
@Override
public String b() {
return "root";
}
public static jc<gl> a() {
return new jc().a(new jh("components", gl.class), (jg) new je(new Constructor<List<a>>() {
@Override
public final List<a> construct() {
return new ArrayList();
}
}, a.class));
}
public gl(String str) {
super(str);
this.maxRetries = 3;
this.retryInterval = 60;
this.waitTime = 3;
this.monetizationDisabled = false;
this.components = new ArrayList();
this.latestSdkInfo = new c();
this.gdpr = new b();
}
public boolean a(gl glVar) {
return ((g() == null && glVar.g() == null) || (g() != null && g().equals(glVar.g()))) && glVar.maxRetries == this.maxRetries && glVar.retryInterval == this.retryInterval && glVar.waitTime == this.waitTime && glVar.monetizationDisabled == this.monetizationDisabled;
}
@Override
public JSONObject c() {
return a().a((jc<gl>) this);
}
@Override
public boolean d() {
if (this.components == null || this.maxRetries < 0 || this.retryInterval < 0 || this.waitTime < 0 || this.latestSdkInfo.version.trim().length() == 0 || (!this.latestSdkInfo.url.startsWith("http://") && !this.latestSdkInfo.url.startsWith("https://"))) {
return false;
}
synchronized (sAcquisitionLock) {
for (int i = 0; i < this.components.size(); i++) {
a aVar = this.components.get(i);
if (aVar.type != null && Long.valueOf(aVar.expiry) != null) {
if (aVar.type.trim().length() == 0) {
return false;
}
if (aVar.expiry >= 0 && aVar.expiry <= 864000) {
if (c(aVar.url)) {
return false;
}
if ("root".equals(aVar.type) && c(aVar.fallbackUrl)) {
return false;
}
}
return false;
}
return false;
}
return this.gdpr != null;
}
}
private static boolean c(String str) {
if (str == null || str.trim().length() == 0) {
return true;
}
return (str.startsWith("http://") || str.startsWith("https://")) ? false : true;
}
public long a(String str) {
synchronized (sAcquisitionLock) {
for (int i = 0; i < this.components.size(); i++) {
a aVar = this.components.get(i);
if (str.equals(aVar.type)) {
return aVar.expiry;
}
}
return DEFAULT_EXPIRY;
}
}
public int e() {
return this.maxRetries;
}
public int h() {
return this.retryInterval;
}
public boolean i() {
return this.monetizationDisabled;
}
public boolean j() {
b bVar = this.gdpr;
return bVar == null || bVar.transmitRequest;
}
public String b(String str) {
synchronized (sAcquisitionLock) {
for (int i = 0; i < this.components.size(); i++) {
a aVar = this.components.get(i);
if (str.equals(aVar.type)) {
return aVar.url;
}
}
return "";
}
}
public final String k() {
synchronized (sAcquisitionLock) {
for (a aVar : this.components) {
if ("root".equals(aVar.type)) {
return aVar.fallbackUrl;
}
}
return DEFAULT_FALLBACK_URL;
}
}
public static final class a {
long expiry;
String fallbackUrl = gl.DEFAULT_FALLBACK_URL;
String type;
String url;
}
}