湘游汇 v1.0版本的 MD5 值为:85338391d88b5d57da66e240ece801c7
以下内容为反编译后的 ei.java 源代码,内容仅作参考
package com.b;
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 ei {
private static String a() {
String str;
try {
str = Proxy.getDefaultHost();
} catch (Throwable th) {
b.a(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://restsdk.amap.com")) : b(context);
} catch (Throwable th) {
b.a(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) {
b.a(th, "pu", "gpsc");
}
}
return null;
}
private static int b() {
try {
return android.net.Proxy.getDefaultPort();
} catch (Throwable th) {
b.a(th, "pu", "gdp");
return -1;
}
}
private static java.net.Proxy b(Context context) {
Cursor cursor;
Object obj;
String s;
boolean z;
boolean z2;
int b;
String str;
boolean z3;
String str2;
boolean z4;
if (c(context)) {
String parse = Uri.parse("content://telephony/carriers/preferapn");
?? contentResolver = context.getContentResolver();
int i = 0;
Object obj2 = null;
int i2 = 80;
boolean z5 = false;
try {
} catch (Throwable th) {
th = th;
}
try {
try {
cursor = contentResolver.query(parse, null, null, null, null);
} catch (Throwable th2) {
b.a(th2, "pu", "gPx2");
}
} catch (SecurityException e) {
e = e;
cursor = null;
obj2 = null;
} catch (Throwable th3) {
th = th3;
cursor = null;
obj = null;
}
if (cursor != null) {
try {
} catch (SecurityException e2) {
e = e2;
obj2 = null;
i = -1;
b.a(e, "pu", "ghp");
s = ed.s(context);
if (s != null) {
String lowerCase = s.toLowerCase(Locale.US);
String a2 = a();
i = b();
if (lowerCase.indexOf("ctwap") != -1) {
if (TextUtils.isEmpty(a2) || a2.equals("null")) {
parse = obj2;
z2 = false;
} else {
z2 = true;
parse = a2;
}
if (!z2) {
parse = ek.c("QMTAuMC4wLjIwMA==");
}
if (i != -1) {
i2 = i;
}
} else if (lowerCase.indexOf("wap") != -1) {
if (TextUtils.isEmpty(a2) || a2.equals("null")) {
parse = obj2;
z = false;
} else {
z = true;
parse = a2;
}
if (!z) {
parse = ek.c("QMTAuMC4wLjE3Mg==");
}
}
if (cursor != null) {
cursor.close();
parse = parse;
}
if (parse != 0) {
}
if (z5) {
}
return null;
}
i2 = i;
parse = obj2;
if (cursor != null) {
}
if (parse != 0) {
}
if (z5) {
}
return null;
} catch (Throwable th4) {
th = th4;
obj = null;
i2 = -1;
parse = obj;
b.a(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
cursor.close();
parse = parse;
}
if (parse != 0) {
}
if (z5) {
}
return null;
}
if (cursor.moveToFirst()) {
String string = cursor.getString(cursor.getColumnIndex("apn"));
if (string != null) {
Locale locale = Locale.US;
string = string.toLowerCase(locale);
i = locale;
}
try {
try {
if (string != null && string.contains("ctwap")) {
String a3 = a();
b = b();
if (TextUtils.isEmpty(a3) || a3.equals("null")) {
str2 = null;
z4 = false;
} else {
str2 = a3;
z4 = true;
}
parse = !z4 ? ek.c("QMTAuMC4wLjIwMA==") : str2;
} else if (string != null && string.contains("wap")) {
String a4 = a();
b = b();
if (TextUtils.isEmpty(a4) || a4.equals("null")) {
str = null;
z3 = false;
} else {
str = a4;
z3 = true;
}
parse = !z3 ? ek.c("QMTAuMC4wLjE3Mg==") : str;
}
} catch (SecurityException e3) {
e = e3;
obj2 = null;
b.a(e, "pu", "ghp");
s = ed.s(context);
if (s != null) {
}
i2 = i;
parse = obj2;
if (cursor != null) {
}
if (parse != 0) {
}
if (z5) {
}
return null;
} catch (Throwable th5) {
th = th5;
parse = 0;
i2 = i;
b.a(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (parse != 0) {
}
if (z5) {
}
return null;
}
} catch (SecurityException e4) {
e = e4;
b.a(e, "pu", "ghp");
s = ed.s(context);
if (s != null) {
}
i2 = i;
parse = obj2;
if (cursor != null) {
}
if (parse != 0) {
}
if (z5) {
}
return null;
} catch (Throwable th6) {
th = th6;
i2 = i;
parse = 0;
b.a(th, "pu", "gPx1");
th.printStackTrace();
if (cursor != null) {
}
if (parse != 0) {
}
if (z5) {
}
return null;
}
b.a(th2, "pu", "gPx2");
if (parse != 0) {
try {
if (parse.length() > 0 && i2 != -1) {
z5 = true;
}
} catch (Throwable th7) {
eo.b(th7, "pu", "gp2");
th7.printStackTrace();
}
}
if (z5) {
return new java.net.Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(parse, i2));
}
}
}
parse = 0;
i2 = -1;
if (cursor != null) {
cursor.close();
parse = parse;
}
if (parse != 0) {
}
if (z5) {
}
}
return null;
}
private static boolean c(Context context) {
return ed.q(context) == 0;
}
}