aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/ResearchLogger.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-05-20 15:03:12 -0700
committerKurt Partridge <kep@google.com>2013-05-21 16:08:54 -0700
commit450d78b0303e5fbaa4d3499f362eed56119909af (patch)
tree7e79b7eba27509a81d7b96e269565505ed754acd /java/src/com/android/inputmethod/research/ResearchLogger.java
parenteb724ddbe92ba4c090fafad42ca65af4fd8d5143 (diff)
downloadlatinime-450d78b0303e5fbaa4d3499f362eed56119909af.tar.gz
latinime-450d78b0303e5fbaa4d3499f362eed56119909af.tar.xz
latinime-450d78b0303e5fbaa4d3499f362eed56119909af.zip
Always record word boundaries
Word boundaries are currently logged, but only if all the details of a word pass the privacy filter and are logged. This change records when a word is committed in all cases, but does not disclose the word contents or any data used in its construction. Addresses b/9070768 Change-Id: I573679d0685c088aca65af99e46337a2f429f816
Diffstat (limited to 'java/src/com/android/inputmethod/research/ResearchLogger.java')
-rw-r--r--java/src/com/android/inputmethod/research/ResearchLogger.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index f426d58d5..3be01e06b 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -1638,12 +1638,24 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
}
/**
- * Shared event for logging committed text.
+ * Shared events for logging committed text.
+ *
+ * The "CommitTextEventHappened" LogStatement is written to the log even if privacy rules
+ * indicate that the word contents should not be logged. It has no contents, and only serves to
+ * record the event and thereby make it easier to calculate word-level statistics even when the
+ * word contents are unknown.
*/
private static final LogStatement LOGSTATEMENT_COMMITTEXT =
- new LogStatement("CommitText", true, false, "committedText", "isBatchMode");
+ new LogStatement("CommitText", true /* isPotentiallyPrivate */,
+ false /* isPotentiallyRevealing */, "committedText", "isBatchMode");
+ private static final LogStatement LOGSTATEMENT_COMMITTEXT_EVENT_HAPPENED =
+ new LogStatement("CommitTextEventHappened", false /* isPotentiallyPrivate */,
+ false /* isPotentiallyRevealing */);
private void enqueueCommitText(final String word, final boolean isBatchMode) {
+ // Event containing the word; will be published only if privacy checks pass
enqueueEvent(LOGSTATEMENT_COMMITTEXT, word, isBatchMode);
+ // Event not containing the word; will always be published
+ enqueueEvent(LOGSTATEMENT_COMMITTEXT_EVENT_HAPPENED);
}
/**