手机管家 v6.0.0版本的 MD5 值为:bf0bca2cb03f766137fe9ecf7383a634
以下内容为反编译后的 bkj.java 源代码,内容仅作参考
package tcs;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.text.TextUtils;
import java.io.ByteArrayOutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Locale;
public class bkj {
private static boolean dj(Context context) {
NetworkInfo activeNetworkInfo;
try {
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null && activeNetworkInfo.getType() == 0) {
String extraInfo = activeNetworkInfo.getExtraInfo();
if (TextUtils.isEmpty(extraInfo)) {
return false;
}
String lowerCase = extraInfo.toLowerCase(Locale.getDefault());
if (!lowerCase.equals(tmsdk.common.internal.utils.y.ctX)) {
if (!lowerCase.equals(tmsdk.common.internal.utils.y.ctZ)) {
return false;
}
}
return true;
}
return false;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
private static HttpURLConnection f(String str, String str2, boolean z) throws Exception {
HttpURLConnection httpURLConnection;
if (!z) {
httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
} else {
Uri parse = Uri.parse(str);
String host = parse.getHost();
String str3 = parse.getPort() != -1 ? host + ":" + parse.getPort() : host;
httpURLConnection = (HttpURLConnection) new URL(str.replace(parse.getAuthority(), "10.0.0.172")).openConnection();
httpURLConnection.setRequestProperty("X-Online-Host", str3);
httpURLConnection.setRequestProperty("Host", "10.0.0.172");
}
httpURLConnection.setRequestMethod(str2);
httpURLConnection.setConnectTimeout(20000);
httpURLConnection.setReadTimeout(ke.YP);
return httpURLConnection;
}
public static byte[] at(Context context, String str) {
byte[] e = e(str, dj(context), true);
if (e == null) {
return e(str, false, true);
}
return e;
}
private static byte[] e(String str, boolean z, boolean z2) {
HttpURLConnection httpURLConnection;
?? r3;
Throwable th;
byte[] bArr = null;
try {
httpURLConnection = f(str, "GET", z);
try {
int responseCode = httpURLConnection.getResponseCode();
if (responseCode == 200 || responseCode == 206 || responseCode == -1) {
String contentType = httpURLConnection.getContentType();
if (contentType.indexOf("text/vnd.wap.wml") == -1 && contentType.indexOf("application/vnd.wap.wmlc") == -1) {
r3 = httpURLConnection.getInputStream();
try {
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bArr2 = new byte[1024];
while (true) {
int read = r3.read(bArr2);
if (read == -1) {
break;
}
byteArrayOutputStream.write(bArr2, 0, read);
}
bArr = byteArrayOutputStream.toByteArray();
bkm.L(r3);
bkm.L(httpURLConnection);
} catch (Exception e) {
e = e;
e.printStackTrace();
bkm.L(r3);
bkm.L(httpURLConnection);
return bArr;
}
} catch (Throwable th2) {
th = th2;
bkm.L(r3);
bkm.L(httpURLConnection);
throw th;
}
} else if (z2) {
byte[] e2 = e(str, z, false);
bkm.L(null);
bkm.L(httpURLConnection);
bArr = e2;
} else {
bkm.L(null);
bkm.L(httpURLConnection);
}
} else {
bkm.L(null);
bkm.L(httpURLConnection);
}
} catch (Exception e3) {
e = e3;
r3 = bArr;
} catch (Throwable th3) {
r3 = bArr;
th = th3;
bkm.L(r3);
bkm.L(httpURLConnection);
throw th;
}
} catch (Exception e4) {
e = e4;
httpURLConnection = null;
r3 = 0;
} catch (Throwable th4) {
httpURLConnection = null;
r3 = 0;
th = th4;
}
return bArr;
}
}