b.java 源代码
package u1;
import android.content.Context;
import android.util.Log;
import com.x8zs.plugin.apache.http.HttpStatus;
import java.util.Calendar;
import org.json.JSONObject;
import t1.f;
public class b implements Runnable {
private v1.a f26477q;
private Context f26478r;
public b(Context context, v1.a aVar) {
this.f26477q = aVar;
this.f26478r = context;
}
@Override
public void run() {
com.pgl.sys.ces.b a7;
StringBuilder sb;
v1.a aVar;
String str;
long j6;
byte[] bArr;
String valueOf = String.valueOf(System.currentTimeMillis());
try {
str = com.pgl.a.a.a.c() + "/v1/getInfoPgl";
long j7 = 0;
if (com.pgl.sys.ces.b.a().f20088a) {
j6 = Calendar.getInstance().getTimeInMillis();
} else {
j6 = 0;
}
bArr = (byte[]) com.pgl.sys.ces.a.meta(301, this.f26478r, null);
if (com.pgl.sys.ces.b.a().f20088a) {
j7 = Calendar.getInstance().getTimeInMillis();
}
if (com.pgl.sys.ces.b.a().f20088a) {
Log.d("CZL_Efficient", "[Efficient] selas : " + (j7 - j6));
}
} catch (Throwable unused) {
try {
a.f26472b = 500;
a7 = com.pgl.sys.ces.b.a();
sb = new StringBuilder();
} catch (Throwable th) {
com.pgl.sys.ces.b.a().reportNow("SS-" + a.f26472b);
throw th;
}
}
if (bArr != null && bArr.length > 0) {
String str2 = str + "?os=android&app_key=" + a.f26474d + "&did=" + com.pgl.sys.ces.b.c() + "&version=1.0.5&version_code=5&time=" + valueOf;
int i6 = HttpStatus.SC_GATEWAY_TIMEOUT;
int i7 = 0;
while (i7 < 3) {
JSONObject jSONObject = new JSONObject(w1.a.a(str2, bArr));
i6 = jSONObject.getInt("code");
if (i6 != 200 && i6 != 202) {
i7++;
f.a(i7 * 3 * 1000);
} else {
if (i6 == 200) {
a.f26473c = true;
a.f26475e = jSONObject.getString("token_id");
}
if (i6 == 202) {
a.f26473c = true;
String string = jSONObject.getString("token_id");
a.f26475e = string;
com.pgl.sys.ces.a.meta(302, this.f26478r, string);
}
a.f26472b = i6;
a7 = com.pgl.sys.ces.b.a();
sb = new StringBuilder();
sb.append("SS-");
sb.append(a.f26472b);
a7.reportNow(sb.toString());
aVar = this.f26477q;
if (aVar == null) {
aVar.a(a.a());
return;
}
return;
}
}
a.f26472b = i6;
a7 = com.pgl.sys.ces.b.a();
sb = new StringBuilder();
sb.append("SS-");
sb.append(a.f26472b);
a7.reportNow(sb.toString());
aVar = this.f26477q;
if (aVar == null) {
}
} else {
throw new NullPointerException("NullPointerException");
}
}
}