From ab68e38786ecfa253cca5808182f42b17371db70 Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Tue, 6 Dec 2022 12:56:46 -0800 Subject: [PATCH] Increase threshold for ESOS power button press detection If pressing power button 5 times is faster than 200ms, we will not trigger the ESOS experience. This is unlikely to be done by human. The fastest recorded button press is 60ms so the whole esos gesture sequence should be 300ms or so. We are taking 200ms threshold to be conservative. Fix: 261618088 Test: rebuild, PTS Change-Id: Id3f1d92623d17b2921cc0fb90c1f19f896946881 --- .../core/java/com/android/server/GestureLauncherService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/GestureLauncherService.java b/services/core/java/com/android/server/GestureLauncherService.java index e529010e6b7d4..daba4c0e83a07 100644 --- a/services/core/java/com/android/server/GestureLauncherService.java +++ b/services/core/java/com/android/server/GestureLauncherService.java @@ -79,7 +79,7 @@ public class GestureLauncherService extends SystemService { * completed faster than this, we assume it's not performed by human and the * event gets ignored. */ - @VisibleForTesting static final int EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS = 160; + @VisibleForTesting static final int EMERGENCY_GESTURE_TAP_DETECTION_MIN_TIME_MS = 200; /** * Interval in milliseconds in which the power button must be depressed in succession to be