超媒网络 v3.0.0版本的 MD5 值为:e72248abb238993f421967424d9a9515
以下内容为反编译后的 u40.java 源代码,内容仅作参考
package p.a.y.e.a.s.e.net;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
import android.text.format.Formatter;
import com.meizu.cloud.pushsdk.notification.model.NotificationStyle;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import org.json.JSONException;
import org.json.JSONObject;
public class u40 {
private static String lite_do = "$unknown";
public static float lite_do(Context context) {
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver != null) {
return (registerReceiver.getIntExtra("level", 0) * 100.0f) / registerReceiver.getIntExtra("scale", 100);
}
return 0.0f;
}
public static JSONObject lite_for(Context context) {
JSONObject jSONObject = new JSONObject();
Intent registerReceiver = context.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
if (registerReceiver != null) {
int intExtra = registerReceiver.getIntExtra("level", -1);
int intExtra2 = registerReceiver.getIntExtra("scale", -1);
double d = -1.0d;
if (intExtra != -1 && intExtra2 != -1) {
d = intExtra / intExtra2;
}
int intExtra3 = registerReceiver.getIntExtra("status", -1);
int intExtra4 = registerReceiver.getIntExtra("plugged", -1);
int intExtra5 = registerReceiver.getIntExtra("health", -1);
try {
jSONObject.put("br", d + "");
jSONObject.put(NotificationStyle.BASE_STYLE, intExtra3 + "");
jSONObject.put("plugState", intExtra4 + "");
jSONObject.put("health", intExtra5 + "");
} catch (JSONException e) {
e.printStackTrace();
}
}
return jSONObject;
}
public static String lite_if() {
ArrayList arrayList = new ArrayList();
if ("$unknown".equals(lite_do)) {
InetAddress[] inetAddressArr = new InetAddress[0];
try {
inetAddressArr = InetAddress.getAllByName("www.geetest.com");
} catch (UnknownHostException e) {
e.printStackTrace();
}
for (InetAddress inetAddress : inetAddressArr) {
arrayList.add(inetAddress.getHostAddress());
}
lite_do = arrayList.toString();
return arrayList.toString();
}
return lite_do;
}
public static String lite_int(Context context) {
try {
BufferedReader bufferedReader = new BufferedReader(new FileReader("/proc/meminfo"), 8192);
String[] split = bufferedReader.readLine().split("\\s+");
for (String str : split) {
}
long longValue = Long.valueOf(split[1]).longValue() * 1024;
bufferedReader.close();
return Formatter.formatFileSize(context, longValue);
} catch (IOException unused) {
return "$unknown";
}
}
public static boolean lite_new(Context context) {
String property = System.getProperty("http.proxyHost");
String property2 = System.getProperty("http.proxyPort");
if (property2 == null) {
property2 = "-1";
}
return (TextUtils.isEmpty(property) || Integer.parseInt(property2) == -1) ? false : true;
}
}