package org.metawatch.manager;

import org.metawatch.manager.MetaWatchService.Preferences;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BootCompletedReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent)
	{
		 if(Preferences.autoConnect) {
			 context.startService(new Intent(context, MetaWatchService.class));
			 if (Preferences.logging) Log.v(MetaWatch.TAG, "Service loaded at start");
		 }
	     
	}

}

@@ -351,17 +351,61 @@
 t)%0A%09%7B%0A%09%09
- 
+MetaWatchService.loadPreferences(context);%0A%09%09
 if(Prefe
@@ -429,17 +429,16 @@
 t) %7B%0A%09%09%09
- 
 context.
@@ -499,17 +499,16 @@
 s));%0A%09%09%09
- 
 if (Pref
@@ -579,13 +579,9 @@
 ;%0A%09%09
- %7D%0A%09 
+%7D
     

Load preferences before checking them