热汗舞蹈 v1.24.1.0版本的 MD5 值为:f1dc6ef07903515a73f51f41f372123e

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


package cn.com.chinatelecom.account.api.e;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import androidx.exifinterface.media.ExifInterface;
import cn.com.chinatelecom.account.api.CtAuth;
import com.qiyukf.nimlib.sdk.migration.model.MigrationConstant;
import com.sensorsdata.analytics.android.sdk.data.adapter.DbParams;
import com.tencent.thumbplayer.tplayer.plugins.report.TPReportParams;
import java.lang.reflect.Method;
public class g {
    public static String f2963a = null;
    public static String f2964b = null;
    public static String f2965c = null;
    public static String f2966d = "0";
    private static final String[] f2967e = {"46000", "46002", "46004", "46007", "46008"};
    private static final String[] f2968f = {"46003", "46005", "46011"};
    private static final String[] f2969g = {"46001", "46006", "46009"};

    private static int a(int i10) {
        int i11 = MigrationConstant.EXPORT_ERR_LOCAL_FORMAT;
        if (i10 != -101) {
            i11 = -1;
            if (i10 != -1) {
                switch (i10) {
                    case 1:
                    case 2:
                    case 4:
                    case 7:
                    case 11:
                    case 16:
                        return 1;
                    case 3:
                    case 5:
                    case 6:
                    case 8:
                    case 9:
                    case 10:
                    case 12:
                    case 14:
                    case 15:
                    case 17:
                        return 2;
                    case 13:
                    case 18:
                    case 19:
                        return 3;
                    case 20:
                        return 4;
                    default:
                        return i10;
                }
            }
        }
        return i11;
    }

    public static NetworkInfo a(Context context) {
        if (context == null) {
            return null;
        }
        return ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
    }

    public static String a() {
        return f2963a;
    }

    public static String a(Context context, boolean z10) {
        String h10 = h(context);
        if (h10 != null) {
            for (String str : f2968f) {
                if (h10.equals(str)) {
                    return z10 ? "1" : "CT";
                }
            }
            for (String str2 : f2967e) {
                if (h10.equals(str2)) {
                    return z10 ? "2" : "CM";
                }
            }
            for (String str3 : f2969g) {
                if (h10.equals(str3)) {
                    return z10 ? ExifInterface.GPS_MEASUREMENT_3D : "CU";
                }
            }
        }
        return z10 ? TPReportParams.ERROR_CODE_NO_ERROR : "UN";
    }

    public static String b() {
        return f2964b != null ? "https://open.e.189.cn/openapi/special/getTimeStamp.do".replace(cn.com.chinatelecom.account.api.a.d.a(b.f2929g), f2964b) : "https://open.e.189.cn/openapi/special/getTimeStamp.do";
    }

    public static boolean b(Context context) {
        NetworkInfo a10 = a(context);
        return a10 != null && a10.isAvailable();
    }

    public static String c() {
        String str = f2965c;
        return str != null ? "https://api-e189.21cn.com/gw/client/accountMsg.do".replace("e189.21cn.com", str) : "https://api-e189.21cn.com/gw/client/accountMsg.do";
    }

    public static boolean c(Context context) {
        NetworkInfo a10 = a(context);
        return a10 != null && a10.getType() == 0;
    }

    public static boolean d(Context context) {
        if (context == null) {
            return true;
        }
        try {
            Method declaredMethod = ConnectivityManager.class.getDeclaredMethod("getMobileDataEnabled", new Class[0]);
            declaredMethod.setAccessible(true);
            return ((Boolean) declaredMethod.invoke((ConnectivityManager) context.getApplicationContext().getSystemService("connectivity"), new Object[0])).booleanValue();
        } catch (Throwable th) {
            CtAuth.warn("NetUtil", "isMobileEnable error ", th);
            return true;
        }
    }

    public static String e(Context context) {
        int j10 = j(context);
        return j10 != -101 ? (j10 == -1 || j10 == 0) ? "null" : j10 != 1 ? j10 != 2 ? j10 != 3 ? j10 != 4 ? Integer.toString(j10) : "5G" : "4G" : "3G" : "2G" : "WIFI";
    }

    public static String f(Context context) {
        String e10 = e(context);
        return (e10 != null && e10.equals("WIFI") && d(context)) ? "BOTH" : e10;
    }

    public static String g(Context context) {
        String f10 = f(context);
        if (!TextUtils.isEmpty(f10) && !f10.equals("null")) {
            if (f10.equals("2G")) {
                return "10";
            }
            if (f10.equals("3G")) {
                return "11";
            }
            if (f10.equals("4G")) {
                return "12";
            }
            if (f10.equals("5G")) {
                return "16";
            }
            if (f10.equals("WIFI")) {
                return DbParams.GZIP_TRANSPORT_ENCRYPT;
            }
            if (f10.equals("BOTH")) {
                return "14";
            }
        }
        return "15";
    }

    public static String h(Context context) {
        try {
            String simOperator = ((TelephonyManager) context.getSystemService("phone")).getSimOperator();
            return !TextUtils.isEmpty(simOperator) ? simOperator : "00000";
        } catch (Throwable th) {
            th.printStackTrace();
            return "00000";
        }
    }

    public static String i(Context context) {
        return a(context, true);
    }

    private static int j(Context context) {
        int i10 = 0;
        try {
            NetworkInfo a10 = a(context);
            if (a10 != null && a10.isAvailable() && a10.isConnected()) {
                int type = a10.getType();
                if (type == 1) {
                    i10 = MigrationConstant.EXPORT_ERR_LOCAL_FORMAT;
                } else if (type == 0) {
                    try {
                        i10 = ((TelephonyManager) context.getSystemService("phone")).getNetworkType();
                    } catch (Exception e10) {
                        e10.printStackTrace();
                    }
                    if (i10 == 0) {
                        i10 = a10.getSubtype();
                    }
                }
            } else {
                i10 = -1;
            }
        } catch (NullPointerException e11) {
            e11.printStackTrace();
        } catch (Exception e12) {
            e12.printStackTrace();
        }
        return a(i10);
    }
}