From 1d2be5c5c2c63173ee6dd353109854e354604518 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Tue, 30 Oct 2012 21:03:35 +0100 Subject: [PATCH] don't try to load the module if it is already loaded --- .../src/de/rmdir/ms2debounce/DebounceModuleHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java index 2b088d7..1a424f8 100644 --- a/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java +++ b/MS2Debounce/src/de/rmdir/ms2debounce/DebounceModuleHelper.java @@ -82,6 +82,10 @@ public class DebounceModuleHelper } public synchronized boolean _loadModule() throws NotRootedException,ShellException { + if (isLoaded()) { + return true; + } + File insmod = new File("/system/bin/insmod"); if (!insmod.exists()) { insmod = new File("/system/xbin/insmod"); -- 2.39.5