From 0c4d887cedf2d981df24dcf7716b283be10e64e6 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Thu, 6 Sep 2012 20:24:05 +0200 Subject: [PATCH] better error-handling when executing commands as root --- MS2Debounce/AndroidManifest.xml | 4 +- .../ms2debounce/DebounceBootReceiver.java | 4 +- .../ms2debounce/DebounceModuleHelper.java | 55 ++++++++++--------- .../src/de/rmdir/ms2debounce/MS2Debounce.java | 51 +++++++++++++++-- .../rmdir/ms2debounce/NotRootedException.java | 4 ++ .../de/rmdir/ms2debounce/ShellException.java | 4 ++ 6 files changed, 88 insertions(+), 34 deletions(-) create mode 100644 MS2Debounce/src/de/rmdir/ms2debounce/NotRootedException.java create mode 100644 MS2Debounce/src/de/rmdir/ms2debounce/ShellException.java diff --git a/MS2Debounce/AndroidManifest.xml b/MS2Debounce/AndroidManifest.xml index 3d999b1..d4b5fc9 100644 --- a/MS2Debounce/AndroidManifest.xml +++ b/MS2Debounce/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="5" + android:versionName="1.5"> \n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA") diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/NotRootedException.java b/MS2Debounce/src/de/rmdir/ms2debounce/NotRootedException.java new file mode 100644 index 0000000..f07e709 --- /dev/null +++ b/MS2Debounce/src/de/rmdir/ms2debounce/NotRootedException.java @@ -0,0 +1,4 @@ +package de.rmdir.ms2debounce; + +class NotRootedException extends Exception { +} diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/ShellException.java b/MS2Debounce/src/de/rmdir/ms2debounce/ShellException.java new file mode 100644 index 0000000..fcf7526 --- /dev/null +++ b/MS2Debounce/src/de/rmdir/ms2debounce/ShellException.java @@ -0,0 +1,4 @@ +package de.rmdir.ms2debounce; + +class ShellException extends Exception { +} -- 2.39.2