- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
380 lines
8.3 KiB
Java
380 lines
8.3 KiB
Java
package com.mbridge.msdk.tracker.network;
|
|
|
|
import android.net.Uri;
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import androidx.work.WorkRequest;
|
|
import com.ironsource.nb;
|
|
import com.mbridge.msdk.tracker.network.ae;
|
|
import com.mbridge.msdk.tracker.network.b;
|
|
import com.mbridge.msdk.tracker.network.w;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.net.URLEncoder;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public abstract class u<T> implements Comparable<u<T>> {
|
|
private c a;
|
|
private String b;
|
|
private volatile q c;
|
|
private long d;
|
|
private Map<String, String> e;
|
|
private final ae.a f;
|
|
private int g;
|
|
private final String h;
|
|
private final int i;
|
|
private final String j;
|
|
private final int k;
|
|
private final Object l;
|
|
private w.a m;
|
|
private Integer n;
|
|
private v o;
|
|
private boolean p;
|
|
private boolean q;
|
|
private boolean r;
|
|
private boolean s;
|
|
private boolean t;
|
|
private z u;
|
|
private b.a v;
|
|
private a w;
|
|
private long x;
|
|
|
|
public interface a {
|
|
void a(u<?> uVar);
|
|
|
|
void a(u<?> uVar, w<?> wVar);
|
|
}
|
|
|
|
public enum b {
|
|
LOW,
|
|
NORMAL,
|
|
HIGH,
|
|
IMMEDIATE
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final u<?> a(v vVar) {
|
|
this.o = vVar;
|
|
return this;
|
|
}
|
|
|
|
public abstract w<T> a(r rVar);
|
|
|
|
public Map<String, String> a() {
|
|
return null;
|
|
}
|
|
|
|
public final void a(int i) {
|
|
this.g = i;
|
|
}
|
|
|
|
public final void a(q qVar) {
|
|
this.c = qVar;
|
|
}
|
|
|
|
public final void a(w.a aVar) {
|
|
this.m = aVar;
|
|
}
|
|
|
|
public abstract void a(T t);
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final u<?> b(boolean z) {
|
|
this.p = z;
|
|
return this;
|
|
}
|
|
|
|
public z b() {
|
|
return this.u;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final u<?> c(boolean z) {
|
|
this.s = z;
|
|
return this;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final u<?> d(boolean z) {
|
|
this.t = z;
|
|
return this;
|
|
}
|
|
|
|
public boolean d() {
|
|
return false;
|
|
}
|
|
|
|
public final String f() {
|
|
return this.j;
|
|
}
|
|
|
|
public final int h() {
|
|
return this.i;
|
|
}
|
|
|
|
public final int i() {
|
|
return this.g;
|
|
}
|
|
|
|
public final int j() {
|
|
return this.k;
|
|
}
|
|
|
|
public final String k() {
|
|
return this.h;
|
|
}
|
|
|
|
public final b.a m() {
|
|
return this.v;
|
|
}
|
|
|
|
public final long q() {
|
|
return this.x;
|
|
}
|
|
|
|
public final boolean r() {
|
|
return this.p;
|
|
}
|
|
|
|
public final boolean s() {
|
|
return this.s;
|
|
}
|
|
|
|
public final boolean t() {
|
|
return this.t;
|
|
}
|
|
|
|
public final q z() {
|
|
return this.c;
|
|
}
|
|
|
|
@Override // java.lang.Comparable
|
|
public /* synthetic */ int compareTo(Object obj) {
|
|
u uVar = (u) obj;
|
|
b e = e();
|
|
b e2 = uVar.e();
|
|
return e == e2 ? this.n.intValue() - uVar.n.intValue() : e2.ordinal() - e.ordinal();
|
|
}
|
|
|
|
public u(int i, String str) {
|
|
this(i, str, 0);
|
|
}
|
|
|
|
public u(int i, String str, int i2) {
|
|
this(i, str, i2, "un_known");
|
|
}
|
|
|
|
public u(int i, String str, int i2, String str2) {
|
|
Uri parse;
|
|
String host;
|
|
this.f = null;
|
|
this.l = new Object();
|
|
int i3 = 0;
|
|
this.p = false;
|
|
this.q = false;
|
|
this.r = false;
|
|
this.s = false;
|
|
this.t = false;
|
|
this.v = null;
|
|
this.x = 0L;
|
|
this.g = i;
|
|
this.h = str;
|
|
this.i = i2;
|
|
this.j = str2;
|
|
this.u = new e();
|
|
if (!TextUtils.isEmpty(str) && (parse = Uri.parse(str)) != null && (host = parse.getHost()) != null) {
|
|
i3 = host.hashCode();
|
|
}
|
|
this.k = i3;
|
|
this.d = SystemClock.elapsedRealtime();
|
|
}
|
|
|
|
public final long g() {
|
|
return SystemClock.elapsedRealtime() - this.d;
|
|
}
|
|
|
|
public final void c(String str) {
|
|
v vVar = this.o;
|
|
if (vVar != null) {
|
|
vVar.b(this);
|
|
}
|
|
}
|
|
|
|
public final void b(int i) {
|
|
v vVar = this.o;
|
|
if (vVar != null) {
|
|
vVar.a(this, i);
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public final u<?> c(int i) {
|
|
this.n = Integer.valueOf(i);
|
|
return this;
|
|
}
|
|
|
|
public final String l() {
|
|
if (!TextUtils.isEmpty(this.b)) {
|
|
return this.b;
|
|
}
|
|
if (this.a == null) {
|
|
this.a = new com.mbridge.msdk.tracker.network.toolbox.e();
|
|
}
|
|
String a2 = this.a.a(this);
|
|
this.b = a2;
|
|
return a2;
|
|
}
|
|
|
|
public final boolean n() {
|
|
boolean z;
|
|
synchronized (this.l) {
|
|
z = this.q;
|
|
}
|
|
return z;
|
|
}
|
|
|
|
public Map<String, String> c() {
|
|
return Collections.emptyMap();
|
|
}
|
|
|
|
public final String o() {
|
|
return "application/x-www-form-urlencoded; charset=UTF-8";
|
|
}
|
|
|
|
public final byte[] p() {
|
|
Map<String, String> a2 = a();
|
|
if (a2 == null || a2.size() <= 0) {
|
|
this.x = 0L;
|
|
return null;
|
|
}
|
|
byte[] a3 = a(a2, "UTF-8");
|
|
this.x = a3.length;
|
|
return a3;
|
|
}
|
|
|
|
private byte[] a(Map<String, String> map, String str) {
|
|
StringBuilder sb = new StringBuilder();
|
|
try {
|
|
int i = 0;
|
|
for (Map.Entry<String, String> entry : map.entrySet()) {
|
|
i++;
|
|
if (entry.getKey() != null) {
|
|
sb.append(URLEncoder.encode(entry.getKey(), str));
|
|
sb.append(nb.T);
|
|
sb.append(URLEncoder.encode(entry.getValue() == null ? "" : entry.getValue(), str));
|
|
if (i <= map.size() - 1) {
|
|
sb.append('&');
|
|
}
|
|
}
|
|
}
|
|
return sb.toString().getBytes(str);
|
|
} catch (UnsupportedEncodingException e) {
|
|
throw new RuntimeException("Encoding not supported: " + str, e);
|
|
}
|
|
}
|
|
|
|
public b e() {
|
|
return b.NORMAL;
|
|
}
|
|
|
|
public final int u() {
|
|
z b2 = b();
|
|
if (b2 == null) {
|
|
return 30000;
|
|
}
|
|
return b2.a();
|
|
}
|
|
|
|
public final long v() {
|
|
z b2 = b();
|
|
if (b2 == null) {
|
|
return WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS;
|
|
}
|
|
long b3 = b2.b();
|
|
return b3 < 0 ? WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS : b3;
|
|
}
|
|
|
|
public final void w() {
|
|
synchronized (this.l) {
|
|
this.r = true;
|
|
}
|
|
}
|
|
|
|
public final boolean x() {
|
|
boolean z;
|
|
synchronized (this.l) {
|
|
z = this.r;
|
|
}
|
|
return z;
|
|
}
|
|
|
|
public final void b(ad adVar) {
|
|
w.a aVar;
|
|
synchronized (this.l) {
|
|
aVar = this.m;
|
|
}
|
|
if (aVar != null) {
|
|
aVar.a(adVar);
|
|
}
|
|
}
|
|
|
|
public final void a(w<?> wVar) {
|
|
a aVar;
|
|
synchronized (this.l) {
|
|
aVar = this.w;
|
|
}
|
|
if (aVar != null) {
|
|
aVar.a(this, wVar);
|
|
}
|
|
}
|
|
|
|
public final void y() {
|
|
a aVar;
|
|
synchronized (this.l) {
|
|
aVar = this.w;
|
|
}
|
|
if (aVar != null) {
|
|
aVar.a(this);
|
|
}
|
|
}
|
|
|
|
public final void c(String str, String str2) {
|
|
if (this.e == null) {
|
|
this.e = new HashMap();
|
|
}
|
|
if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
|
|
return;
|
|
}
|
|
try {
|
|
this.e.put(str, str2);
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
|
|
public final String d(String str) {
|
|
if (this.e != null && !TextUtils.isEmpty(str)) {
|
|
try {
|
|
return this.e.get(str);
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
|
|
public String toString() {
|
|
String str = "0x" + Integer.toHexString(this.k);
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(n() ? "[X] " : "[ ] ");
|
|
sb.append(this.h);
|
|
sb.append(" ");
|
|
sb.append(str);
|
|
sb.append(" ");
|
|
sb.append(e());
|
|
sb.append(" ");
|
|
sb.append(this.n);
|
|
return sb.toString();
|
|
}
|
|
}
|