am c1b4d143: Merge "Differentiate LOG_EVERYTHING and LOG_FULL_TEXTVIEW_CONTENTS"

* commit 'c1b4d143947ffcfd6880ef306e861a39a2f22087':
  Differentiate LOG_EVERYTHING and LOG_FULL_TEXTVIEW_CONTENTS
main
Kurt Partridge 2012-12-23 11:22:31 -08:00 committed by Android Git Automerger
commit 970ceab0a8
1 changed files with 8 additions and 2 deletions

View File

@ -83,7 +83,13 @@ import java.util.UUID;
public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener { public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener {
private static final String TAG = ResearchLogger.class.getSimpleName(); private static final String TAG = ResearchLogger.class.getSimpleName();
private static final boolean DEBUG = false && ProductionFlag.IS_EXPERIMENTAL_DEBUG; private static final boolean DEBUG = false && ProductionFlag.IS_EXPERIMENTAL_DEBUG;
private static final boolean LOG_EVERYTHING = false; // true will disclose private info // Whether all n-grams should be logged. true will disclose private info.
private static final boolean LOG_EVERYTHING = false
&& ProductionFlag.IS_EXPERIMENTAL_DEBUG;
// Whether the TextView contents are logged at the end of the session. true will disclose
// private info.
private static final boolean LOG_FULL_TEXTVIEW_CONTENTS = false
&& ProductionFlag.IS_EXPERIMENTAL_DEBUG;
public static final boolean DEFAULT_USABILITY_STUDY_MODE = false; public static final boolean DEFAULT_USABILITY_STUDY_MODE = false;
/* package */ static boolean sIsLogging = false; /* package */ static boolean sIsLogging = false;
private static final int OUTPUT_FORMAT_VERSION = 5; private static final int OUTPUT_FORMAT_VERSION = 5;
@ -954,7 +960,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
if (ic != null) { if (ic != null) {
final boolean isTextTruncated; final boolean isTextTruncated;
final String text; final String text;
if (LOG_EVERYTHING) { if (LOG_FULL_TEXTVIEW_CONTENTS) {
// Capture the TextView contents. This will trigger onUpdateSelection(), so we // Capture the TextView contents. This will trigger onUpdateSelection(), so we
// set sLatinIMEExpectingUpdateSelection so that when onUpdateSelection() is called, // set sLatinIMEExpectingUpdateSelection so that when onUpdateSelection() is called,
// it can tell that it was generated by the logging code, and not by the user, and // it can tell that it was generated by the logging code, and not by the user, and