星辰影院解锁vip v1.0.4版本的 MD5 值为:3d99bbcbb0d5d5e568b9f6134424c24e
以下内容为反编译后的 Pingback.java 源代码,内容仅作参考
package org.qiyi.android.pingback;
import android.text.TextUtils;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID;
import org.qiyi.android.pingback.z.c;
public final class Pingback implements Serializable, b {
private static final androidx.core.util.e<Pingback> a = new androidx.core.util.f(10);
private UUID A;
private String B;
private String J;
private transient String[] K;
private String L;
private String M;
private boolean N;
private transient String O;
private transient c P;
private transient org.qiyi.android.pingback.z.e Q;
private transient p R;
private int f16427d;
private boolean f16428e;
private int f16429f;
private long f16430g;
private boolean f16431h;
private boolean f16432i;
private boolean f16433j;
private boolean f16434k;
private boolean f16435l;
private String m;
private Map<String, String> n;
private int o;
private long p;
private boolean r;
private boolean s;
private boolean t;
private String u;
private boolean v;
private String y;
private Map<String, String> z;
private int f16425b = 2;
private int f16426c = 0;
private long q = 0;
private long w = -1;
private int x = 0;
private transient boolean C = false;
private transient long D = 0;
protected Pingback() {
Z();
g();
}
private void A0() {
if (org.qiyi.android.pingback.internal.g.b.f()) {
if (!TextUtils.isEmpty(this.m) && this.m.indexOf(63) >= 0) {
if (this.f16427d == 0) {
org.qiyi.android.pingback.internal.g.b.e("PingbackManager.PingbackClass", "Passing pingback parameters in Url query string! -- ", this.m);
} else {
org.qiyi.android.pingback.internal.g.b.l("PingbackManager.PingbackClass", "Passing pingback parameters in Url query string while Posting -- ", this.m);
}
}
if (this.f16430g <= 0 || this.f16425b == 0) {
return;
}
org.qiyi.android.pingback.internal.g.b.k("PingbackManager.PingbackClass", new RuntimeException("Invalid Pingback config: Set a delay time but mSendPolicy is not DELAY!"));
}
}
private void G() {
if (this.n == null) {
this.n = new LinkedHashMap();
}
}
public static Pingback I() {
return V(1);
}
private static Pingback V(int i2) {
Pingback b2 = a.b();
if (b2 == null) {
b2 = new Pingback(null, null, i2, 2, n(), true);
} else {
b2.v0(null, null, i2, 2, n(), true);
}
b2.C = true;
return b2;
}
private void W() {
String str;
if (this.y == null) {
String B = B();
if (B.indexOf(63) >= 0) {
String[] split = B.split("\\?", 2);
this.y = split[0];
str = split[1];
} else {
this.y = B;
str = null;
}
this.z = org.qiyi.android.pingback.a0.e.a(str);
}
}
private void Z() {
this.m = null;
this.n = null;
this.f16425b = 2;
this.f16426c = 2;
this.f16427d = n();
this.f16431h = true;
this.p = -1L;
this.A = null;
this.B = null;
g();
}
private String f() {
if (this.K == null) {
return "";
}
StringBuilder sb = new StringBuilder();
Map<String, String> t = t();
Map<String, String> v = v();
int i2 = 0;
while (true) {
String[] strArr = this.K;
if (i2 >= strArr.length) {
break;
}
String str = strArr[i2];
String str2 = t.get(str);
if (TextUtils.isEmpty(str2)) {
str2 = v.get(str);
}
if (!TextUtils.isEmpty(str2)) {
sb.append(str2);
}
sb.append("||");
i2++;
}
int length = sb.length();
if (length > 1) {
return sb.delete(length - 2, length).toString();
}
return sb.toString();
}
private void g() {
this.f16430g = 0L;
this.o = -1;
this.f16428e = false;
this.f16435l = false;
this.f16429f = 0;
this.q = 0L;
this.f16434k = false;
this.z = null;
this.y = null;
this.u = null;
this.L = null;
this.J = null;
this.K = null;
this.N = false;
this.M = null;
this.v = false;
this.O = null;
this.P = null;
this.Q = null;
this.R = null;
this.f16433j = false;
this.f16432i = true;
this.C = false;
this.D = -1L;
this.w = -1L;
this.r = false;
this.s = false;
this.t = false;
this.x = 0;
}
public static Pingback h(long j2) {
return V(0).f0(j2);
}
private static int n() {
return 0;
}
private void v0(String str, Map<String, String> map, int i2, int i3, int i4, boolean z) {
this.m = str;
this.n = map;
this.f16425b = i2;
this.f16426c = i3;
this.f16427d = i4;
this.f16431h = z;
this.p = System.currentTimeMillis();
this.A = UUID.randomUUID();
g();
A0();
}
public int A() {
return this.f16425b;
}
public final String B() {
if (org.qiyi.android.pingback.internal.m.h.a(this.m)) {
this.m = l.c().b();
}
return this.m;
}
public UUID C() {
return this.A;
}
public String D() {
UUID uuid = this.A;
if (uuid == null) {
return "";
}
if (this.B == null) {
this.B = uuid.toString();
}
return this.B;
}
public p E() {
return this.R;
}
public boolean F() {
int i2 = this.o + 1;
if (!P() && i2 > this.f16429f) {
return false;
}
this.o = i2;
long j2 = i2 * 10;
if (j2 > 300) {
j2 = 300;
}
g0(j2);
b("retry_times", String.valueOf(i2));
return true;
}
public Pingback H(String str) {
this.m = str;
return this;
}
public boolean J() {
return this.f16431h;
}
public boolean K() {
return this.f16433j;
}
public boolean L() {
return this.v;
}
public boolean M() {
return this.f16425b == 0;
}
public boolean N() {
return this.N;
}
public boolean O() {
return this.w > 0;
}
public boolean P() {
return this.f16428e;
}
public boolean Q() {
return this.f16435l;
}
public boolean R() {
return this.f16427d == 1;
}
public boolean S() {
return this.f16429f != 0 || this.f16428e;
}
public boolean T() {
return this.f16426c == 2;
}
public final c U() {
if (TextUtils.isEmpty(this.O)) {
this.O = i.e();
}
if (this.P == null) {
this.P = j.d(this.O);
}
return this.P;
}
public void X() {
if (this.C) {
Z();
try {
a.a(this);
} catch (IllegalStateException unused) {
}
}
}
public void Y(String str) {
if (!TextUtils.isEmpty(str) && str.startsWith("http")) {
String str2 = this.m;
this.u = str2;
int indexOf = str2.indexOf(63);
if (indexOf > 0) {
this.m = str + this.m.substring(indexOf);
} else if (indexOf < 0) {
this.m = str;
}
if (this.y != null) {
this.y = str;
return;
}
return;
}
if (org.qiyi.android.pingback.internal.g.b.f()) {
org.qiyi.android.pingback.internal.g.b.l("PingbackManager.PingbackClass", "Did not replace url, replacement is: ", str);
}
}
public final void a() {
if (this.f16431h && !this.r) {
org.qiyi.android.pingback.z.e eVar = this.Q;
if (eVar != null) {
eVar.a(this);
} else {
org.qiyi.android.pingback.z.e a2 = l.c().a(B());
if (a2 != null) {
a2.a(this);
} else {
org.qiyi.android.pingback.internal.g.b.l("PingbackManager.PingbackClass", "No common parameters registered for url: ", B());
}
}
this.r = true;
}
if (this.f16433j && !this.s) {
G();
org.qiyi.android.pingback.z.e d2 = l.c().d();
if (d2 != null) {
d2.a(this);
}
this.s = true;
}
if (this.f16432i && !this.t) {
c.a f2 = U().f();
if (f2 != null) {
f2.b(this);
}
org.qiyi.android.pingback.z.c.a(this);
this.t = true;
}
if (TextUtils.isEmpty(this.m) || this.m.contains("stime=")) {
return;
}
c("stime", String.valueOf(this.p));
}
public void a0() {
this.w = -1L;
}
public Pingback b(String str, String str2) {
G();
if (str2 != null) {
this.n.put(str, str2);
}
return this;
}
public final void b0() {
U().h(this);
}
public Pingback c(String str, String str2) {
Map<String, String> map = this.n;
return (map == null || !map.containsKey(str)) ? b(str, str2) : this;
}
public Pingback c0(boolean z) {
this.f16431h = z;
return this;
}
public Pingback d(Map<String, String> map) {
if (map != null && !map.isEmpty()) {
if (this.n == null) {
this.n = new LinkedHashMap(map.size());
}
this.n.putAll(map);
}
return this;
}
public Pingback d0(boolean z) {
this.f16432i = z;
return this;
}
public final void e(org.qiyi.android.pingback.z.e eVar, boolean z) {
if (eVar != null) {
eVar.a(this);
if (z) {
this.r = true;
}
}
}
public Pingback e0(String str) {
this.O = str;
return this;
}
public Pingback f0(long j2) {
if (j2 >= 1000) {
this.f16430g = j2;
this.f16425b = 0;
org.qiyi.android.pingback.internal.g.b.e("PingbackManager.PingbackClass", "Set delay: ", Long.valueOf(j2), " ms");
} else {
this.f16430g = 0L;
this.q = 0L;
this.f16425b = 1;
}
return this;
}
public Pingback g0(long j2) {
return f0(j2 * 1000);
}
public Pingback h0(boolean z) {
this.N = z;
return this;
}
public Pingback i() {
this.f16426c = 1;
return this;
}
public Pingback i0(boolean z) {
this.f16428e = z;
this.o = z ? 0 : -1;
return this;
}
public Pingback j() {
this.f16431h = false;
return this;
}
public Pingback j0(boolean z) {
this.f16435l = z;
return this;
}
public Pingback k(int i2) {
return l0(i2);
}
public void k0(long j2) {
this.w = j2;
}
public String l() {
return this.O;
}
public Pingback l0(int i2) {
if (this.o >= 0) {
return this;
}
this.f16429f = Math.min(i2, 10);
this.o = 0;
return this;
}
public long m() {
return this.p;
}
public Pingback m0(String str) {
this.L = str;
return this;
}
public Pingback n0(org.qiyi.android.pingback.z.e eVar) {
this.Q = eVar;
return this;
}
public long o() {
return this.f16430g;
}
public Pingback o0(String str) {
this.M = str;
return this;
}
public final String p() {
W();
return this.y;
}
public Pingback p0(String str) {
this.J = str;
return this;
}
public long q() {
return this.w;
}
public Pingback q0(String[] strArr) {
this.K = strArr;
return this;
}
public int r() {
return this.f16429f;
}
public void r0(int i2) {
this.x = i2;
}
public String s() {
return this.L;
}
public Pingback s0(boolean z) {
this.f16434k = z;
return this;
}
public final Map<String, String> t() {
G();
return this.n;
}
public void t0(String str) {
this.B = str;
this.A = UUID.fromString(str);
}
public String toString() {
StringBuffer stringBuffer = new StringBuffer("Pingback{");
stringBuffer.append("uuid=");
stringBuffer.append(D());
stringBuffer.append(", id=");
stringBuffer.append(this.w);
stringBuffer.append(", createAt=");
stringBuffer.append(this.p);
stringBuffer.append(", mTimingPolicy=");
stringBuffer.append(this.f16425b);
stringBuffer.append(", mMergePolicy=");
stringBuffer.append(T() ? "MERGE" : "NONE");
stringBuffer.append(", mReqMethod=");
stringBuffer.append(this.f16427d == 0 ? "GET" : "POST");
stringBuffer.append(", mAddDefaultParams=");
stringBuffer.append(this.f16431h);
stringBuffer.append(", mSignature=");
stringBuffer.append(this.J);
if (this.f16429f < 10 && !P()) {
if (this.f16429f > 0) {
stringBuffer.append(", Retry=");
stringBuffer.append(this.o);
stringBuffer.append("/");
stringBuffer.append(this.f16429f);
} else {
stringBuffer.append(", Retry=[DISABLED]");
}
} else {
stringBuffer.append(", Retry=[Guaranteed], Requested=");
stringBuffer.append(this.f16429f);
}
stringBuffer.append(", mParams=");
stringBuffer.append(this.n);
stringBuffer.append(", mUrl=");
stringBuffer.append(this.m);
stringBuffer.append('}');
return stringBuffer.toString();
}
public final String u() {
W();
String str = this.y;
return (str == null || !str.startsWith("http://msg.qy.net")) ? "" : this.y.replace("http://msg.qy.net/", "");
}
public boolean u0() {
return this.f16434k;
}
public final Map<String, String> v() {
W();
return this.z;
}
public int w() {
return this.o;
}
public void w0() {
int i2 = this.o + 1;
this.o = i2;
b("retry_times", String.valueOf(i2));
}
public long x() {
return this.q;
}
public long x0() {
if (this.f16425b == 0) {
long currentTimeMillis = System.currentTimeMillis() + this.f16430g;
this.q = currentTimeMillis;
org.qiyi.android.pingback.internal.g.b.j("PingbackManager.PingbackClass", "Delay target time updated: ", Long.valueOf(currentTimeMillis));
} else {
this.q = 0L;
}
return this.q;
}
public String y() {
if (this.J == null) {
this.J = f();
}
return this.J;
}
public Pingback y0() {
this.f16427d = 0;
return this;
}
public int z() {
return this.x;
}
public Pingback z0() {
this.f16427d = 1;
return this;
}
private Pingback(String str, Map<String, String> map, int i2, int i3, int i4, boolean z) {
v0(str, map, i2, i3, i4, z);
}
}