diff options
author | 2012-12-17 18:19:58 -0800 | |
---|---|---|
committer | 2012-12-18 19:46:30 -0800 | |
commit | 0aafbcf879a31afc8361078bd9574915d95694c0 (patch) | |
tree | ee2b79d9354dda1f462c0baa7aaf75ef3c883827 /java/src/com/android/inputmethod/research/MainLogBuffer.java | |
parent | 606058f777de394d38b364a655cff36ccaf0d5d2 (diff) | |
download | latinime-0aafbcf879a31afc8361078bd9574915d95694c0.tar.gz latinime-0aafbcf879a31afc8361078bd9574915d95694c0.tar.xz latinime-0aafbcf879a31afc8361078bd9574915d95694c0.zip |
Add ProductionFlag.IS_EXPERIMENTAL_DEBUG
The IS_EXPERIMENTAL_DEBUG flag gives a single place to turn off all debugging flags that might be
set and to also enforce privacy controls. Currently only used in the research package.
multi-project commit with I9275a7c8e40bf56106447a02d3056655329074b3
Change-Id: If769fe3a633f33963ca49e8ddf01ab24a30b6fd2
Diffstat (limited to 'java/src/com/android/inputmethod/research/MainLogBuffer.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/MainLogBuffer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/research/MainLogBuffer.java b/java/src/com/android/inputmethod/research/MainLogBuffer.java index b027643a1..0185e5fc0 100644 --- a/java/src/com/android/inputmethod/research/MainLogBuffer.java +++ b/java/src/com/android/inputmethod/research/MainLogBuffer.java @@ -20,18 +20,19 @@ import android.util.Log; import com.android.inputmethod.latin.Dictionary; import com.android.inputmethod.latin.Suggest; +import com.android.inputmethod.latin.define.ProductionFlag; import java.util.Random; public class MainLogBuffer extends LogBuffer { private static final String TAG = MainLogBuffer.class.getSimpleName(); - // For privacy reasons, be sure to set to "false" for production code. - private static final boolean DEBUG = false; + private static final boolean DEBUG = false && ProductionFlag.IS_EXPERIMENTAL_DEBUG; // The size of the n-grams logged. E.g. N_GRAM_SIZE = 2 means to sample bigrams. private static final int N_GRAM_SIZE = 2; // The number of words between n-grams to omit from the log. - private static final int DEFAULT_NUMBER_OF_WORDS_BETWEEN_SAMPLES = DEBUG ? 2 : 18; + private static final int DEFAULT_NUMBER_OF_WORDS_BETWEEN_SAMPLES = + ProductionFlag.IS_EXPERIMENTAL_DEBUG ? 2 : 18; private final ResearchLog mResearchLog; private Suggest mSuggest; |