Launcher3: Vibrate on double tap to sleep

Change-Id: I1311fcccb8e179d34a02d89f26d826ebc5fc04ff
Signed-off-by: LordShenron <shen.priyanshu@gmail.com>
Signed-off-by: Mohammad Hasan Keramat J <ikeramat@protonmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
This commit is contained in:
LordShenron 2023-04-02 20:16:50 +08:00 committed by fazilsheik96
parent 61d397ac42
commit 94a75fe47d
1 changed files with 4 additions and 1 deletions

View File

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