]> git.zerfleddert.de Git - ms2-fixes/blobdiff - MS2Debounce/src/de/rmdir/ms2debounce/DebounceBootReceiver.java
start service while booting to prevent module-loading getting killed
[ms2-fixes] / MS2Debounce / src / de / rmdir / ms2debounce / DebounceBootReceiver.java
index 3ab003d12999029efdf7189cdd7a9633c60eac25..a4930709892adeec110b43060a93f5e40528578d 100644 (file)
@@ -8,7 +8,11 @@ public class DebounceBootReceiver extends BroadcastReceiver{
        @Override
        public void onReceive(Context context, Intent intent) {
                if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
-                       DebounceModuleHelper.loadModule();
+                       DebounceModuleHelper module = new DebounceModuleHelper(context);
+
+                       if (module.get_on_boot() && module.is_safe_to_load()) {
+                               context.startService(new Intent(context, DebounceBootService.class));
+                       }
                }
        }
 }
Impressum, Datenschutz