// Path: src/com/wifiafterconnect/Constants.java
// public interface Constants {
// 
// 	public static final String TAG = "WifiAfterConnect";
// 	
// 	public static final String URL_KERNEL_ORG_HTTPS = "https://mirrors.kernel.org/debian/pool/";
// 	public static final String URL_KERNEL_ORG_HTTP = "http://mirrors.kernel.org/debian/pool/";
// 	public static final String URL_GOOGLE_HTTP = "http://www.google.com";
// 	public static final String URL_GOOGLE_HTTPS = "https://www.google.com";
// 	
// 	// Google page is rather large, so let's try and pull a smaller page
// 	// kernel.org should be sufficiently fast and stable for our purposes
// 	public static final String URL_TO_CHECK_HTTP = URL_KERNEL_ORG_HTTP;
// 	public static final String URL_TO_CHECK_HTTPS = URL_KERNEL_ORG_HTTPS;
// 	
// 	public static final int SOCKET_CONNECT_TIMEOUT_MS = 0; //Use TCP timeout
// 	public static final int SOCKET_READ_TIMEOUT_MS = 220000; // this could be really slow in some cases
// 	
// 	
// 	public static final String [] PROTOCOLS = {"http","https"};
// 
// 	public static final int MAX_AUTOMATED_REQUESTS = 10;
// 
// 	// MAX timeout while handling <meta http-equiv="refresh" content="timeout; url=url">
// 	public static final int MAX_REFRESH_TIMEOUT = 15;
// 
// 
// }


import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import com.wifiafterconnect.BuildConfig;
import com.wifiafterconnect.Constants;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.util.Log;
	}
	
	public File getSaveLogLocation () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		if (sharedPrefs.getBoolean ("pref_saveLogDir", true) 
				&&	Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
			return context.getExternalFilesDir(null);
		}
		return context.getFilesDir();
	}
	
	public boolean getAutoDisableWifi () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_AutoDisableWifi", true);
	}
	
	public boolean getReenableWifiQuiet () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_ReenableWifiQuiet", true);
	}

	public boolean getNotifyAuthentication () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_NotifyAuthentication", true);
	}

	public URL getURLToCheckHttp  () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		URL url = null;
		try {
// Path: src/com/wifiafterconnect/Constants.java
// public interface Constants {
// 
// 	public static final String TAG = "WifiAfterConnect";
// 	
// 	public static final String URL_KERNEL_ORG_HTTPS = "https://mirrors.kernel.org/debian/pool/";
// 	public static final String URL_KERNEL_ORG_HTTP = "http://mirrors.kernel.org/debian/pool/";
// 	public static final String URL_GOOGLE_HTTP = "http://www.google.com";
// 	public static final String URL_GOOGLE_HTTPS = "https://www.google.com";
// 	
// 	// Google page is rather large, so let's try and pull a smaller page
// 	// kernel.org should be sufficiently fast and stable for our purposes
// 	public static final String URL_TO_CHECK_HTTP = URL_KERNEL_ORG_HTTP;
// 	public static final String URL_TO_CHECK_HTTPS = URL_KERNEL_ORG_HTTPS;
// 	
// 	public static final int SOCKET_CONNECT_TIMEOUT_MS = 0; //Use TCP timeout
// 	public static final int SOCKET_READ_TIMEOUT_MS = 220000; // this could be really slow in some cases
// 	
// 	
// 	public static final String [] PROTOCOLS = {"http","https"};
// 
// 	public static final int MAX_AUTOMATED_REQUESTS = 10;
// 
// 	// MAX timeout while handling <meta http-equiv="refresh" content="timeout; url=url">
// 	public static final int MAX_REFRESH_TIMEOUT = 15;
// 
// 
// }


// Path: src/com/wifiafterconnect/util/Preferences.java
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import com.wifiafterconnect.BuildConfig;
import com.wifiafterconnect.Constants;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.util.Log;

	}
	
	public File getSaveLogLocation () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		if (sharedPrefs.getBoolean ("pref_saveLogDir", true) 
				&&	Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
			return context.getExternalFilesDir(null);
		}
		return context.getFilesDir();
	}
	
	public boolean getAutoDisableWifi () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_AutoDisableWifi", true);
	}
	
	public boolean getReenableWifiQuiet () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_ReenableWifiQuiet", true);
	}

	public boolean getNotifyAuthentication () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		return sharedPrefs.getBoolean ("pref_NotifyAuthentication", true);
	}

	public URL getURLToCheckHttp  () {
		SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
		URL url = null;
		try {
			url = new URL(sharedPrefs.getString ("pref_URLToCheckHTTP", Constants.URL_TO_CHECK_HTTP));