360手机助手 v3.3.0版本的 MD5 值为:127c345ad16bbebee6e347381328afd0

以下内容为反编译后的 a.java 源代码,内容仅作参考


package com.qihoo.appstore.e.b;

import android.content.Context;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;

public class a {

    public static final Uri f1448a = Uri.parse("content://telephony/carriers/preferapn");

    private String f1449b;
    private String c;
    private String d;
    private boolean e;
    private int f;
    private String g = "APNManager";

    public a(Context context) {
        c(context);
    }

    private void a(Context context) {
        Cursor cursor;
        Cursor cursor2;
        Cursor cursor3 = null;
        try {
            try {
                cursor = context.getContentResolver().query(f1448a, new String[]{"apn", "proxy", "port"}, null, null, null);
                try {
                    if (cursor == null) {
                        this.e = false;
                        this.f = 3;
                    } else if (cursor.moveToFirst()) {
                        this.f1449b = cursor.getString(cursor.getColumnIndex("apn"));
                        this.d = cursor.getString(cursor.getColumnIndex("proxy"));
                        this.c = cursor.getString(cursor.getColumnIndex("port"));
                        if (com.qihoo.appstore.e.d.k.f1491a) {
                            com.qihoo.appstore.e.d.k.c(this.g, "Apn: " + this.f1449b + " , Proxy: " + this.d + " , Port: " + this.c);
                        }
                        if (this.d == null || this.d.length() <= 0) {
                            String upperCase = this.f1449b.toUpperCase();
                            if (upperCase.equals("CMWAP") || upperCase.equals("UNIWAP") || upperCase.equals("3GWAP")) {
                                this.e = true;
                                this.d = "10.0.0.172";
                                this.c = "80";
                                this.f = 2;
                            } else if (upperCase.equals("CTWAP")) {
                                this.e = true;
                                this.d = "10.0.0.200";
                                this.c = "80";
                                this.f = 2;
                            }
                        }
                        if (this.d == null || this.d.length() <= 0 || this.c == null || this.c.length() <= 0) {
                            this.e = false;
                            this.f = 3;
                        } else {
                            b(context);
                            this.e = true;
                        }
                    }
                    if (cursor != null) {
                        try {
                            cursor.close();
                        } catch (Exception e) {
                        }
                    }
                } catch (Exception e2) {
                    this.e = b(context);
                    if (cursor != null) {
                        try {
                            cursor.close();
                        } catch (Exception e3) {
                        }
                    }
                }
            } catch (Throwable th) {
                cursor3 = cursor2;
                th = th;
                if (cursor3 != null) {
                    try {
                        cursor3.close();
                    } catch (Exception e4) {
                    }
                }
                throw th;
            }
        } catch (Exception e5) {
            cursor = null;
        } catch (Throwable th2) {
            th = th2;
            if (cursor3 != null) {
            }
            throw th;
        }
    }

    private boolean b(Context context) {
        NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getApplicationContext().getSystemService("connectivity")).getActiveNetworkInfo();
        if ("mobile".equalsIgnoreCase(activeNetworkInfo.getTypeName())) {
            String extraInfo = activeNetworkInfo.getExtraInfo();
            if ("cmwap".equalsIgnoreCase(extraInfo) || "3gwap".equalsIgnoreCase(extraInfo) || "uniwap".equalsIgnoreCase(extraInfo)) {
                this.f = 2;
                this.d = "10.0.0.172";
                this.c = "80";
                return true;
            }
            if ("ctwap".equalsIgnoreCase(extraInfo)) {
                this.f = 2;
                this.d = "10.0.0.200";
                this.c = "80";
                return true;
            }
            this.f = 3;
        }
        return false;
    }

    private void c(Context context) {
        NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getApplicationContext().getSystemService("connectivity")).getActiveNetworkInfo();
        if (activeNetworkInfo != null) {
            if (!"wifi".equals(activeNetworkInfo.getTypeName().toLowerCase())) {
                a(context);
            } else {
                this.f = 1;
                this.e = false;
            }
        }
    }

    public String a() {
        return this.d;
    }

    public String b() {
        return this.c;
    }

    public int c() {
        return this.f;
    }

    public boolean d() {
        return this.e;
    }
}