From 94a75fe47dbeed6ba58f959a9d9fd8044fc02995 Mon Sep 17 00:00:00 2001 From: LordShenron Date: Sun, 2 Apr 2023 20:16:50 +0800 Subject: [PATCH] Launcher3: Vibrate on double tap to sleep Change-Id: I1311fcccb8e179d34a02d89f26d826ebc5fc04ff Signed-off-by: LordShenron Signed-off-by: Mohammad Hasan Keramat J Signed-off-by: Adithya R --- src/com/android/launcher3/touch/WorkspaceTouchListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/touch/WorkspaceTouchListener.java b/src/com/android/launcher3/touch/WorkspaceTouchListener.java index 2b0acb4621..883c3db67b 100644 --- a/src/com/android/launcher3/touch/WorkspaceTouchListener.java +++ b/src/com/android/launcher3/touch/WorkspaceTouchListener.java @@ -47,6 +47,7 @@ import com.android.launcher3.logger.LauncherAtom; import com.android.launcher3.testing.TestLogging; import com.android.launcher3.testing.shared.TestProtocol; import com.android.launcher3.util.TouchUtil; +import com.android.launcher3.util.VibratorWrapper; import com.android.launcher3.Utilities; @@ -223,8 +224,10 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe @Override public boolean onDoubleTap(MotionEvent event) { - if (Utilities.isDoubleTapGestureEnabled(mContext)) + if (Utilities.isDoubleTapGestureEnabled(mContext)) { + VibratorWrapper.INSTANCE.get(mContext).vibrate(VibratorWrapper.EFFECT_CLICK); mPm.goToSleep(event.getEventTime()); + } return true; } }