class HaloUtils {

    @Api(1.0)
    public static boolean isNetworkConnected(Context context) {
        boolean networkConnected = false;
        if (context.checkCallingOrSelfPermission(Manifest.permission.ACCESS_NETWORK_STATE) == PackageManager.PERMISSION_GRANTED) {
            ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
            NetworkInfo info = manager.getActiveNetworkInfo();
            networkConnected = info != null && info.isAvailable() && info.isConnected();
        }
        return networkConnected;
    }

    private  HaloUtils();

}