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
This commit is contained in:
Jorim Jaggi
2016-04-11 18:30:57 -07:00
parent 52cb241948
commit 4e9817ec87

View File

@@ -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;
}