aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/ResearchLogger.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-01-10 14:16:47 -0800
committerKurt Partridge <kep@google.com>2013-01-10 16:36:18 -0800
commit90aaa2d0a59227e948aefc5fbc4c875dae006ccf (patch)
tree23de2cdf92f73fb00c5268f1a27fb494461c1ae2 /java/src/com/android/inputmethod/research/ResearchLogger.java
parent75e69753b709c19d5a23baf88ec3ac2576ee9c24 (diff)
downloadlatinime-90aaa2d0a59227e948aefc5fbc4c875dae006ccf.tar.gz
latinime-90aaa2d0a59227e948aefc5fbc4c875dae006ccf.tar.xz
latinime-90aaa2d0a59227e948aefc5fbc4c875dae006ccf.zip
[Rlog59a] Split logUnits correctly around separators
Change-Id: I65ecdead7e7bdeb8a5f1748e27068ddbd5d3ce00
Diffstat (limited to 'java/src/com/android/inputmethod/research/ResearchLogger.java')
-rw-r--r--java/src/com/android/inputmethod/research/ResearchLogger.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index 5c44af1f2..ff8067f53 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -838,6 +838,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
mCurrentLogUnit = newLogUnit;
}
+ private void setSavedDownEventTime(final long time) {
+ mSavedDownEventTime = time;
+ }
+
public void onWordFinished(final String word, final boolean isBatchMode) {
commitCurrentLogUnitAsWord(word, mSavedDownEventTime, isBatchMode);
mSavedDownEventTime = Long.MAX_VALUE;
@@ -987,7 +991,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
if (action == MotionEvent.ACTION_DOWN) {
// Subtract 1 from eventTime so the down event is included in the later
// LogUnit, not the earlier (the test is for inequality).
- researchLogger.mSavedDownEventTime = eventTime - 1;
+ researchLogger.setSavedDownEventTime(eventTime - 1);
}
}
}
@@ -1627,6 +1631,14 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
researchLogger.mStatistics.recordGestureDelete();
}
+ public static void latinIME_handleSeparator() {
+ // Reset the saved down event time. For tapping, motion events, etc. before the separator
+ // are assigned to the previous LogUnit, and events after the separator are assigned to the
+ // next LogUnit. In the case of multitap, this might capture down events corresponding to
+ // the next word, however it should not be more than a character or two.
+ getInstance().setSavedDownEventTime(SystemClock.uptimeMillis());
+ }
+
/**
* Log statistics.
*