Android: Attempt to move the BOINC Monitor into its own process space.

This commit is contained in:
Rom Walton 2013-02-18 16:58:37 -05:00 committed by Oliver Bock
parent 6fb016bad3
commit cf84368877
3 changed files with 9 additions and 4 deletions

View File

@ -54,7 +54,7 @@
<action android:name="edu.berkeley.boinc.log" />
</intent-filter>
</activity>
<service android:name=".client.Monitor"></service>
<service android:name="edu.berkeley.boinc.client.Monitor" android:process=":monitor" android:enabled="true"></service>
<service android:name="edu.berkeley.boinc.client.ClientRemoteService"
android:enabled="true"
android:exported="true"></service>

View File

@ -33,7 +33,7 @@ import android.util.Log;
public class BootReceiver extends BroadcastReceiver {
private final String TAG = "BootReceiver";
private final String TAG = "BOINC BootReceiver";
private NotificationManager mNM;
@Override
@ -41,6 +41,7 @@ public class BootReceiver extends BroadcastReceiver {
AppPreferences prefs = new AppPreferences();
prefs.readPrefs(context);
if(prefs.getAutostart()) {
Log.d(TAG,"autostart enabled, start Monitor...");
Intent startServiceIntent = new Intent(context, Monitor.class);
@ -60,6 +61,7 @@ public class BootReceiver extends BroadcastReceiver {
// do nothing
Log.d(TAG,"autostart disabeld");
}
}
}

View File

@ -26,7 +26,10 @@ import android.content.Intent;
public class LogReceiver extends BroadcastReceiver {
private final String TAG = "BOINC LogReceiver";
public static ArrayList<String> logHub = new ArrayList<String>();
@Override
public void onReceive(Context context, Intent intent) {
String tag = intent.getStringExtra("tag");
@ -35,8 +38,8 @@ public class LogReceiver extends BroadcastReceiver {
}
String message = intent.getStringExtra("message");
String entry = tag + " - " + message;
//Log.d("LogReceiver", entry);
LogReceiver.logHub.add(entry);
}
//Log.d(TAG, entry);
}
}