aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-01-10 14:50:11 -0800
committerKurt Partridge <kep@google.com>2013-01-12 12:54:59 -0800
commitef3936bc5470360144c3efc4dab9ef24a57c1e34 (patch)
tree612e53ade98d06f0d75ad7cfb8fe972e36398f99 /java/src/com/android/inputmethod/latin/LatinIME.java
parent343a852cd95a051bc54658d4cc78037361053f1f (diff)
downloadlatinime-ef3936bc5470360144c3efc4dab9ef24a57c1e34.tar.gz
latinime-ef3936bc5470360144c3efc4dab9ef24a57c1e34.tar.xz
latinime-ef3936bc5470360144c3efc4dab9ef24a57c1e34.zip
[Rlog59c] More detailed logging of backspace
- Normal delete events are recorded - Includes number of characters deleted for both batch and normal delete Change-Id: I422da3ddc94fa0ccd6c7586eaacf14c62dd16679
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index ba7e36aaa..53ed225e0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1667,7 +1667,7 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
if (mWordComposer.isBatchMode()) {
if (ProductionFlag.IS_EXPERIMENTAL) {
final String word = mWordComposer.getTypedWord();
- ResearchLogger.latinIME_handleBackspace_batch(word);
+ ResearchLogger.latinIME_handleBackspace_batch(word, 1);
ResearchLogger.getInstance().uncommitCurrentLogUnit(
word, false /* dumpCurrentLogUnit */);
}
@@ -1718,14 +1718,17 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
// We should backspace one char and restart suggestion if at the end of a word.
if (mLastSelectionStart != mLastSelectionEnd) {
// If there is a selection, remove it.
- final int lengthToDelete = mLastSelectionEnd - mLastSelectionStart;
+ final int numCharsDeleted = mLastSelectionEnd - mLastSelectionStart;
mConnection.setSelection(mLastSelectionEnd, mLastSelectionEnd);
// Reset mLastSelectionEnd to mLastSelectionStart. This is what is supposed to
// happen, and if it's wrong, the next call to onUpdateSelection will correct it,
// but we want to set it right away to avoid it being used with the wrong values
// later (typically, in a subsequent press on backspace).
mLastSelectionEnd = mLastSelectionStart;
- mConnection.deleteSurroundingText(lengthToDelete, 0);
+ mConnection.deleteSurroundingText(numCharsDeleted, 0);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_handleBackspace(numCharsDeleted);
+ }
} else {
// There is no selection, just delete one character.
if (NOT_A_CURSOR_POSITION == mLastSelectionEnd) {
@@ -1742,8 +1745,14 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
} else {
mConnection.deleteSurroundingText(1, 0);
}
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_handleBackspace(1);
+ }
if (mDeleteCount > DELETE_ACCELERATE_AT) {
mConnection.deleteSurroundingText(1, 0);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_handleBackspace(1);
+ }
}
}
if (mSettings.getCurrent().isSuggestionsRequested(mDisplayOrientation)) {