public static boolean isWifiAvailable(android.content.Context p7)
    {
        android.net.ConnectivityManager v0_2 = ((android.net.ConnectivityManager) p7.getSystemService(connectivity));
        int v1 = 0;
        int v2 = 0;
        if (v0_2 != null) {
            try {
                int v5_1;
                Exception v3 = v0_2.getActiveNetworkInfo();
            } catch (Exception v3) {
                return 0;
            }
            if ((v3 == null) || (!v3.isConnectedOrConnecting())) {
                v5_1 = 0;
            } else {
                v5_1 = 1;
            }
            if (v5_1 != 0) {
                if (v3.getType() == 1) {
                    v2 = 1;
                }
                v1 = v2;
            }
            return v1;
        } else {
            return 0;
        }
    }