From 3bab3d86aba6acbad15720a45dedd3d0334a1f48 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Fri, 22 Mar 2019 14:38:28 -0700 Subject: [PATCH] Let single tap devices wake up with double tap Users might double tap twice by mistake, and the device should still wake up. Test: manual Fixes: 129090210 Change-Id: I55fc963d1f4e9d355ccf3d4ee8cbe9087b8e50cf --- .../systemui/statusbar/phone/StatusBarWindowView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java index a8ae5f65a2a02..96090571685ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java @@ -114,17 +114,19 @@ public class StatusBarWindowView extends FrameLayout { if (mSingleTapEnabled) { mService.wakeUpIfDozing(SystemClock.uptimeMillis(), StatusBarWindowView.this, "SINGLE_TAP"); + return true; } - return mSingleTapEnabled; + return false; } @Override public boolean onDoubleTap(MotionEvent e) { - if (mDoubleTapEnabled) { + if (mDoubleTapEnabled || mSingleTapEnabled) { mService.wakeUpIfDozing(SystemClock.uptimeMillis(), StatusBarWindowView.this, "DOUBLE_TAP"); + return true; } - return mDoubleTapEnabled; + return false; } }; private final TunerService.Tunable mTunable = (key, newValue) -> {