安全中心 v4.9.2版本的 MD5 值为:d64c0ec7920c532fa6e6d9bb001cf9bf
以下内容为反编译后的 y.java 源代码,内容仅作参考
package tmsdk.common.internal.utils;
import android.content.Context;
import android.net.NetworkInfo;
import android.net.Proxy;
import android.telephony.TelephonyManager;
import com.tencent.kingkong.database.SQLiteDatabase;
import tcs.aco;
public class y {
public static final int GA = 5;
public static final int GB = 6;
public static final int GC = 7;
public static final int GD = 10;
public static final int GE = 12;
public static final int GF = 14;
public static final int GG = 13;
public static final int GH = 15;
public static final int Gp = 0;
public static final int Gq = 1;
public static final int Gu = 2;
public static final int Gv = 4;
public static final int Gw = 8;
public static final int Gx = 9;
public static final int Gy = 3;
public static final int Gz = 11;
public static final int TYPE_UNKNOWN = 0;
public static final int TYPE_WIFI = 4;
public static final int Yo = 16;
public static final byte cFE = 0;
public static final byte cFF = 1;
public static final byte cFG = 2;
public static final byte cFH = 3;
public static final byte cFI = 4;
public static final byte cFL = 0;
public static final byte cFM = 1;
public static final byte cFN = 2;
public static final byte cFO = 3;
public static final byte cFP = 4;
public static final byte cFQ = 5;
public static final byte cFR = 6;
public static final byte cFS = 7;
public static final byte cFT = 8;
public static final byte cFU = 9;
public static final int ctI = 1;
public static final int ctJ = 2;
public static final String ctK = "N/A";
public static final String ctL = "Net";
public static final String ctM = "Wap";
public static final String ctN = "Wlan";
public static final byte ctU = 0;
public static final byte ctV = 1;
public static final String ctX = "cmwap";
public static final String ctY = "cmnet";
public static final String ctZ = "3gwap";
public static final String cua = "3gnet";
public static final String cub = "uniwap";
public static final String cuc = "uninet";
public static final String cud = "ctwap";
public static final String cue = "ctnet";
public static final String cuf = "#777";
public static final int dws = 17;
public static final int ewB = 11;
public static final int ewC = 12;
public static final int ewD = 13;
public static final int ewE = 14;
public static final int ewF = 15;
public static int ctO = 4;
public static String ctP = null;
public static int ctQ = 80;
public static byte ctR = 0;
public static boolean ctS = false;
public static boolean ctT = false;
public static byte cFJ = 4;
public static String cFK = aco.UNKNOWN;
public static byte cFV = 9;
public static int dwt = 17;
public static void az(Context context) {
if (!ctT) {
synchronized (y.class) {
if (!ctT) {
x(context);
ctT = true;
}
}
}
}
public static void aA(Context context) {
ctT = false;
az(context);
}
public static void x(Context context) {
NetworkInfo networkInfo;
String str = null;
try {
networkInfo = tmsdk.common.l.Ak().getActiveNetworkInfo();
} catch (NullPointerException e) {
networkInfo = null;
}
int i = -1;
try {
ctO = 0;
cFJ = (byte) 4;
if (networkInfo != null) {
i = networkInfo.getType();
str = networkInfo.getExtraInfo();
if (str == null) {
ctO = 0;
} else {
str = str.trim().toLowerCase();
}
}
if (i == 1) {
ctO = 4;
ctS = false;
cFJ = (byte) 3;
cFK = aco.UNKNOWN;
cFV = (byte) 9;
} else {
my(str);
if (str == null) {
ctO = 0;
} else if (str.contains(ctX) || str.contains(cub) || str.contains(ctZ) || str.contains(cud)) {
cFJ = (byte) 1;
if (str.contains(ctZ)) {
cFJ = (byte) 2;
}
ctO = 2;
} else if (str.contains(ctY) || str.contains(cuc) || str.contains(cua) || str.contains(cue)) {
cFJ = (byte) 1;
if (str.contains(cua) || str.contains(cue)) {
cFJ = (byte) 2;
}
ctO = 1;
} else if (str.contains(cuf)) {
cFJ = (byte) 2;
ctO = 0;
} else {
ctO = 0;
}
ctS = false;
if (kJ(ctO)) {
ctP = Proxy.getDefaultHost();
ctQ = Proxy.getDefaultPort();
if (ctP != null) {
ctP = ctP.trim();
}
if (ctP != null && !SQLiteDatabase.KeyEmpty.equals(ctP)) {
ctS = true;
ctO = 2;
if ("10.0.0.200".equals(ctP)) {
ctR = (byte) 1;
} else {
ctR = (byte) 0;
}
} else {
ctS = false;
ctO = 1;
}
}
}
} catch (Throwable th) {
th.printStackTrace();
}
dwt = a(context, networkInfo);
}
private static boolean kJ(int i) {
return i == 2 || i == 0;
}
public static String kK(int i) {
switch (i) {
case 0:
return ctK;
case 1:
return ctL;
case 2:
return ctM;
case 3:
default:
return ctK;
case 4:
return ctN;
}
}
private static void my(String str) {
if (str != null) {
if (str.contains(ctX)) {
cFK = ctX;
cFV = (byte) 0;
return;
}
if (str.contains(ctY)) {
cFK = ctY;
cFV = (byte) 1;
return;
}
if (str.contains(ctZ)) {
cFK = ctZ;
cFV = (byte) 2;
return;
}
if (str.contains(cua)) {
cFK = cua;
cFV = (byte) 3;
return;
}
if (str.contains(cub)) {
cFK = cub;
cFV = (byte) 4;
return;
}
if (str.contains(cuc)) {
cFK = cuc;
cFV = (byte) 5;
return;
}
if (str.contains(cud)) {
cFK = cud;
cFV = (byte) 6;
} else if (str.contains(cue)) {
cFK = cue;
cFV = (byte) 7;
} else if (str.contains(cuf)) {
cFK = cuf;
cFV = (byte) 8;
}
}
}
private static int a(Context context, NetworkInfo networkInfo) {
TelephonyManager telephonyManager;
int i = 1;
if (networkInfo == null) {
return 0;
}
try {
} catch (Exception e) {
e.printStackTrace();
}
if (1 != networkInfo.getType()) {
if (networkInfo.getType() == 0 && (telephonyManager = (TelephonyManager) context.getSystemService("phone")) != null) {
switch (telephonyManager.getNetworkType()) {
case 1:
i = 2;
break;
case 2:
i = 3;
break;
case 3:
i = 4;
break;
case 4:
i = 8;
break;
case 5:
i = 9;
break;
case 6:
i = 10;
break;
case 7:
i = 11;
break;
case 8:
i = 5;
break;
case 9:
i = 6;
break;
case 10:
i = 7;
break;
case 11:
i = 12;
break;
case 12:
i = 13;
break;
case 13:
i = 14;
break;
case 14:
i = 15;
break;
case 15:
i = 16;
break;
default:
i = 17;
break;
}
}
i = 0;
}
return i;
}
}