正在查看: 哔哩哔哩 v1.6.6 应用的 acx.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 哔哩哔哩 v1.6.6 应用的 acx.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package bl;
import android.os.AsyncTask;
import android.os.SystemClock;
import android.support.annotation.Nullable;
import bl.nk;
import com.bilibili.tv.support.httpdns.bean.DomainInfo;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import tv.danmaku.videoplayer.core.danmaku.DanmakuConfig;
public class acx extends AsyncTask<Void, Void, String> {
private acv a;
private String c;
private URL d;
private acw b = new acw();
private nk.a e = new nk.a();
public acx(acv acvVar, String str) {
this.a = acvVar;
this.c = str;
}
@Override
public String doInBackground(Void... voidArr) {
List<String> a = a();
if (a != null && a.size() > 0) {
DomainInfo domainInfo = new DomainInfo();
domainInfo.domain = this.c;
if (this.d != null) {
domainInfo.url = this.d.toString();
}
domainInfo.beginTime = System.currentTimeMillis();
domainInfo.ip = a.get(0);
}
return this.c;
}
@Override
public void onPostExecute(String str) {
this.a.b().remove(str);
}
@Nullable
public List<String> a() {
try {
this.d = new URL(acy.a(this.c, 0));
try {
acr a = a(0);
if (a != null) {
return a.a;
}
return null;
} catch (InterruptedException e) {
att.a(e);
Thread.currentThread().interrupt();
return null;
}
} catch (MalformedURLException e2) {
att.a(e2);
return null;
}
}
@Nullable
public ni b() {
long elapsedRealtime = SystemClock.elapsedRealtime();
this.e.d = "119.29.29.29";
ni niVar = new ni();
niVar.a = "tencent";
niVar.b = this.c;
try {
this.d = new URL(acy.a(this.c, 1));
acr a = a(1);
if (a == null) {
return null;
}
niVar.c = a.a;
niVar.d = a.b;
return niVar;
} catch (InterruptedException e) {
att.a(e);
Thread.currentThread().interrupt();
return null;
} catch (MalformedURLException e2) {
att.a(e2);
return null;
} finally {
this.e.e.add(niVar);
this.e.c = SystemClock.elapsedRealtime() - elapsedRealtime;
}
}
public nk.a c() {
return this.e;
}
@android.support.annotation.Nullable
private bl.acr a(int r11) throws java.lang.InterruptedException {
throw new UnsupportedOperationException("Method not decompiled: bl.acx.a(int):bl.acr");
}
public HttpURLConnection a(URL url) throws IOException {
if (url == null) {
return null;
}
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setRequestMethod("GET");
httpURLConnection.setConnectTimeout(DanmakuConfig.DEFAULT_FLY_DURATION_MILLIS);
httpURLConnection.setReadTimeout(DanmakuConfig.DEFAULT_FLY_DURATION_MILLIS);
httpURLConnection.setInstanceFollowRedirects(false);
httpURLConnection.setDoInput(true);
httpURLConnection.setDoOutput(false);
return httpURLConnection;
}
public void a(HttpURLConnection httpURLConnection) {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
}