]> 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 85ec653a1b0960501cf27684fcd7a45d43680384..4f8e703cd6620b309af1e86607f410a10a4e726c 100644 (file)
@@ -3,19 +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);
 
-       if (!DebounceModuleHelper.isLoaded()) {
-               DebounceModuleHelper.loadModule();
-       }
+               DebounceModuleHelper module = new DebounceModuleHelper(this);
+
+               if (!module.isLoaded()) {
+                       module.loadModule();
+               }
 
-        setContentView(R.layout.main);
-    }
+               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