万能钥匙.apk(点击下载) / UploadNetworkInfoTask.java
package com.appara.core.report.task;
import com.appara.core.BLHttp;
import com.appara.core.BLLog;
import com.appara.core.report.ReportManager;
public class UploadNetworkInfoTask implements Runnable {
public static final int NETWORK_AUTH = 256;
public static final int NETWORK_OFFLINE = 0;
public static final int NETWORK_ONLINE = 1;
/* renamed from: a reason: collision with root package name */
private String f2396a;
/* renamed from: b reason: collision with root package name */
private String f2397b;
public UploadNetworkInfoTask(String str, String str2) {
this.f2396a = str;
this.f2397b = str2;
}
private static int b() {
BLHttp bLHttp = new BLHttp("http://check02.51y5.net/cp.a?time=" + System.currentTimeMillis());
bLHttp.setTimeout(5000, 5000);
bLHttp.setUseCaches(false);
byte[] bArr = bLHttp.get();
if (bArr == null || bArr.length == 0) {
BLLog.e("network error");
return 0;
} else if (bArr.length != 1 || bArr[0] != 48) {
return 256;
} else {
BLLog.i("check successfully");
return 1;
}
}
public void run() {
ReportManager.getSingleton().reportEvent(this.f2396a, this.f2397b, "network", b());
}
}