aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2010-05-08 02:03:29 +0900
committersatok <satok@google.com>2010-05-10 15:11:26 +0900
commit1263d234666ae8fa19ab053b929c35236929d229 (patch)
tree823b999da5f6253d3aeed051725d64af1f114aa0 /java/src/com/android/inputmethod/latin/LatinIME.java
parent53393240e8621aadcfd55bdbafd96c620efda479 (diff)
downloadlatinime-1263d234666ae8fa19ab053b929c35236929d229.tar.gz
latinime-1263d234666ae8fa19ab053b929c35236929d229.tar.xz
latinime-1263d234666ae8fa19ab053b929c35236929d229.zip
Insert logging code
- Add log of auto suggestion - Add log of cancelling auto suggestion - Add log of actual number of charactors - Add log of manually clicking suggestion Change-Id: I8fc1cef356bf1a98b0676ed171bfb17825e18425
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 1586a758b..dfbde8759 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -701,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);
@@ -1526,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();
@@ -1538,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) {