aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-10-03 12:17:28 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-03 12:17:28 -0700
commit33587f919ef19d89296491a3d0e746b610838828 (patch)
tree5849abb53b82d3a1bfed946a19c1f37d48233f9a /java/src/com/android/inputmethod
parent17581e41d17cd0864f425a0c020dd1319947a9a6 (diff)
parent9c6e7e233ee2a6379f6b784c23bfba58861aae3d (diff)
downloadlatinime-33587f919ef19d89296491a3d0e746b610838828.tar.gz
latinime-33587f919ef19d89296491a3d0e746b610838828.tar.xz
latinime-33587f919ef19d89296491a3d0e746b610838828.zip
am 9c6e7e23: am b0c5ddb9: Merge "Stop vibration while repeating delete key in emoji view"
* commit '9c6e7e233ee2a6379f6b784c23bfba58861aae3d': Stop vibration while repeating delete key in emoji view
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java b/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
index 61dc56ed1..eb48d01f6 100644
--- a/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java
@@ -718,12 +718,14 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
@Override
public void run() {
+ int repeatCount = 1;
int timeCount = 0;
while (timeCount < MAX_REPEAT_COUNT_TIME && !mAborted) {
if (timeCount > mKeyRepeatStartTimeout) {
- pressDelete();
+ pressDelete(repeatCount);
}
timeCount += mKeyRepeatInterval;
+ ++repeatCount;
try {
Thread.sleep(mKeyRepeatInterval);
} catch (InterruptedException e) {
@@ -736,9 +738,9 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
}
}
- public void pressDelete() {
+ public void pressDelete(int repeatCount) {
mKeyboardActionListener.onPressKey(
- Constants.CODE_DELETE, 0 /* repeatCount */, true /* isSinglePointer */);
+ Constants.CODE_DELETE, repeatCount, true /* isSinglePointer */);
mKeyboardActionListener.onCodeInput(
Constants.CODE_DELETE, NOT_A_COORDINATE, NOT_A_COORDINATE);
mKeyboardActionListener.onReleaseKey(
@@ -754,7 +756,7 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN:
v.setBackgroundColor(mDeleteKeyPressedBackgroundColor);
- pressDelete();
+ pressDelete(0 /* repeatCount */);
startRepeat();
return true;
case MotionEvent.ACTION_UP: