Aqara Home v2.4.1版本的 MD5 值为:529779ac2bc0131db52a1fc3098d2b35
以下内容为反编译后的 s.java 源代码,内容仅作参考
package com.loc;
import android.content.Context;
import android.database.Cursor;
import android.net.Proxy;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.URI;
import java.util.List;
import java.util.Locale;
public final class s {
public static String a() {
String str;
try {
str = Proxy.getDefaultHost();
} catch (Throwable th) {
ab.b(th, "pu", "gdh");
str = null;
}
return str == null ? "null" : str;
}
public static java.net.Proxy a(Context context) {
try {
return Build.VERSION.SDK_INT >= 11 ? a(context, new URI("http://restapi.amap.com")) : b(context);
} catch (Throwable th) {
ab.b(th, "pu", "gp");
return null;
}
}
public static java.net.Proxy a(Context context, URI uri) {
java.net.Proxy proxy;
if (c(context)) {
try {
List<java.net.Proxy> select = ProxySelector.getDefault().select(uri);
if (select == null || select.isEmpty() || (proxy = select.get(0)) == null) {
return null;
}
if (proxy.type() == Proxy.Type.DIRECT) {
return null;
}
return proxy;
} catch (Throwable th) {
ab.b(th, "pu", "gpsc");
}
}
return null;
}
public static int b() {
try {
return android.net.Proxy.getDefaultPort();
} catch (Throwable th) {
ab.b(th, "pu", "gdp");
return -1;
}
}
public static java.net.Proxy b(Context context) {
Cursor cursor;
int i2;
String t2;
int i3;
boolean z2;
boolean z3;
int b;
boolean z4;
boolean z5;
if (c(context)) {
Uri parse = Uri.parse("content://telephony/carriers/preferapn");
?? contentResolver = context.getContentResolver();
String str = null;
boolean z6 = false;
try {
try {
cursor = contentResolver.query(parse, null, null, null, null);
} catch (Throwable th) {
if (contentResolver != 0) {
try {
contentResolver.close();
} catch (Throwable th2) {
ab.b(th2, "pu", "gPx2");
}
}
throw th;
}
} catch (SecurityException e2) {
e = e2;
cursor = null;
str = null;
} catch (Throwable th3) {
th = th3;
cursor = null;
str = null;
}
if (cursor != null) {
try {
} catch (SecurityException e3) {
e = e3;
str = null;
i2 = -1;
ab.b(e, "pu", "ghp");
t2 = n.t(context);
if (t2 != null) {
}
if (cursor != null) {
}
i2 = i3;
if (str != null) {
}
if (z6) {
}
return null;
} catch (Throwable th4) {
th = th4;
str = null;
i2 = -1;
ab.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (str != null) {
}
if (z6) {
}
return null;
}
if (cursor.moveToFirst()) {
String string = cursor.getString(cursor.getColumnIndex("apn"));
i2 = parse;
if (string != null) {
Locale locale = Locale.US;
string = string.toLowerCase(locale);
i2 = locale;
}
try {
try {
if (string != null && string.contains("ctwap")) {
String a = a();
b = b();
if (TextUtils.isEmpty(a) || a.equals("null")) {
str = null;
z5 = false;
} else {
str = a;
z5 = true;
}
if (!z5) {
str = u.c("QMTAuMC4wLjIwMA==");
}
} else if (string != null && string.contains("wap")) {
String a2 = a();
b = b();
if (TextUtils.isEmpty(a2) || a2.equals("null")) {
str = null;
z4 = false;
} else {
str = a2;
z4 = true;
}
if (!z4) {
str = u.c("QMTAuMC4wLjE3Mg==");
}
}
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th5) {
ab.b(th5, "pu", "gPx2");
}
}
i2 = r18;
} catch (SecurityException e4) {
e = e4;
ab.b(e, "pu", "ghp");
t2 = n.t(context);
if (t2 != null) {
String lowerCase = t2.toLowerCase(Locale.US);
String a3 = a();
i3 = b();
if (lowerCase.indexOf("ctwap") != -1) {
if (TextUtils.isEmpty(a3) || a3.equals("null")) {
z3 = false;
} else {
str = a3;
z3 = true;
}
if (!z3) {
str = u.c("QMTAuMC4wLjIwMA==");
}
if (i3 == -1) {
i3 = 80;
}
} else if (lowerCase.indexOf("wap") != -1) {
if (TextUtils.isEmpty(a3) || a3.equals("null")) {
z2 = false;
} else {
str = a3;
z2 = true;
}
if (!z2) {
str = u.c("QMTAuMC4wLjE3Mg==");
}
i3 = 80;
}
} else {
i3 = i2;
}
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th6) {
ab.b(th6, "pu", "gPx2");
}
}
i2 = i3;
if (str != null) {
}
if (z6) {
}
return null;
} catch (Throwable th7) {
th = th7;
ab.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th8) {
ab.b(th8, "pu", "gPx2");
}
}
if (str != null) {
}
if (z6) {
}
return null;
}
} catch (SecurityException e5) {
e = e5;
str = null;
ab.b(e, "pu", "ghp");
t2 = n.t(context);
if (t2 != null) {
}
if (cursor != null) {
}
i2 = i3;
if (str != null) {
}
if (z6) {
}
return null;
} catch (Throwable th9) {
th = th9;
str = null;
ab.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (str != null) {
}
if (z6) {
}
return null;
}
if (str != null) {
try {
if (str.length() > 0 && i2 != -1) {
z6 = true;
}
} catch (Throwable th10) {
y.a(th10, "pu", "gp2");
th10.printStackTrace();
}
}
if (z6) {
return new java.net.Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(str, i2));
}
}
}
str = null;
int i4 = -1;
if (cursor != null) {
}
i2 = i4;
if (str != null) {
}
if (z6) {
}
}
return null;
}
public static boolean c(Context context) {
return n.r(context) == 0;
}
}