From: Michael Gernoth Date: Fri, 20 May 2011 17:47:36 +0000 (+0200) Subject: add service, which just gets root currently X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes/commitdiff_plain/ae569a500894da05f1cb0bfda9ad490cf288b955 add service, which just gets root currently --- diff --git a/MS2Debounce/AndroidManifest.xml b/MS2Debounce/AndroidManifest.xml index a1e7f01..ddbbbb3 100644 --- a/MS2Debounce/AndroidManifest.xml +++ b/MS2Debounce/AndroidManifest.xml @@ -11,5 +11,6 @@ + diff --git a/MS2Debounce/res/values/strings.xml b/MS2Debounce/res/values/strings.xml index 3e427ab..b5ae1c6 100644 --- a/MS2Debounce/res/values/strings.xml +++ b/MS2Debounce/res/values/strings.xml @@ -1,4 +1,4 @@ - MS2Debounce + Milestone 2 Debounce diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java new file mode 100644 index 0000000..f9f81bb --- /dev/null +++ b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceService.java @@ -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(); + } +} diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java b/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java index c09869b..99ca40d 100644 --- a/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java +++ b/MS2Debounce/src/de/rmdir/ms2debounce/MS2Debounce.java @@ -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); } }