QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 ex.java 源代码,内容仅作参考
package c.t.m.sapp.g;
import android.net.ConnectivityManager;
import android.net.DhcpInfo;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.text.format.Formatter;
import com.tencent.mtt.compliance.MethodDelegate;
import java.util.Arrays;
public final class ex {
private int f2027a = 15;
private double[] f2028b = new double[this.f2027a];
private double f2029c;
private int f2030d;
private int e;
public static final class a {
public static final a f2031a = new a("NETWORK_NONE", 0);
public static final a f2032b = new a("NETWORK_MOBILE", 1);
public static final a f2033c = new a("NETWORK_WIFI", 2);
static {
a[] aVarArr = {f2031a, f2032b, f2033c};
}
private a(String str, int i) {
}
}
public ex() {
c();
}
@Deprecated
public static a a() {
try {
ConnectivityManager connectivityManager = (ConnectivityManager) fa.a("connectivity");
NetworkInfo activeNetworkInfo = connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();
if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
return Build.VERSION.SDK_INT >= 16 ? connectivityManager.isActiveNetworkMetered() ? a.f2032b : a.f2033c : 1 == activeNetworkInfo.getType() ? a.f2033c : a.f2032b;
}
return a.f2031a;
} catch (Throwable unused) {
return a.f2031a;
}
}
@Deprecated
public static boolean a(WifiManager wifiManager) {
boolean z;
String bssid;
if (wifiManager == null) {
return false;
}
try {
DhcpInfo dhcpInfo = wifiManager.getDhcpInfo();
if (dhcpInfo != null) {
String formatIpAddress = Formatter.formatIpAddress(dhcpInfo.gateway);
if ("192.168.43.1".equals(formatIpAddress) || "172.20.10.1".equals(formatIpAddress)) {
z = true;
WifiInfo connectionInfo = MethodDelegate.getConnectionInfo(wifiManager);
boolean z2 = connectionInfo == null && (bssid = connectionInfo.getBSSID()) != null && bssid.length() == 17 && "2367abefABEF".contains(bssid.substring(1, 2));
if (eo.f()) {
eo.a("NetWorkUtils", "mobile hotspot: oppo[" + z + "], google[" + z2 + "]");
}
return !z || z2;
}
}
z = false;
WifiInfo connectionInfo2 = MethodDelegate.getConnectionInfo(wifiManager);
if (connectionInfo2 == null) {
}
if (eo.f()) {
}
if (z) {
}
} catch (Throwable unused) {
return false;
}
}
@Deprecated
public static String b() {
try {
ConnectivityManager connectivityManager = (ConnectivityManager) fa.a("connectivity");
NetworkInfo activeNetworkInfo = connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();
if (activeNetworkInfo == null) {
return "UNKNOWN";
}
return activeNetworkInfo.getTypeName().toUpperCase() + "[" + activeNetworkInfo.getSubtypeName() + "]";
} catch (Throwable unused) {
return "UNKNOWN";
}
}
private int d() {
int i = this.e;
int i2 = this.f2027a;
return i < i2 ? i : i2;
}
public final double a(int i) {
if (i >= 0 && i < d()) {
double[] dArr = this.f2028b;
int i2 = this.e;
int i3 = this.f2027a;
if (i2 >= i3) {
i = ((this.f2030d + i) + i3) % i3;
}
return dArr[i];
}
throw new ArrayIndexOutOfBoundsException("cache max size is " + this.f2027a + ",current size is " + d() + ",index is " + i);
}
public final void a(double d2) {
double d3 = this.f2029c;
double[] dArr = this.f2028b;
int i = this.f2030d;
this.f2029c = d3 - dArr[i];
this.f2029c += d2;
dArr[i] = d2;
this.f2030d = i + 1;
if (this.f2030d == this.f2027a) {
this.f2030d = 0;
}
int i2 = this.e;
if (i2 < Integer.MAX_VALUE) {
this.e = i2 + 1;
}
}
public final void c() {
this.f2030d = 0;
this.e = 0;
this.f2029c = 0.0d;
Arrays.fill(this.f2028b, 0.0d);
}
}