正在查看: CallApp v2.226 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CallApp v2.226 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package sg.bigo.ads.controller.a.a;
import android.os.Parcel;
import android.text.TextUtils;
import android.webkit.URLUtil;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
import sg.bigo.ads.common.f;
import sg.bigo.ads.common.n;
import sg.bigo.ads.common.utils.r;
import sg.bigo.ads.controller.a.i;
import sg.bigo.ads.controller.a.k;
public final class f extends g implements sg.bigo.ads.common.f {
public static final long a = r.c.a(2);
private long e;
private List<a> d = c();
private long b = a;
public static class a extends sg.bigo.ads.controller.a.a.a {
private static final f.a<a> e = new f.a<a>() {
@Override
public final a a() {
return new a();
}
};
private String f;
public a() {
}
@Override
public final void b(@NonNull Parcel parcel) {
super.b(parcel);
this.f = n.a(parcel, "");
}
public a(String str, String str2, boolean z, String str3) {
super(str, str2, z);
this.f = str3;
}
@Override
public final void a(@NonNull Parcel parcel) {
super.a(parcel);
parcel.writeString(this.f);
}
}
@Nullable
private k b(final String str) {
k kVar;
synchronized (this) {
try {
if (!sg.bigo.ads.common.utils.k.a((Collection) this.d)) {
a aVar = (a) g.a(sg.bigo.ads.common.utils.k.a(this.d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 == null || !aVar3.d || aVar3.b || !TextUtils.equals(aVar3.f, str)) ? 0 : 1;
}
}));
if (aVar != null) {
return aVar;
}
List a2 = sg.bigo.ads.common.utils.k.a(this.d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 != null && aVar3.d && aVar3.b && TextUtils.equals(aVar3.f, str)) ? 1 : 0;
}
});
if (sg.bigo.ads.common.utils.k.a((Collection) a2)) {
List a3 = sg.bigo.ads.common.utils.k.a(this.d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 == null || !aVar3.d || aVar3.b) ? 0 : 1;
}
});
if (sg.bigo.ads.common.utils.k.a((Collection) a3)) {
kVar = (a) g.a(sg.bigo.ads.common.utils.k.a(this.d, new Comparable<a>() {
@Override
public final int compareTo(a aVar2) {
a aVar3 = aVar2;
return (aVar3 != null && aVar3.d && aVar3.b) ? 1 : 0;
}
}));
if (kVar != null) {
}
} else {
kVar = g.a((List<k>) a3);
}
} else {
kVar = g.a((List<k>) a2);
}
return kVar;
}
return null;
} finally {
}
}
}
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/au.pj", true, "asia"));
arrayList.add(new a("AWS", "https://ad-host-backup-europe.s3.eu-central-1.amazonaws.com/uni/v2/au.pj", true, "europe"));
arrayList.add(new a("AWS", "https://ad-host-backup-america.s3.us-west-1.amazonaws.com/uni/v2/au.pj", true, "america"));
return arrayList;
}
@Override
@Nullable
public final k a(String str) {
if (sg.bigo.ads.common.utils.k.a((Collection) this.d)) {
return null;
}
return b(i.a(str));
}
@Override
public final void a(@NonNull Parcel parcel) {
synchronized (this) {
parcel.writeLong(this.b);
n.a(parcel, this.d);
parcel.writeLong(this.e);
}
}
public final void b() {
this.e = System.currentTimeMillis();
synchronized (this) {
try {
if (!sg.bigo.ads.common.utils.k.a((Collection) this.d)) {
Iterator<a> it = this.d.iterator();
while (it.hasNext()) {
it.next().d = true;
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final void a(@NonNull JSONObject jSONObject) {
synchronized (this) {
try {
long max = Math.max(jSONObject.optLong("interval", a / 1000) * 1000, g.c);
List<a> c = c();
JSONArray optJSONArray = jSONObject.optJSONArray("urls");
if (optJSONArray != null) {
for (int i = 0; i < optJSONArray.length(); i++) {
JSONObject optJSONObject = optJSONArray.optJSONObject(i);
String optString = optJSONObject.optString("name", "");
String optString2 = optJSONObject.optString("url", "");
String optString3 = optJSONObject.optString("region", "");
if (URLUtil.isNetworkUrl(optString2)) {
c.add(new a(optString, optString2, false, optString3));
}
}
}
this.b = max;
this.d = c;
} catch (Throwable th) {
throw th;
}
}
}
@Override
public final void b(@NonNull Parcel parcel) {
synchronized (this) {
try {
this.b = n.a(parcel, a);
List<a> a2 = n.a(parcel, a.e);
this.d = a2;
if (sg.bigo.ads.common.utils.k.a((Collection) a2)) {
this.d = c();
}
this.e = n.a(parcel, 0L);
} catch (Throwable th) {
throw th;
}
}
}
public final boolean a() {
return Math.abs(System.currentTimeMillis() - this.e) > this.b;
}
}