[DISCONTINUED] CyanogenMod 12.1 (for TCL M3G / converted eMAX Mini)

varotone Post time 2016-5-27 02:07:44 | Show all posts   [Copy link]
278 66437
Author: varotone

[DISCONTINUED] CyanogenMod 12.1 (for TCL M3G / converted eMAX Mini)

  [Copy link]

0

threads

3

posts

200

credits

Platinum Member

Rank: 3Rank: 3

credits
200
Post time 2016-5-20 21:46:26 | Show all posts
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:

  1. final String state = "on";
  2. FileOutputStream localFileOutputStream = new FileOutputStream("/sys/class/TP-UNLOCK/device/gesture");
  3. localFileOutputStream.write(state.getBytes());
  4. localFileOutputStream.flush();
  5. 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: 8)

Comments

LOL thx anymore  Post time 2016-5-23 23:04

0

threads

3

posts

200

credits

Platinum Member

Rank: 3Rank: 3

credits
200
Post time 2016-5-26 02:41:07 | Show all posts
Edited by antsm at 2016-5-26 02:43 \n\nUpdate
Here is a workaround to fix a problem with double tap

Fixed: Doubletap not activated on screen off timeout (i.e without user action).
Hook goToSleepNoUpdateLocked method instead of goToSleepInternal

tapfix_0.2_ANT.zip (9.5 KB, Downloads: 29)

0

threads

3

posts

200

credits

Platinum Member

Rank: 3Rank: 3

credits
200
Post time 2016-5-27 02:07:44 | Show all posts
You have to log in before you can reply Login | WELCOME TO UMIDIGI COMMUNITY

Points Rules

Quick Reply Top Back to list