同程有借 v1.0.0版本的 MD5 值为:e33397cdbab33543d0c134ec96d77fb8
以下内容为反编译后的 v.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 v {
private static String a() {
String str;
try {
str = Proxy.getDefaultHost();
} catch (Throwable th) {
av.b(th, "pu", "gdh");
str = null;
}
return str == null ? "null" : str;
}
private static String a(String str) {
return x.c(str);
}
public static java.net.Proxy a(Context context) {
try {
return Build.VERSION.SDK_INT >= 11 ? a(context, new URI("http://restsdk.amap.com")) : b(context);
} catch (Throwable th) {
av.b(th, "pu", "gp");
return null;
}
}
private 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) {
av.b(th, "pu", "gpsc");
}
}
return null;
}
private static int b() {
try {
return android.net.Proxy.getDefaultPort();
} catch (Throwable th) {
av.b(th, "pu", "gdp");
return -1;
}
}
private static java.net.Proxy b(Context context) {
Cursor cursor;
int i9;
String p9;
int i10;
boolean z8;
boolean z9;
int b9;
boolean z10;
boolean z11;
if (c(context)) {
Uri parse = Uri.parse("content://telephony/carriers/preferapn");
?? contentResolver = context.getContentResolver();
String str = null;
boolean z12 = false;
try {
try {
cursor = contentResolver.query(parse, null, null, null, null);
} catch (Throwable th) {
if (contentResolver != 0) {
try {
contentResolver.close();
} catch (Throwable th2) {
av.b(th2, "pu", "gPx2");
}
}
throw th;
}
} catch (SecurityException e9) {
e = e9;
cursor = null;
str = null;
} catch (Throwable th3) {
th = th3;
cursor = null;
str = null;
}
if (cursor != null) {
try {
} catch (SecurityException e10) {
e = e10;
str = null;
i9 = -1;
av.b(e, "pu", "ghp");
p9 = o.p(context);
if (p9 != null) {
}
if (cursor != null) {
}
i9 = i10;
if (str != null) {
}
if (z12) {
}
return null;
} catch (Throwable th4) {
th = th4;
str = null;
i9 = -1;
av.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (str != null) {
}
if (z12) {
}
return null;
}
if (cursor.moveToFirst()) {
String string = cursor.getString(cursor.getColumnIndex("apn"));
i9 = parse;
if (string != null) {
Locale locale = Locale.US;
string = string.toLowerCase(locale);
i9 = locale;
}
try {
try {
if (string != null && string.contains("ctwap")) {
String a9 = a();
b9 = b();
if (TextUtils.isEmpty(a9) || a9.equals("null")) {
str = null;
z11 = false;
} else {
str = a9;
z11 = true;
}
if (!z11) {
str = a("QMTAuMC4wLjIwMA==");
}
} else if (string != null && string.contains("wap")) {
String a10 = a();
b9 = b();
if (TextUtils.isEmpty(a10) || a10.equals("null")) {
str = null;
z10 = false;
} else {
str = a10;
z10 = true;
}
if (!z10) {
str = a("QMTAuMC4wLjE3Mg==");
}
}
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th5) {
av.b(th5, "pu", "gPx2");
}
}
i9 = r18;
} catch (SecurityException e11) {
e = e11;
av.b(e, "pu", "ghp");
p9 = o.p(context);
if (p9 != null) {
String lowerCase = p9.toLowerCase(Locale.US);
String a11 = a();
i10 = b();
if (lowerCase.indexOf("ctwap") != -1) {
if (TextUtils.isEmpty(a11) || a11.equals("null")) {
z9 = false;
} else {
str = a11;
z9 = true;
}
if (!z9) {
str = a("QMTAuMC4wLjIwMA==");
}
if (i10 == -1) {
i10 = 80;
}
} else if (lowerCase.indexOf("wap") != -1) {
if (TextUtils.isEmpty(a11) || a11.equals("null")) {
z8 = false;
} else {
str = a11;
z8 = true;
}
if (!z8) {
str = a("QMTAuMC4wLjE3Mg==");
}
i10 = 80;
}
} else {
i10 = i9;
}
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th6) {
av.b(th6, "pu", "gPx2");
}
}
i9 = i10;
if (str != null) {
}
if (z12) {
}
return null;
} catch (Throwable th7) {
th = th7;
av.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
try {
cursor.close();
} catch (Throwable th8) {
av.b(th8, "pu", "gPx2");
}
}
if (str != null) {
}
if (z12) {
}
return null;
}
} catch (SecurityException e12) {
e = e12;
str = null;
av.b(e, "pu", "ghp");
p9 = o.p(context);
if (p9 != null) {
}
if (cursor != null) {
}
i9 = i10;
if (str != null) {
}
if (z12) {
}
return null;
} catch (Throwable th9) {
th = th9;
str = null;
av.b(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (str != null) {
}
if (z12) {
}
return null;
}
if (str != null) {
try {
if (str.length() > 0 && i9 != -1) {
z12 = true;
}
} catch (Throwable th10) {
as.a(th10, "pu", "gp2");
th10.printStackTrace();
}
}
if (z12) {
return new java.net.Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(str, i9));
}
}
}
str = null;
int i11 = -1;
if (cursor != null) {
}
i9 = i11;
if (str != null) {
}
if (z12) {
}
}
return null;
}
private static boolean c(Context context) {
return o.n(context) == 0;
}
}