aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2012-05-01 22:09:53 -0700
committerKurt Partridge <kep@google.com>2012-05-04 10:57:50 -0700
commitd67a248de45a698d1009757c9f4e750c77bf35f1 (patch)
treef31420b3a7844b853e686c91001eda2f465b3cc7 /java/src/com/android/inputmethod/latin/LatinIME.java
parentb21d16704510be3c50e1d6ed9af22ae2cc96ce8a (diff)
downloadlatinime-d67a248de45a698d1009757c9f4e750c77bf35f1.tar.gz
latinime-d67a248de45a698d1009757c9f4e750c77bf35f1.tar.xz
latinime-d67a248de45a698d1009757c9f4e750c77bf35f1.zip
record full text after finishing session
uses onWindowHidden() callback as proxy for finishing session. Bug: 6188932 Change-Id: Ic63b47c946ca91fc35f80d71b2f9e24e2d0339ac
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 7efdef987..624c322a0 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -702,6 +702,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override
public void onWindowHidden() {
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_onWindowHidden(mLastSelectionStart, mLastSelectionEnd,
+ getCurrentInputConnection());
+ }
super.onWindowHidden();
KeyboardView inputView = mKeyboardSwitcher.getKeyboardView();
if (inputView != null) inputView.closing();
@@ -732,7 +736,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
int composingSpanStart, int composingSpanEnd) {
super.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd,
composingSpanStart, composingSpanEnd);
-
if (DEBUG) {
Log.i(TAG, "onUpdateSelection: oss=" + oldSelStart
+ ", ose=" + oldSelEnd
@@ -744,9 +747,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ", ce=" + composingSpanEnd);
}
if (ProductionFlag.IS_EXPERIMENTAL) {
+ final boolean expectingUpdateSelectionFromLogger =
+ ResearchLogger.getAndClearLatinIMEExpectingUpdateSelection();
ResearchLogger.latinIME_onUpdateSelection(mLastSelectionStart, mLastSelectionEnd,
oldSelStart, oldSelEnd, newSelStart, newSelEnd, composingSpanStart,
- composingSpanEnd);
+ composingSpanEnd, mExpectingUpdateSelection,
+ expectingUpdateSelectionFromLogger);
+ if (expectingUpdateSelectionFromLogger) {
+ return;
+ }
}
// TODO: refactor the following code to be less contrived.