]> git.zerfleddert.de Git - ms2-fixes/blobdiff - MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java
Check if it is safe to load the module on boot
[ms2-fixes] / MS2Debounce / src / de / rmdir / ms2debounce / MS2Debounce.java
index 99ca40dc16f3c74380e7c9f8a27a1b5b74ff87ef..4f8e703cd6620b309af1e86607f410a10a4e726c 100644 (file)
@@ -3,18 +3,24 @@ package de.rmdir.ms2debounce;
 import android.app.Activity;
 import android.os.Bundle;
 import android.content.Intent;
+import android.widget.TextView;
 
 public class MS2Debounce extends Activity
 {
-    /** Called when the activity is first created. */
-    @Override
-    public void onCreate(Bundle savedInstanceState)
-    {
-        super.onCreate(savedInstanceState);
+       @Override
+       public void onCreate(Bundle savedInstanceState)
+       {
+               super.onCreate(savedInstanceState);
 
-       Intent debouncesvc = new Intent(this, DebounceService.class);
-       startService(debouncesvc);
+               DebounceModuleHelper module = new DebounceModuleHelper(this);
 
-        setContentView(R.layout.main);
-    }
+               if (!module.isLoaded()) {
+                       module.loadModule();
+               }
+
+               setContentView(R.layout.main);
+
+               TextView text = (TextView)findViewById(R.id.text);
+               text.setText("You will soon be able to set the debounce_delay here.\nModule loaded: " + module.isLoaded() + "\ndebounce_delay: " + module.getDelay() + "ms\nsafe_to_load: " + module.is_safe_to_load());
+       }
 }
Impressum, Datenschutz