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:
parent
61d397ac42
commit
94a75fe47d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue