add service, which just gets root currently
authorMichael Gernoth <michael@gernoth.net>
Fri, 20 May 2011 17:47:36 +0000 (19:47 +0200)
committerMichael Gernoth <michael@gernoth.net>
Fri, 20 May 2011 17:47:36 +0000 (19:47 +0200)
MS2Debounce/AndroidManifest.xml
MS2Debounce/res/values/strings.xml
MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java [new file with mode: 0644]
MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java

index a1e7f017c9942f879843c461532a91699e88d7e2..ddbbbb3dcfe681e9cbc2f3c6cb9d5e47d6df6223 100644 (file)
@@ -11,5 +11,6 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+       <service android:name=".DebounceService"/>
     </application>
 </manifest> 
index 3e427ab70c7936722ca0719fa3305007a8e43a7f..b5ae1c6f08d55f8613c0e1ce93e43ddd752a80a0 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <string name="app_name">MS2Debounce</string>
+    <string name="app_name">Milestone 2 Debounce</string>
 </resources>
diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java
new file mode 100644 (file)
index 0000000..f9f81bb
--- /dev/null
@@ -0,0 +1,24 @@
+package de.rmdir.ms2debounce;
+
+import android.content.Intent;
+import android.app.IntentService;
+
+public class DebounceService extends IntentService {
+
+       // Create worker thread
+       public DebounceService() {
+               super("DebounceService");
+       }
+
+       @Override
+       protected void onHandleIntent(Intent intent) {
+       }
+
+       @Override
+       public void onCreate() {
+               try {
+                       Process ps = Runtime.getRuntime().exec("su");
+               } catch (Exception e) {}
+               super.onCreate();
+       }
+}
index c09869b70abd3ab7b03503f81eb058eed2cf7020..99ca40dc16f3c74380e7c9f8a27a1b5b74ff87ef 100644 (file)
@@ -2,6 +2,7 @@ package de.rmdir.ms2debounce;
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.content.Intent;
 
 public class MS2Debounce extends Activity
 {
@@ -10,6 +11,10 @@ public class MS2Debounce extends Activity
     public void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);
+
+       Intent debouncesvc = new Intent(this, DebounceService.class);
+       startService(debouncesvc);
+
         setContentView(R.layout.main);
     }
 }
Impressum, Datenschutz