package fr.utc.assos.uvweb.util;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.view.ViewGroup;
import de.keyboardsurfer.android.widget.crouton.Style;

/**
 * A helper class used to determine the current network state, i.e. online or not online
 */
public class ConnectionUtils {
	public static final Style NETWORK_ERROR_STYLE = new Style.Builder()
			.setBackgroundColorValue(Style.holoRedLight)
			.setDuration(2000)
			.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
			.build();

	public static boolean isOnline(Context context) {
		final ConnectivityManager connMgr = (ConnectivityManager)
				context.getSystemService(Context.CONNECTIVITY_SERVICE);
		final NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
		return (networkInfo != null && networkInfo.isConnected());
	}
}

@@ -135,39 +135,8 @@
 fo;%0A
-import android.view.ViewGroup;%0A
 impo
@@ -367,161 +367,20 @@
 LE =
- new
  Style.
-Builder()%0A%09%09%09.setBackgroundColorValue(Style.holoRedLight)%0A%09%09%09.setDuration(2000)%0A%09%09%09.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT)%0A%09%09%09.build()
+ALERT
 ;%0A%0A%09

Update to latest Crouton rev