OP updated
CHANGELOG:
-added DT2W (Double Tap to wake)
Double tap the device anywhere, while screen is off to wake it from deepsleep
SYSFS INTERFACES:
/sys/android_touch/s2w_allow_double_tap -> turn on/off
/sys/android_touch/s2w_double_tap_duration -> how long between double taps
/sys/android_touch/s2w_double_tap_threshold -> thre treshold (so if u double tap to slow, it wont recognize it as wake signal)
Short story why:
I use it on my n4, and talked with maxwen about it. I told him I want that on oneX / One
also, but i dont know how to realize it. Maxwen started in the background to work on it
wihout letting me know. I told him not to push to git so i can learn things on my own...
however, i couldn´t get it working as I havent understood the whole behaviour
of S2W. He taught me how S2W works and gave me some variables to start with...
I did this but I still havent realized how s2w works. He gave me code lines
and explained it again. Then the well know´n click appeard in my head and i started
to understand how things work.
I had a few mistakes in my source, but was able to iron them out. My whole credits
goes out to
@maxwen for his awesome explenations, and helping me until late at night.
He was the first who implemented this but I havent copied it
this time, I wrote it on my own. But without this guy, i would not have been able to realize
it. So please guys, appreciate what he did and give him a few thanks.
I owe u a lot maxwen !