aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index b4ed80c1f..dfbde8759 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -309,6 +309,7 @@ public class LatinIME extends InputMethodService
});
}
prefs.registerOnSharedPreferenceChangeListener(this);
+ LatinImeLogger.init(this);
}
private void initSuggest(String locale) {
@@ -354,6 +355,7 @@ public class LatinIME extends InputMethodService
if (VOICE_INSTALLED) {
mVoiceInput.destroy();
}
+ LatinImeLogger.commit();
super.onDestroy();
}
@@ -699,7 +701,7 @@ public class LatinIME extends InputMethodService
CompletionInfo ci = completions[i];
if (ci != null) stringList.add(ci.getText());
}
- //CharSequence typedWord = mWord.getTypedWord();
+ // When in fullscreen mode, show completions generated by the application
setSuggestions(stringList, true, true, true);
mBestWord = null;
setCandidatesViewShown(isCandidateStripVisible() || mCompletionOn);
@@ -937,6 +939,7 @@ public class LatinIME extends InputMethodService
case Keyboard.KEYCODE_DELETE:
handleBackspace();
mDeleteCount++;
+ LatinImeLogger.logOnDelete(1);
break;
case Keyboard.KEYCODE_SHIFT:
handleShift();
@@ -982,6 +985,7 @@ public class LatinIME extends InputMethodService
} else {
handleCharacter(primaryCode, keyCodes);
}
+ LatinImeLogger.logOnInputChar(1);
// Cancel the just reverted state
mJustRevertedSeparator = null;
}
@@ -1522,6 +1526,10 @@ public class LatinIME extends InputMethodService
// If this is a punctuation, apply it through the normal key press
if (suggestion.length() == 1 && isWordSeparator(suggestion.charAt(0))) {
+ // Word separators are suggested before the user inputs something.
+ // So, LatinImeLogger logs suggestion.charAt(0) as a user's input.
+ LatinImeLogger.logOnClickSuggestion(
+ suggestion.toString(), suggestion.toString(), index);
onKey(suggestion.charAt(0), null);
if (ic != null) {
ic.endBatchEdit();
@@ -1534,6 +1542,8 @@ public class LatinIME extends InputMethodService
if (index == 0) {
checkAddToDictionary(suggestion, AutoDictionary.FREQUENCY_FOR_PICKED);
}
+ LatinImeLogger.logOnClickSuggestion(
+ mComposing.toString(), suggestion.toString(), index);
TextEntryState.acceptedSuggestion(mComposing.toString(), suggestion);
// Follow it with a space
if (mAutoSpace) {