整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 fy.java 源代码,内容仅作参考
package com.ss.android.downloadlib.addownload.compliance;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.sigmob.sdk.base.h;
import com.ss.android.download.api.config.lf;
import com.ss.android.downloadlib.addownload.il;
import java.util.concurrent.atomic.AtomicInteger;
import org.json.JSONObject;
public class fy {
private final AtomicInteger g;
public static class g {
private static fy g = new fy();
}
private fy() {
this.g = new AtomicInteger(0);
}
public String zc() {
StringBuilder sb = new StringBuilder();
sb.append(this.g.get() < 3 ? "https://apps.bytesfield.com" : "https://apps.bytesfield-b.com");
sb.append("/customer/api/app/deep_link");
return sb.toString();
}
public void zc(@NonNull final com.ss.android.downloadlib.addownload.zc.r rVar, final String str, final byte[] bArr, final t tVar) {
il.ql().g(str, bArr, "application/json; charset=utf-8", 0, new lf() {
@Override
public void g(String str2) {
fy.this.g(rVar, str2, tVar);
}
@Override
public void g(Throwable th) {
fy.this.g(rVar, str, bArr, tVar);
}
});
}
public static fy g() {
return g.g;
}
public void g(final com.ss.android.downloadlib.addownload.zc.r rVar, final t tVar) {
if (il.ql() == null) {
com.ss.android.downloadlib.r.i.g().g("getDownloadNetworkFactory == NULL");
g(401, rVar);
return;
}
com.ss.android.downloadlib.ql.g().g(new Runnable() {
@Override
public void run() {
fy fyVar = fy.this;
fyVar.zc(rVar, fyVar.zc(), fy.this.g(rVar, true, 4), tVar);
}
});
}
public void g(com.ss.android.downloadlib.addownload.zc.r rVar, String str, byte[] bArr, t tVar) {
if (this.g.get() < 6) {
this.g.incrementAndGet();
zc(rVar, str, bArr, tVar);
return;
}
g("当前网络不佳,请稍后再试");
this.g.set(0);
g(402, rVar);
}
private void g(final String str) {
com.ss.android.downloadlib.t.g().zc().post(new Runnable() {
@Override
public void run() {
il.i().g(6, il.getContext(), null, str, null, 0);
}
});
}
public byte[] g(com.ss.android.downloadlib.addownload.zc.r rVar, boolean z, int i) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("download_url", rVar.g());
jSONObject.put(h.o, rVar.r());
jSONObject.put("call_scene", 50);
if (z) {
jSONObject.put("sender_package_name", il.getContext().getPackageName());
jSONObject.put("sender_version", il.zy().r);
if (i > 0) {
jSONObject.put("store", i);
}
} else {
jSONObject.put("id", String.valueOf(rVar.zc()));
if (rVar.zw().getDeepLink() != null) {
if (TextUtils.isEmpty(rVar.zw().getDeepLink().getWebUrl())) {
com.ss.android.downloadlib.r.i.g().g("web_url is null");
}
jSONObject.put("web_url", rVar.zw().getDeepLink().getWebUrl());
} else {
com.ss.android.downloadlib.r.i.g().g("deeplink is null");
}
}
} catch (Exception unused) {
com.ss.android.downloadlib.r.i.g().g("param build error");
}
return jSONObject.toString().getBytes();
}
public void g(@NonNull com.ss.android.downloadlib.addownload.zc.r rVar, String str, t tVar) {
try {
if (TextUtils.isEmpty(str)) {
com.ss.android.downloadlib.r.i.g().g("response content is null");
g(404, rVar);
tVar.g();
return;
}
this.g.set(0);
r e = r.e(str);
if (e.g() != 0) {
g(403, rVar);
tVar.g();
} else if (TextUtils.isEmpty(e.zc())) {
g(405, rVar);
tVar.g();
} else {
tVar.g(e.zc());
}
} catch (Exception e2) {
com.ss.android.downloadlib.r.i.g().g(e2, "DownloadMiuiMarketHelper parseResponse");
}
}
public void g(int i, com.ss.android.downloadlib.addownload.zc.r rVar) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.putOpt("download_miui_market_fail_code", Integer.valueOf(i));
} catch (Exception e) {
e.printStackTrace();
}
com.ss.android.downloadlib.ql.g.g().g("get_miui_market_compliance_error", jSONObject, rVar);
}
public void g(int i, com.ss.android.downloadlib.addownload.zc.r rVar, JSONObject jSONObject) {
try {
jSONObject.putOpt("download_miui_market_success_result", Integer.valueOf(i));
} catch (Exception e) {
e.printStackTrace();
}
com.ss.android.downloadlib.ql.g.g().g("get_miui_market_compliance_success", jSONObject, rVar);
}
}