diff options
author | 2012-08-12 13:54:53 -0700 | |
---|---|---|
committer | 2012-12-17 21:39:35 -0800 | |
commit | 1a2733683769e6f1267c86768131fc89bbb4b3d6 (patch) | |
tree | 27a3f4984b4c562d01df14d9f0dc9c91fa85b0ac /java/src/com/android/inputmethod/research/ResearchLogger.java | |
parent | 48160f9d847c0246883bc81599613b1ebe2652a6 (diff) | |
download | latinime-1a2733683769e6f1267c86768131fc89bbb4b3d6.tar.gz latinime-1a2733683769e6f1267c86768131fc89bbb4b3d6.tar.xz latinime-1a2733683769e6f1267c86768131fc89bbb4b3d6.zip |
[Rlog4] ResearchLogger add LOG_EVERYTHING flag
- broaden OUTPUT_WHOLE_BUFFER to log not just the buffer at the end, but everything along the
way. This should only be set when the user is aware that logging is on, e.g. in a user test.
Change-Id: I8f9874697524e533586da40d0a3e452f6a04d3e4
Diffstat (limited to 'java/src/com/android/inputmethod/research/ResearchLogger.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/ResearchLogger.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index 0c94abc24..0dcc8bb59 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -84,7 +84,7 @@ import java.util.UUID; public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = ResearchLogger.class.getSimpleName(); private static final boolean DEBUG = false; - private static final boolean OUTPUT_ENTIRE_BUFFER = false; // true may disclose private info + private static final boolean LOG_EVERYTHING = false; // true will disclose private info public static final boolean DEFAULT_USABILITY_STUDY_MODE = false; /* package */ static boolean sIsLogging = false; private static final int OUTPUT_FORMAT_VERSION = 5; @@ -379,7 +379,8 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang commitCurrentLogUnit(); if (mMainLogBuffer != null) { - publishLogBuffer(mMainLogBuffer, mMainResearchLog, false /* isIncludingPrivateData */); + publishLogBuffer(mMainLogBuffer, mMainResearchLog, + LOG_EVERYTHING /* isIncludingPrivateData */); mMainResearchLog.close(null /* callback */); mMainLogBuffer = null; } @@ -795,7 +796,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang private static final LogStatement LOGSTATEMENT_LATIN_IME_ON_START_INPUT_VIEW_INTERNAL = new LogStatement("LatinImeOnStartInputViewInternal", false, false, "uuid", "packageName", "inputType", "imeOptions", "fieldId", "display", "model", - "prefs", "versionCode", "versionName", "outputFormatVersion"); + "prefs", "versionCode", "versionName", "outputFormatVersion", "logEverything"); public static void latinIME_onStartInputViewInternal(final EditorInfo editorInfo, final SharedPreferences prefs) { final ResearchLogger researchLogger = getInstance(); @@ -816,7 +817,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang Integer.toHexString(editorInfo.inputType), Integer.toHexString(editorInfo.imeOptions), editorInfo.fieldId, Build.DISPLAY, Build.MODEL, prefs, versionCode, versionName, - OUTPUT_FORMAT_VERSION); + OUTPUT_FORMAT_VERSION, LOG_EVERYTHING); } catch (NameNotFoundException e) { e.printStackTrace(); } @@ -896,7 +897,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang if (ic != null) { final boolean isTextTruncated; final String text; - if (OUTPUT_ENTIRE_BUFFER) { + if (LOG_EVERYTHING) { // Capture the TextView contents. This will trigger onUpdateSelection(), so we // 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 |