diff options
author | 2013-09-28 10:37:56 +0000 | |
---|---|---|
committer | 2013-09-28 10:37:57 +0000 | |
commit | b0c5ddb9c7a27f71ab63ec3362a476ec052f5bd0 (patch) | |
tree | 67e246f27cfd1a1b86f20b6ee3d5628276603a78 /java/src | |
parent | a6e2ec53b6f46491bd23bda6a0d734b820fd8a01 (diff) | |
parent | d0df68e6cbe453a32ee86f125254bb05bc9fcbc0 (diff) | |
download | latinime-b0c5ddb9c7a27f71ab63ec3362a476ec052f5bd0.tar.gz latinime-b0c5ddb9c7a27f71ab63ec3362a476ec052f5bd0.tar.xz latinime-b0c5ddb9c7a27f71ab63ec3362a476ec052f5bd0.zip |
Merge "Stop vibration while repeating delete key in emoji view"
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/EmojiKeyboardView.java | 10 |
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: |