Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e9817ec authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Nuke minimum time for camera double tap gesture

When the device was sleeping, we get really really low values so
we can't use that as a filter for anti-falsing, or else the gesture
is extremely unreliable when the device was sleeping.

Bug: 26731262
Change-Id: I9b31a3d58ffc22fca31defb40c69a830cf4aa648
parent 52cb2419
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public class GestureLauncherService extends SystemService {
     * as a camera launch.
     */
    private static final long CAMERA_POWER_DOUBLE_TAP_MAX_TIME_MS = 300;
    private static final long CAMERA_POWER_DOUBLE_TAP_MIN_TIME_MS = 120;

    /** The listener that receives the gesture event. */
    private final GestureEventListener mGestureListener = new GestureEventListener();
@@ -260,8 +259,7 @@ public class GestureLauncherService extends SystemService {
        synchronized (this) {
            doubleTapInterval = event.getEventTime() - mLastPowerDown;
            if (mCameraDoubleTapPowerEnabled
                    && doubleTapInterval < CAMERA_POWER_DOUBLE_TAP_MAX_TIME_MS
                    && doubleTapInterval > CAMERA_POWER_DOUBLE_TAP_MIN_TIME_MS) {
                    && doubleTapInterval < CAMERA_POWER_DOUBLE_TAP_MAX_TIME_MS) {
                launched = true;
                intercept = interactive;
            }