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 a1e7f01..ddbbbb3 100644 (file)
@@ -11,5 +11,6 @@
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
+       <service android:name=".DebounceService"/>
     </application>
 </manifest> 
index 3e427ab..b5ae1c6 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 c09869b..99ca40d 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