abouttreesummaryrefslogcommitdiff
path: root/srcs
diff options
context:
space:
mode:
authorJules Aguillon2022-06-06 20:37:22 +0200
committerJules Aguillon2022-06-06 20:40:53 +0200
commit402bf4990e33211ef47e794a095721080df18333 (patch)
treececf08225a77ae354b1b1811f5b2dece974de5eb /srcs
parentfda53e3952a1e5086dff618ddb4080528a7f56fb (diff)
downloadunexpected-keyboard-402bf4990e33211ef47e794a095721080df18333.tar.gz
unexpected-keyboard-402bf4990e33211ef47e794a095721080df18333.zip
Remove the interval between vibrations
This is no longer necessary since repeating key no longer cause a vibration.
Diffstat (limited to 'srcs')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 7938f18..71f05a7 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -18,16 +18,12 @@ import android.view.Window;
public class Keyboard2View extends View
implements View.OnTouchListener, Pointers.IPointerEventHandler
{
- private static final long VIBRATE_MIN_INTERVAL = 100;
-
private KeyboardData _keyboard;
private Pointers _pointers;
private Pointers.Modifiers _mods;
- private long _lastVibration = 0;
-
private static int _currentWhat = 0;
private Config _config;
@@ -189,15 +185,10 @@ public class Keyboard2View extends View
private void vibrate()
{
- long now = System.currentTimeMillis();
- if ((now - _lastVibration) > VIBRATE_MIN_INTERVAL)
+ if (VERSION.SDK_INT >= 5)
{
- _lastVibration = now;
- if (VERSION.SDK_INT >= 5)
- {
- performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
- HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
- }
+ performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
+ HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
}
}