@@ -0,0 +1,1507 @@
+package org.muteswan.client;%0A%0Aimport android.app.AlarmManager;%0Aimport android.content.BroadcastReceiver;%0Aimport android.content.Context;%0Aimport android.content.Intent;%0Aimport android.content.SharedPreferences;%0Aimport android.os.SystemClock;%0Aimport android.preference.PreferenceManager;%0Aimport android.util.Log;%0A%0Apublic class OnBootReceiver extends BroadcastReceiver %7B%0A%0A        @Override%0A        public void onReceive(Context context, Intent intent) %7B%0A%0A                if (intent.getAction() != null%0A                                && intent.getAction().equals(%22android.intent.action.BOOT_COMPLETED%22))%0A                %7B%0A                  Log.v(%22MuteswanOnBoot%22, %22Registering service if configured.%22);%0A          %09%09  SharedPreferences defPrefs = PreferenceManager.getDefaultSharedPreferences(context);%0A             %09%09%0A           %09%09  boolean backgroundMessageCheck = defPrefs.getBoolean(%22backgroundMessageCheck%22, false);%09%09%09%0A           %09%09  if (backgroundMessageCheck == true) %7B%0A           %09%09   Integer checkMsgInterval = Integer.parseInt(defPrefs.getString(%22checkMsgInterval%22, %225%22));%0A           %09%09%0A           %09%09   int checkMsgIntervalMs = checkMsgInterval * 60 * 1000;%0A           %09%09%0A           %09%09   AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);%0A           %09%09   alarm.setRepeating(AlarmManager.RTC_WAKEUP, SystemClock.elapsedRealtime()+checkMsgInterval*60,checkMsgIntervalMs,NewMessageReceiver.getPendingIntent(context));%0A           %09%09  %7D%0A                %7D%0A%0A%0A        %7D%0A%0A%0A%7D%0A%0A

Remove unused activities, add OnBootReceiver to ensure service starts (if configured) on boot.