QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 nq.java 源代码,内容仅作参考
package kcsdkint;
import android.content.Context;
import android.net.NetworkInfo;
import android.net.Proxy;
import android.telephony.TelephonyManager;
import com.tencent.common.http.Apn;
public class nq {
public static int f84860a = 4;
public static String f84861b = null;
public static int f84862c = 80;
public static byte f84863d = 0;
public static boolean e = false;
public static boolean f = false;
public static byte g = 4;
public static String h = "unknown";
public static byte i = 9;
public static int j = 22;
private static int a(Context context, NetworkInfo networkInfo) {
TelephonyManager telephonyManager;
if (networkInfo == null) {
return 0;
}
try {
if (1 == networkInfo.getType()) {
return 1;
}
if (networkInfo.getType() != 0 || (telephonyManager = (TelephonyManager) context.getSystemService("phone")) == null) {
return 0;
}
switch (telephonyManager.getNetworkType()) {
case 1:
return 2;
case 2:
return 3;
case 3:
return 4;
case 4:
return 8;
case 5:
return 9;
case 6:
return 10;
case 7:
return 11;
case 8:
return 5;
case 9:
return 6;
case 10:
return 7;
case 11:
return 12;
case 12:
return 13;
case 13:
return 14;
case 14:
return 15;
case 15:
return 16;
case 16:
return 17;
case 17:
return 18;
case 18:
return 19;
case 19:
return 20;
case 20:
return 21;
default:
return 22;
}
} catch (Exception e2) {
e2.printStackTrace();
return 0;
}
}
public static void a(Context context) {
NetworkInfo networkInfo;
int i2;
boolean z;
synchronized (nq.class) {
if (f) {
return;
}
String str = null;
try {
networkInfo = ns.c();
} catch (NullPointerException unused) {
networkInfo = null;
}
int i3 = -1;
try {
f84860a = 0;
g = (byte) 4;
if (networkInfo != null) {
i3 = networkInfo.getType();
str = networkInfo.getExtraInfo();
if (str == null) {
f84860a = 0;
} else {
str = str.trim().toLowerCase();
}
}
if (i3 == 1) {
f84860a = 4;
e = false;
g = (byte) 3;
h = "unknown";
i = (byte) 9;
} else {
if (str != null) {
if (str.contains(Apn.APN_CMWAP)) {
h = Apn.APN_CMWAP;
i = (byte) 0;
} else if (str.contains("cmnet")) {
h = "cmnet";
i = (byte) 1;
} else if (str.contains(Apn.APN_3GWAP)) {
h = Apn.APN_3GWAP;
i = (byte) 2;
} else if (str.contains(Apn.APN_3GNET)) {
h = Apn.APN_3GNET;
i = (byte) 3;
} else if (str.contains(Apn.APN_UNIWAP)) {
h = Apn.APN_UNIWAP;
i = (byte) 4;
} else if (str.contains(Apn.APN_UNINET)) {
h = Apn.APN_UNINET;
i = (byte) 5;
} else if (str.contains(Apn.APN_CTWAP)) {
h = Apn.APN_CTWAP;
i = (byte) 6;
} else if (str.contains(Apn.APN_CTNET)) {
h = Apn.APN_CTNET;
i = (byte) 7;
} else if (str.contains(Apn.APN_777)) {
h = Apn.APN_777;
i = (byte) 8;
}
}
if (str != null) {
if (!str.contains(Apn.APN_CMWAP) && !str.contains(Apn.APN_UNIWAP) && !str.contains(Apn.APN_3GWAP) && !str.contains(Apn.APN_CTWAP)) {
if (!str.contains("cmnet") && !str.contains(Apn.APN_UNINET) && !str.contains(Apn.APN_3GNET) && !str.contains(Apn.APN_CTNET)) {
if (str.contains(Apn.APN_777)) {
g = (byte) 2;
}
}
g = (byte) 1;
if (str.contains(Apn.APN_3GNET) || str.contains(Apn.APN_CTNET)) {
g = (byte) 2;
}
f84860a = 1;
e = false;
i2 = f84860a;
if (i2 != 2 && i2 != 0) {
z = false;
if (z) {
f84861b = Proxy.getDefaultHost();
f84862c = Proxy.getDefaultPort();
if (f84861b != null) {
f84861b = f84861b.trim();
}
if (f84861b == null || "".equals(f84861b)) {
e = false;
f84860a = 1;
} else {
e = true;
f84860a = 2;
if ("10.0.0.200".equals(f84861b)) {
f84863d = (byte) 1;
} else {
f84863d = (byte) 0;
}
}
}
}
z = true;
if (z) {
}
}
g = (byte) 1;
if (str.contains(Apn.APN_3GWAP)) {
g = (byte) 2;
}
f84860a = 2;
e = false;
i2 = f84860a;
if (i2 != 2) {
z = false;
if (z) {
}
}
z = true;
if (z) {
}
}
f84860a = 0;
e = false;
i2 = f84860a;
if (i2 != 2) {
}
z = true;
if (z) {
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
j = a(context, networkInfo);
f = true;
}
}
}