Skip to content

Commit

Permalink
CHANGELOG: Double tap to sleep: fixed QS getting randomly stuck on th…
Browse files Browse the repository at this point in the history
…e screen
  • Loading branch information
siavash79 committed May 19, 2024
1 parent 015c95b commit 99e6d05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/edit2MakeNewCanary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Editing this file will trigger the build script for a new canary..
Editing this file will trigger the build script for a new canary.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ protected void beforeHookedMethod(MethodHookParam param1) throws Throwable {
}

if (!holdScreenTorchEnabled) return;

if ((action == ACTION_DOWN || action == ACTION_MOVE)) {
if(doubleTap || turnedByTTT) //we really don't want to see swipe gestures during TTT
{
ev.setAction(ACTION_DOWN);
}
if (doubleTap && !SystemUtils.isFlashOn() && uptimeMillis() - ev.getDownTime() > HOLD_DURATION) {
turnedByTTT = true;

Expand All @@ -321,9 +326,6 @@ protected void beforeHookedMethod(MethodHookParam param1) throws Throwable {
}
}).start();
}
if (turnedByTTT) {
ev.setAction(ACTION_DOWN);
}
} else if (turnedByTTT) {
turnOffTTT();
}
Expand Down

0 comments on commit 99e6d05

Please sign in to comment.