新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 C4074.java 源代码,内容仅作参考
package ewUlBWKNoApzb1Mnhgn4.TSYywVi3KnMwOjxS9W6h.tuTnrQl15gwcjciRsKuT.XFg3TYeejZA8ptq2pBNi;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.telephony.TelephonyManager;
import ewUlBWKNoApzb1Mnhgn4.TSYywVi3KnMwOjxS9W6h.tuTnrQl15gwcjciRsKuT.C4146;
import ewUlBWKNoApzb1Mnhgn4.TSYywVi3KnMwOjxS9W6h.tuTnrQl15gwcjciRsKuT.XFg3TYeejZA8ptq2pBNi.C4091;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;
import v4rqru3PdyhrqRZkuHAG.v4rqru3PdyhrqRZkuHAG.InterfaceC7614;
public class C4074 {
public enum EnumC4075 {
NETWORK_NONE,
NETWORK_WIFI,
NETWORK_2G,
NETWORK_3G,
NETWORK_4G,
NETWORK_MOBILE
}
@InterfaceC7614(api = 11)
public static boolean m18153() {
return m18162() != null && m18162().getType() == 13;
}
public static void m18154(boolean z) {
if (z) {
if (m18165().isWifiEnabled()) {
return;
}
m18165().setWifiEnabled(true);
} else if (m18165().isWifiEnabled()) {
m18165().setWifiEnabled(false);
}
}
public static boolean m18155(String str) {
C4091.C4092 m18536 = C4091.m18536(String.format("ping -c 1 %s", (str == null || str.length() <= 0) ? "223.5.5.5" : "223.5.5.5"), false);
boolean z = m18536.f14946 == 0;
if (m18536.f14948 != null) {
String str2 = "isAvailableByPing() called" + m18536.f14948;
}
if (m18536.f14947 != null) {
String str3 = "isAvailableByPing() called" + m18536.f14947;
}
return z;
}
public static void m18156() {
C4101.m18670();
}
public static boolean m18157() {
return m18162() != null && m18162().isConnected();
}
@Deprecated
public static boolean m18158() {
return m18170() && m18161();
}
public static EnumC4075 m18159() {
if (m18160() == null) {
return EnumC4075.NETWORK_NONE;
}
NetworkInfo m18162 = m18162();
if (m18162 != null && m18162.isAvailable()) {
if (m18171()) {
return EnumC4075.NETWORK_WIFI;
}
NetworkInfo.State state = m18162.getState();
String subtypeName = m18162.getSubtypeName();
if (state != null && (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING)) {
switch (m18162.getSubtype()) {
case 1:
case 2:
case 4:
case 7:
case 11:
return EnumC4075.NETWORK_2G;
case 3:
case 5:
case 6:
case 8:
case 9:
case 10:
case 12:
case 14:
case 15:
return EnumC4075.NETWORK_3G;
case 13:
return EnumC4075.NETWORK_4G;
default:
if (!subtypeName.equalsIgnoreCase("TD-SCDMA") && !subtypeName.equalsIgnoreCase("WCDMA") && !subtypeName.equalsIgnoreCase("CDMA2000")) {
return EnumC4075.NETWORK_MOBILE;
}
return EnumC4075.NETWORK_3G;
}
}
return EnumC4075.NETWORK_NONE;
}
return EnumC4075.NETWORK_NONE;
}
private static ConnectivityManager m18160() {
return (ConnectivityManager) C4146.m19023().getSystemService("connectivity");
}
public static boolean m18161() {
return m18155(null);
}
private static NetworkInfo m18162() {
return m18160().getActiveNetworkInfo();
}
public static boolean m18163() {
try {
Method declaredMethod = m18172().getClass().getDeclaredMethod("getDataEnabled", new Class[0]);
if (declaredMethod != null) {
return ((Boolean) declaredMethod.invoke(m18172(), new Object[0])).booleanValue();
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
public static void m18164() {
C4101.m18663();
}
private static WifiManager m18165() {
return (WifiManager) C4146.m19023().getApplicationContext().getSystemService("wifi");
}
public static String m18166(boolean z) {
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
while (networkInterfaces.hasMoreElements()) {
NetworkInterface nextElement = networkInterfaces.nextElement();
if (nextElement.isUp()) {
Enumeration<InetAddress> inetAddresses = nextElement.getInetAddresses();
while (inetAddresses.hasMoreElements()) {
InetAddress nextElement2 = inetAddresses.nextElement();
if (!nextElement2.isLoopbackAddress()) {
String hostAddress = nextElement2.getHostAddress();
boolean z2 = hostAddress.indexOf(58) < 0;
if (z) {
if (z2) {
return hostAddress;
}
} else if (!z2) {
int indexOf = hostAddress.indexOf(37);
return indexOf < 0 ? hostAddress.toUpperCase() : hostAddress.substring(0, indexOf).toUpperCase();
}
}
}
continue;
}
}
return null;
} catch (SocketException e) {
e.printStackTrace();
return null;
}
}
public static String m18167() {
if (m18172() != null) {
return m18172().getNetworkOperatorName();
}
return null;
}
public static String m18168(String str) {
try {
return InetAddress.getByName(str).getHostAddress();
} catch (UnknownHostException e) {
e.printStackTrace();
return null;
}
}
public static void m18169(boolean z) {
try {
Method declaredMethod = m18172().getClass().getDeclaredMethod("setDataEnabled", Boolean.TYPE);
if (declaredMethod != null) {
declaredMethod.invoke(m18172(), Boolean.valueOf(z));
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static boolean m18170() {
return m18165().isWifiEnabled();
}
public static boolean m18171() {
return m18162() != null && m18162().getType() == 1;
}
private static TelephonyManager m18172() {
return (TelephonyManager) C4146.m19023().getSystemService("phone");
}
}