aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2012-04-09 17:26:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-09 17:26:01 -0700
commita601ef03db10089f942f119f316100fbb93ed5e9 (patch)
tree3f50aea162c75d995d0bd8d71757d7c5d7115cc1 /java/src
parent98986c6a430deb5bccf9fcb101a38f3884e8c2f9 (diff)
parenta9ca7867b5a7c0be115966211a05f5d460c8638c (diff)
downloadlatinime-a601ef03db10089f942f119f316100fbb93ed5e9.tar.gz
latinime-a601ef03db10089f942f119f316100fbb93ed5e9.tar.xz
latinime-a601ef03db10089f942f119f316100fbb93ed5e9.zip
Merge "move suggested words logpoint to SuggestionsView.java"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/AutoCorrection.java11
-rw-r--r--java/src/com/android/inputmethod/latin/ResearchLogger.java31
-rw-r--r--java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java5
3 files changed, 12 insertions, 35 deletions
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index 520177afe..38444a10c 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -21,8 +21,6 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import android.text.TextUtils;
import android.util.Log;
-import com.android.inputmethod.latin.define.ProductionFlag;
-
import java.util.ArrayList;
import java.util.HashMap;
@@ -117,19 +115,10 @@ public class AutoCorrection {
+ autoCorrectionSuggestionScore + ", " + normalizedScore
+ "(" + autoCorrectionThreshold + ")");
}
- if (ProductionFlag.IS_EXPERIMENTAL) {
- ResearchLogger.autoCorrection_hasAutoCorrectionForBinaryDictionary(consideredWord,
- autoCorrectionThreshold, autoCorrectionSuggestion.toString(),
- autoCorrectionSuggestionScore, normalizedScore);
- }
if (normalizedScore >= autoCorrectionThreshold) {
if (DBG) {
Log.d(TAG, "Auto corrected by S-threshold.");
}
- if (ProductionFlag.IS_EXPERIMENTAL) {
- ResearchLogger
- .autoCorrection_hasAutoCorrectionForBinaryDictionary_bySthreshold();
- }
return true;
}
}
diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java
index 182a7bc3e..08c26a5df 100644
--- a/java/src/com/android/inputmethod/latin/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java
@@ -277,11 +277,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
private static final boolean ALPHABETSHIFTSTATE_SETSHIFTLOCKED_ENABLED = DEFAULT_ENABLED;
private static final boolean ALPHABETSHIFTSTATE_SETAUTOMATICSHIFTED_ENABLED
= DEFAULT_ENABLED;
- private static final boolean AUTOCORRECTION_HASAUTOCORRECTIONFORBINARYDICTIONARY_ENABLED
- = DEFAULT_ENABLED;
- private static final boolean
- AUTOCORRECTION_HASAUTOCORRECTIONFORBINARYDICTIONARY_BYSTHRESHOLD_ENABLED
- = DEFAULT_ENABLED;
private static final boolean KEYBOARDSTATE_ONCANCELINPUT_ENABLED = DEFAULT_ENABLED;
private static final boolean KEYBOARDSTATE_ONCODEINPUT_ENABLED = DEFAULT_ENABLED;
private static final boolean KEYBOARDSTATE_ONLONGPRESSTIMEOUT_ENABLED = DEFAULT_ENABLED;
@@ -317,6 +312,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
private static final boolean POINTERTRACKER_ONMOVEEVENT_ENABLED = DEFAULT_ENABLED;
private static final boolean SUDDENJUMPINGTOUCHEVENTHANDLER_ONTOUCHEVENT_ENABLED
= DEFAULT_ENABLED;
+ private static final boolean SUGGESTIONSVIEW_SETSUGGESTIONS_ENABLED = DEFAULT_ENABLED;
}
public static void logUnstructured(String logGroup, final String details) {
@@ -397,25 +393,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
}
}
- public static void autoCorrection_hasAutoCorrectionForBinaryDictionary(
- final CharSequence consideredWord, final double autoCorrectionThreshold,
- final CharSequence autoCorrectionSuggestion, final int autoCorrectionSuggestionScore,
- final double normalizedScore) {
- if (UnsLogGroup.AUTOCORRECTION_HASAUTOCORRECTIONFORBINARYDICTIONARY_ENABLED) {
- final String s = "Normalized " + consideredWord + ","
- + autoCorrectionSuggestion + "," + autoCorrectionSuggestionScore
- + ", " + normalizedScore + "(" + autoCorrectionThreshold + ")";
- logUnstructured("AutoCorrection_hasAutoCorrectionForBinaryDictionary", s);
- }
- }
-
- public static void autoCorrection_hasAutoCorrectionForBinaryDictionary_bySthreshold() {
- if (UnsLogGroup.AUTOCORRECTION_HASAUTOCORRECTIONFORBINARYDICTIONARY_BYSTHRESHOLD_ENABLED) {
- final String s = "Auto corrected by S-threshold.";
- logUnstructured("AutoCorrection_hasAutoCorrectionForBinaryDictionar_bySthreshold", s);
- }
- }
-
public static void keyboardState_onCancelInput(final boolean isSinglePointer,
final KeyboardState keyboardState) {
if (UnsLogGroup.KEYBOARDSTATE_ONCANCELINPUT_ENABLED) {
@@ -666,4 +643,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
logUnstructured("SuddenJumpingTouchEventHandler_onTouchEvent", s);
}
}
+
+ public static void suggestionsView_setSuggestions(SuggestedWords mSuggestedWords) {
+ if (UnsLogGroup.SUGGESTIONSVIEW_SETSUGGESTIONS_ENABLED) {
+ logUnstructured("SuggestionsView_setSuggestions", mSuggestedWords.toString());
+ }
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index 1ad37b933..01d51d463 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -59,10 +59,12 @@ import com.android.inputmethod.keyboard.PointerTracker;
import com.android.inputmethod.keyboard.ViewLayoutUtils;
import com.android.inputmethod.latin.LatinImeLogger;
import com.android.inputmethod.latin.R;
+import com.android.inputmethod.latin.ResearchLogger;
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
import com.android.inputmethod.latin.Suggest;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.Utils;
+import com.android.inputmethod.latin.define.ProductionFlag;
import java.util.ArrayList;
@@ -663,6 +665,9 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
clear();
mSuggestedWords = suggestedWords;
mParams.layout(mSuggestedWords, mSuggestionsStrip, this, getWidth());
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.suggestionsView_setSuggestions(mSuggestedWords);
+ }
}
public int setMoreSuggestionsHeight(int remainingHeight) {