aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-10-16 17:49:23 +0900
committerJean Chalard <jchalard@google.com>2013-10-16 18:43:15 +0900
commit548716d6d9cdb62f5f82b7ce0a5d1bde63dc74ac (patch)
tree97c48be9797eef2ca8fd13b4870a5b591ec92c5d /java/src
parent1194b2b204456776b8c5139be35599f21533c6c9 (diff)
downloadlatinime-548716d6d9cdb62f5f82b7ce0a5d1bde63dc74ac.tar.gz
latinime-548716d6d9cdb62f5f82b7ce0a5d1bde63dc74ac.tar.xz
latinime-548716d6d9cdb62f5f82b7ce0a5d1bde63dc74ac.zip
Remove useless code.
The only use of mDeleteCount is to implement delete acceleration. It's reset at each non-delete code point, and is guarded by a timer. Plus, ultimately we want to remove this completely : acceleration should be implemented by actually deleting stuff faster, not by deleting several code points at a time. Change-Id: Ia3144860b3aa2499034f2a2a7c81f32087af9598
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 4c778f1cc..65ff95458 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2030,7 +2030,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
private void handleBackspace(final int spaceState) {
- // We revert this in this method if the deletion doesn't happen.
mDeleteCount++;
// In many cases, we may have to put the keyboard in auto-shift state again. However
@@ -2124,9 +2123,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
final int codePointBeforeCursor = mConnection.getCodePointBeforeCursor();
if (codePointBeforeCursor == Constants.NOT_A_CODE) {
- // Nothing to delete before the cursor. We have to revert the deletion count
- // that was updated at the beginning of this method.
- mDeleteCount--;
+ // Nothing to delete before the cursor.
return;
}
final int lengthToDelete =