aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-01-10 15:19:08 -0800
committerKurt Partridge <kep@google.com>2013-01-10 23:18:40 -0800
commitb4fe364b398ef24ad6e83aeb7f6a54010e0f3409 (patch)
tree632866ae5a52f922756c851bf6169d2be80d6b81 /java/src
parent75e69753b709c19d5a23baf88ec3ac2576ee9c24 (diff)
downloadlatinime-b4fe364b398ef24ad6e83aeb7f6a54010e0f3409.tar.gz
latinime-b4fe364b398ef24ad6e83aeb7f6a54010e0f3409.tar.xz
latinime-b4fe364b398ef24ad6e83aeb7f6a54010e0f3409.zip
[Rlog60] Log if a logUnit is uncommitted
Normally logUnits are committed to a log when the word that their data corresponds to is complete. However, if the user reverts a word, or goes back to edit it, then the system may "uncommit" the logUnit, and append additional editing steps to the end of it. When this happens, we want to make a note of it in the log, which is what this patch does. Change-Id: If2bbb948469824c76facf5f06ed8a6da8ff9777c
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/research/ResearchLogger.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index 5c44af1f2..ac5ba3943 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -730,6 +730,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
}
}
+ private static final LogStatement LOGSTATEMENT_UNCOMMIT_CURRENT_LOGUNIT =
+ new LogStatement("UncommitCurrentLogUnit", false, false);
public void uncommitCurrentLogUnit(final String expectedWord,
final boolean dumpCurrentLogUnit) {
// The user has deleted this word and returned to the previous. Check that the word in the
@@ -768,6 +770,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
if (mFeedbackLogBuffer != null) {
mFeedbackLogBuffer.unshiftIn();
}
+ enqueueEvent(LOGSTATEMENT_UNCOMMIT_CURRENT_LOGUNIT);
if (DEBUG) {
Log.d(TAG, "uncommitCurrentLogUnit (dump=" + dumpCurrentLogUnit + ") back to "
+ (mCurrentLogUnit.hasWord() ? ": '" + mCurrentLogUnit.getWord() + "'" : ""));