|
Edited by antsm at 2016-5-27 16:41 \n\n Edited by antsm at 2016-5-27 16:38 varotone,
Here is a workaround to fix a problem with double tap.
At "android/platform/frameworks/base/services/java/com/android/server/power/PowerManagerService.java" look for a "public void goToSleep(long eventTime, int reason)" method and put there at the beginnig something like:
- final String state = "on";
- FileOutputStream localFileOutputStream = new FileOutputStream("/sys/class/TP-UNLOCK/device/gesture");
- localFileOutputStream.write(state.getBytes());
- localFileOutputStream.flush();
- localFileOutputStream.close();
Copy the Code
This will force turn on double tap every time just before the screen turns off.
In order to make a switcher located in "Settings -> Display" work properly, you could store user choice at settings.db (could be done in "/cmhw/org/cyanogenmod/hardware/TapToWake.java") and modify the code given above to check that before.
As a temporal solution i have made an Xposed module:
tapfix_0.1_ANT.zip
(9.42 KB, Downloads: 9)
|
|