Proxy Master v3.4.9版本的 MD5 值为:14d0aa2468d13530c8f6e96bcc114bf5
以下内容为反编译后的 f.java 源代码,内容仅作参考
package sg.bigo.ads.controller.a.a;
import android.os.Parcel;
import android.text.TextUtils;
import android.webkit.URLUtil;
import com.google.android.exoplayer2.text.ttml.TtmlNode;
import com.google.android.gms.common.internal.ImagesContract;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONObject;
import sg.bigo.ads.common.e;
import sg.bigo.ads.common.l;
import sg.bigo.ads.common.utils.k;
import sg.bigo.ads.controller.a.j;
public final class f extends g implements sg.bigo.ads.common.e {
public static final long f33325a = TimeUnit.HOURS.toMillis(2);
private long f33328e;
private List<a> f33327d = c();
private long f33326b = f33325a;
public static class a extends sg.bigo.ads.controller.a.a.a {
private static final e.a<a> f33335e = new e.a<a>() {
@Override
public final a a() {
return new a();
}
};
private String f33336f;
public a() {
}
public a(String str, String str2, boolean z6, String str3) {
super(str, str2, z6);
this.f33336f = str3;
}
@Override
public final void a(Parcel parcel) {
super.a(parcel);
parcel.writeString(this.f33336f);
}
@Override
public final void b(Parcel parcel) {
super.b(parcel);
this.f33336f = l.a(parcel, "");
}
}
private j b(final String str) {
synchronized (this) {
if (k.a((Collection) this.f33327d)) {
return null;
}
a aVar = (a) g.a(k.a(this.f33327d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 == null || !aVar3.f33285d || aVar3.f33409b || !TextUtils.equals(aVar3.f33336f, str)) ? 0 : 1;
}
}));
if (aVar != null) {
return aVar;
}
List a8 = k.a(this.f33327d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 != null && aVar3.f33285d && aVar3.f33409b && TextUtils.equals(aVar3.f33336f, str)) ? 1 : 0;
}
});
if (!k.a((Collection) a8)) {
return g.a(a8);
}
List a10 = k.a(this.f33327d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 == null || !aVar3.f33285d || aVar3.f33409b) ? 0 : 1;
}
});
if (!k.a((Collection) a10)) {
return g.a(a10);
}
a aVar2 = (a) g.a(k.a(this.f33327d, new Comparable<a>() {
@Override
public final int compareTo(a aVar3) {
a aVar4 = aVar3;
return (aVar4 != null && aVar4.f33285d && aVar4.f33409b) ? 1 : 0;
}
}));
if (aVar2 != null) {
return aVar2;
}
return null;
}
}
private static List<a> c() {
ArrayList arrayList = new ArrayList();
arrayList.add(new a("AWS", "https://ad-host-backup-asia.s3.ap-southeast-1.amazonaws.com/uni/v2/pu.pj", true, "asia"));
arrayList.add(new a("AWS", "https://ad-host-backup-europe.s3.eu-central-1.amazonaws.com/uni/v2/pu.pj", true, "europe"));
arrayList.add(new a("AWS", "https://ad-host-backup-america.s3.us-west-1.amazonaws.com/uni/v2/pu.pj", true, "america"));
return arrayList;
}
@Override
public final j a(String str) {
if (k.a((Collection) this.f33327d)) {
return null;
}
return b(sg.bigo.ads.controller.a.h.a(str));
}
@Override
public final void a(Parcel parcel) {
synchronized (this) {
parcel.writeLong(this.f33326b);
l.a(parcel, this.f33327d);
parcel.writeLong(this.f33328e);
}
}
public final void a(JSONObject jSONObject) {
synchronized (this) {
long max = Math.max(jSONObject.optLong("interval", f33325a / 1000) * 1000, g.f33337c);
List<a> c10 = c();
JSONArray optJSONArray = jSONObject.optJSONArray("urls");
if (optJSONArray != null) {
for (int i10 = 0; i10 < optJSONArray.length(); i10++) {
JSONObject optJSONObject = optJSONArray.optJSONObject(i10);
String optString = optJSONObject.optString("name", "");
String optString2 = optJSONObject.optString(ImagesContract.URL, "");
String optString3 = optJSONObject.optString(TtmlNode.TAG_REGION, "");
if (URLUtil.isNetworkUrl(optString2)) {
c10.add(new a(optString, optString2, false, optString3));
}
}
}
this.f33326b = max;
this.f33327d = c10;
}
}
public final boolean a() {
return Math.abs(System.currentTimeMillis() - this.f33328e) > this.f33326b;
}
public final void b() {
this.f33328e = System.currentTimeMillis();
synchronized (this) {
if (k.a((Collection) this.f33327d)) {
return;
}
for (a aVar : this.f33327d) {
aVar.f33285d = true;
}
}
}
@Override
public final void b(Parcel parcel) {
synchronized (this) {
this.f33326b = l.a(parcel, f33325a);
List<a> a8 = l.a(parcel, a.f33335e);
this.f33327d = a8;
if (k.a((Collection) a8)) {
this.f33327d = c();
}
this.f33328e = l.a(parcel, 0L);
}
}
}