Merge "move suggested words logpoint to SuggestionsView.java"
commit
a601ef03db
|
@ -21,8 +21,6 @@ import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@ -117,19 +115,10 @@ public class AutoCorrection {
|
||||||
+ autoCorrectionSuggestionScore + ", " + normalizedScore
|
+ autoCorrectionSuggestionScore + ", " + normalizedScore
|
||||||
+ "(" + autoCorrectionThreshold + ")");
|
+ "(" + autoCorrectionThreshold + ")");
|
||||||
}
|
}
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
|
||||||
ResearchLogger.autoCorrection_hasAutoCorrectionForBinaryDictionary(consideredWord,
|
|
||||||
autoCorrectionThreshold, autoCorrectionSuggestion.toString(),
|
|
||||||
autoCorrectionSuggestionScore, normalizedScore);
|
|
||||||
}
|
|
||||||
if (normalizedScore >= autoCorrectionThreshold) {
|
if (normalizedScore >= autoCorrectionThreshold) {
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
Log.d(TAG, "Auto corrected by S-threshold.");
|
Log.d(TAG, "Auto corrected by S-threshold.");
|
||||||
}
|
}
|
||||||
if (ProductionFlag.IS_EXPERIMENTAL) {
|
|
||||||
ResearchLogger
|
|
||||||
.autoCorrection_hasAutoCorrectionForBinaryDictionary_bySthreshold();
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,11 +277,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
private static final boolean ALPHABETSHIFTSTATE_SETSHIFTLOCKED_ENABLED = DEFAULT_ENABLED;
|
private static final boolean ALPHABETSHIFTSTATE_SETSHIFTLOCKED_ENABLED = DEFAULT_ENABLED;
|
||||||
private static final boolean ALPHABETSHIFTSTATE_SETAUTOMATICSHIFTED_ENABLED
|
private static final boolean ALPHABETSHIFTSTATE_SETAUTOMATICSHIFTED_ENABLED
|
||||||
= DEFAULT_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_ONCANCELINPUT_ENABLED = DEFAULT_ENABLED;
|
||||||
private static final boolean KEYBOARDSTATE_ONCODEINPUT_ENABLED = DEFAULT_ENABLED;
|
private static final boolean KEYBOARDSTATE_ONCODEINPUT_ENABLED = DEFAULT_ENABLED;
|
||||||
private static final boolean KEYBOARDSTATE_ONLONGPRESSTIMEOUT_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 POINTERTRACKER_ONMOVEEVENT_ENABLED = DEFAULT_ENABLED;
|
||||||
private static final boolean SUDDENJUMPINGTOUCHEVENTHANDLER_ONTOUCHEVENT_ENABLED
|
private static final boolean SUDDENJUMPINGTOUCHEVENTHANDLER_ONTOUCHEVENT_ENABLED
|
||||||
= DEFAULT_ENABLED;
|
= DEFAULT_ENABLED;
|
||||||
|
private static final boolean SUGGESTIONSVIEW_SETSUGGESTIONS_ENABLED = DEFAULT_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void logUnstructured(String logGroup, final String details) {
|
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,
|
public static void keyboardState_onCancelInput(final boolean isSinglePointer,
|
||||||
final KeyboardState keyboardState) {
|
final KeyboardState keyboardState) {
|
||||||
if (UnsLogGroup.KEYBOARDSTATE_ONCANCELINPUT_ENABLED) {
|
if (UnsLogGroup.KEYBOARDSTATE_ONCANCELINPUT_ENABLED) {
|
||||||
|
@ -666,4 +643,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
logUnstructured("SuddenJumpingTouchEventHandler_onTouchEvent", s);
|
logUnstructured("SuddenJumpingTouchEventHandler_onTouchEvent", s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void suggestionsView_setSuggestions(SuggestedWords mSuggestedWords) {
|
||||||
|
if (UnsLogGroup.SUGGESTIONSVIEW_SETSUGGESTIONS_ENABLED) {
|
||||||
|
logUnstructured("SuggestionsView_setSuggestions", mSuggestedWords.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,10 +59,12 @@ import com.android.inputmethod.keyboard.PointerTracker;
|
||||||
import com.android.inputmethod.keyboard.ViewLayoutUtils;
|
import com.android.inputmethod.keyboard.ViewLayoutUtils;
|
||||||
import com.android.inputmethod.latin.LatinImeLogger;
|
import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
|
import com.android.inputmethod.latin.ResearchLogger;
|
||||||
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
||||||
import com.android.inputmethod.latin.Suggest;
|
import com.android.inputmethod.latin.Suggest;
|
||||||
import com.android.inputmethod.latin.SuggestedWords;
|
import com.android.inputmethod.latin.SuggestedWords;
|
||||||
import com.android.inputmethod.latin.Utils;
|
import com.android.inputmethod.latin.Utils;
|
||||||
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -663,6 +665,9 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
clear();
|
clear();
|
||||||
mSuggestedWords = suggestedWords;
|
mSuggestedWords = suggestedWords;
|
||||||
mParams.layout(mSuggestedWords, mSuggestionsStrip, this, getWidth());
|
mParams.layout(mSuggestedWords, mSuggestionsStrip, this, getWidth());
|
||||||
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
|
ResearchLogger.suggestionsView_setSuggestions(mSuggestedWords);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int setMoreSuggestionsHeight(int remainingHeight) {
|
public int setMoreSuggestionsHeight(int remainingHeight) {
|
||||||
|
|
Loading…
Reference in New Issue