+
+ public int getDelay() {
+ return 10;
+ }
+
+ private synchronized void extractModule() {
+ File debounce_ko = new File(ctx.getFilesDir() + "/debounce.ko");
+
+ if (debounce_ko.exists()) {
+ return;
+ }
+
+ try {
+ InputStream apk = ctx.getAssets().open("debounce.ko");
+ OutputStream mod = ctx.openFileOutput("debounce.ko.tmp", 0);
+
+ //I assume a page is 4k...
+ byte buf[] = new byte[4096];
+ int bytes;
+
+ while((bytes = apk.read(buf)) != -1) {
+ mod.write(buf, 0, bytes);
+ }
+
+ apk.close();
+ mod.close();
+
+ File tmpfile = new File(debounce_ko + ".tmp");
+ tmpfile.renameTo(debounce_ko);
+ } catch (Exception e) {}
+ }