RbChat v4.56630229版本的 MD5 值为:d137f4b55d6b64b50641a810905f5957

以下内容为反编译后的 t.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 t {
    private static String a() {
        String str;
        try {
            str = Proxy.getDefaultHost();
        } catch (Throwable th) {
            aj.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) {
            aj.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) {
                aj.b(th, "pu", "gpsc");
            }
        }
        return null;
    }

    private static int b() {
        try {
            return android.net.Proxy.getDefaultPort();
        } catch (Throwable th) {
            aj.b(th, "pu", "gdp");
            return -1;
        }
    }

    private static java.net.Proxy b(Context context) {
        Cursor cursor;
        int i;
        String u;
        int i2;
        boolean z;
        boolean z2;
        int b;
        boolean z3;
        boolean z4;
        if (c(context)) {
            Uri parse = Uri.parse("content://telephony/carriers/preferapn");
            ?? contentResolver = context.getContentResolver();
            String str = null;
            boolean z5 = false;
            try {
                try {
                    cursor = contentResolver.query(parse, null, null, null, null);
                } catch (Throwable th) {
                    if (contentResolver != 0) {
                        try {
                            contentResolver.close();
                        } catch (Throwable th2) {
                            aj.b(th2, "pu", "gPx2");
                        }
                    }
                    throw th;
                }
            } catch (SecurityException e) {
                e = e;
                cursor = null;
                str = null;
            } catch (Throwable th3) {
                th = th3;
                cursor = null;
                str = null;
            }
            if (cursor != null) {
                try {
                } catch (SecurityException e2) {
                    e = e2;
                    str = null;
                    i = -1;
                    aj.b(e, "pu", "ghp");
                    u = p.u(context);
                    if (u != null) {
                    }
                    if (cursor != null) {
                    }
                    i = i2;
                    if (str != null) {
                    }
                    if (z5) {
                    }
                    return null;
                } catch (Throwable th4) {
                    th = th4;
                    str = null;
                    i = -1;
                    aj.b(th, "pu", "gPx1");
                    th.printStackTrace();
                    if (cursor != null) {
                    }
                    if (str != null) {
                    }
                    if (z5) {
                    }
                    return null;
                }
                if (cursor.moveToFirst()) {
                    String string = cursor.getString(cursor.getColumnIndex("apn"));
                    i = parse;
                    if (string != null) {
                        Locale locale = Locale.US;
                        string = string.toLowerCase(locale);
                        i = locale;
                    }
                    try {
                        try {
                            if (string != null && string.contains("ctwap")) {
                                String a = a();
                                b = b();
                                if (TextUtils.isEmpty(a) || a.equals("null")) {
                                    str = null;
                                    z4 = false;
                                } else {
                                    str = a;
                                    z4 = true;
                                }
                                if (!z4) {
                                    str = w.c("QMTAuMC4wLjIwMA==");
                                }
                            } else if (string != null && string.contains("wap")) {
                                String a2 = a();
                                b = b();
                                if (TextUtils.isEmpty(a2) || a2.equals("null")) {
                                    str = null;
                                    z3 = false;
                                } else {
                                    str = a2;
                                    z3 = true;
                                }
                                if (!z3) {
                                    str = w.c("QMTAuMC4wLjE3Mg==");
                                }
                            }
                            if (cursor != null) {
                                try {
                                    cursor.close();
                                } catch (Throwable th5) {
                                    aj.b(th5, "pu", "gPx2");
                                }
                            }
                            i = r18;
                        } catch (SecurityException e3) {
                            e = e3;
                            aj.b(e, "pu", "ghp");
                            u = p.u(context);
                            if (u != null) {
                                String lowerCase = u.toLowerCase(Locale.US);
                                String a3 = a();
                                i2 = b();
                                if (lowerCase.indexOf("ctwap") != -1) {
                                    if (TextUtils.isEmpty(a3) || a3.equals("null")) {
                                        z2 = false;
                                    } else {
                                        str = a3;
                                        z2 = true;
                                    }
                                    if (!z2) {
                                        str = w.c("QMTAuMC4wLjIwMA==");
                                    }
                                    if (i2 == -1) {
                                        i2 = 80;
                                    }
                                } else if (lowerCase.indexOf("wap") != -1) {
                                    if (TextUtils.isEmpty(a3) || a3.equals("null")) {
                                        z = false;
                                    } else {
                                        str = a3;
                                        z = true;
                                    }
                                    if (!z) {
                                        str = w.c("QMTAuMC4wLjE3Mg==");
                                    }
                                    i2 = 80;
                                }
                            } else {
                                i2 = i;
                            }
                            if (cursor != null) {
                                try {
                                    cursor.close();
                                } catch (Throwable th6) {
                                    aj.b(th6, "pu", "gPx2");
                                }
                            }
                            i = i2;
                            if (str != null) {
                            }
                            if (z5) {
                            }
                            return null;
                        } catch (Throwable th7) {
                            th = th7;
                            aj.b(th, "pu", "gPx1");
                            th.printStackTrace();
                            if (cursor != null) {
                                try {
                                    cursor.close();
                                } catch (Throwable th8) {
                                    aj.b(th8, "pu", "gPx2");
                                }
                            }
                            if (str != null) {
                            }
                            if (z5) {
                            }
                            return null;
                        }
                    } catch (SecurityException e4) {
                        e = e4;
                        str = null;
                        aj.b(e, "pu", "ghp");
                        u = p.u(context);
                        if (u != null) {
                        }
                        if (cursor != null) {
                        }
                        i = i2;
                        if (str != null) {
                        }
                        if (z5) {
                        }
                        return null;
                    } catch (Throwable th9) {
                        th = th9;
                        str = null;
                        aj.b(th, "pu", "gPx1");
                        th.printStackTrace();
                        if (cursor != null) {
                        }
                        if (str != null) {
                        }
                        if (z5) {
                        }
                        return null;
                    }
                    if (str != null) {
                        try {
                            if (str.length() > 0 && i != -1) {
                                z5 = true;
                            }
                        } catch (Throwable th10) {
                            ag.a(th10, "pu", "gp2");
                            th10.printStackTrace();
                        }
                    }
                    if (z5) {
                        return new java.net.Proxy(Proxy.Type.HTTP, InetSocketAddress.createUnresolved(str, i));
                    }
                }
            }
            str = null;
            int i3 = -1;
            if (cursor != null) {
            }
            i = i3;
            if (str != null) {
            }
            if (z5) {
            }
        }
        return null;
    }

    private static boolean c(Context context) {
        return p.s(context) == 0;
    }
}