diff options
author | 2012-07-23 15:28:28 +0900 | |
---|---|---|
committer | 2012-07-23 15:37:43 +0900 | |
commit | 4702671ea4feb0c79a879e2e3013afdd6ed800b1 (patch) | |
tree | a267b97a3760c684d52f1ed5ae0caa0eabe0939f /java/src/com/android/inputmethod | |
parent | c8e45ddb032554f4e9d4411d8ef47d98db62d77b (diff) | |
download | latinime-4702671ea4feb0c79a879e2e3013afdd6ed800b1.tar.gz latinime-4702671ea4feb0c79a879e2e3013afdd6ed800b1.tar.xz latinime-4702671ea4feb0c79a879e2e3013afdd6ed800b1.zip |
Rename SuggestionsView to SuggestionStripView
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r-- | java/src/com/android/inputmethod/latin/InputAttributes.java | 2 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/InputView.java | 13 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 53 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java | 10 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java | 2 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java (renamed from java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java) | 74 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/research/ResearchLogger.java | 10 |
7 files changed, 85 insertions, 79 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index 9c32f947c..e561f5956 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -63,7 +63,7 @@ public class InputAttributes { final boolean flagAutoComplete = 0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); - // Make sure that passwords are not displayed in {@link SuggestionsView}. + // Make sure that passwords are not displayed in {@link SuggestionStripView}. if (InputTypeUtils.isPasswordInputType(inputType) || InputTypeUtils.isVisiblePasswordInputType(inputType) || InputTypeUtils.isEmailVariation(variation) diff --git a/java/src/com/android/inputmethod/latin/InputView.java b/java/src/com/android/inputmethod/latin/InputView.java index 0dcb811b5..c15f45345 100644 --- a/java/src/com/android/inputmethod/latin/InputView.java +++ b/java/src/com/android/inputmethod/latin/InputView.java @@ -24,7 +24,7 @@ import android.view.View; import android.widget.LinearLayout; public class InputView extends LinearLayout { - private View mSuggestionsContainer; + private View mSuggestionStripContainer; private View mKeyboardView; private int mKeyboardTopPadding; @@ -43,13 +43,13 @@ public class InputView extends LinearLayout { @Override protected void onFinishInflate() { - mSuggestionsContainer = findViewById(R.id.suggestions_container); + mSuggestionStripContainer = findViewById(R.id.suggestions_container); mKeyboardView = findViewById(R.id.keyboard_view); } @Override public boolean dispatchTouchEvent(MotionEvent me) { - if (mSuggestionsContainer.getVisibility() == VISIBLE + if (mSuggestionStripContainer.getVisibility() == VISIBLE && mKeyboardView.getVisibility() == VISIBLE && forwardTouchEvent(me)) { return true; @@ -57,7 +57,8 @@ public class InputView extends LinearLayout { return super.dispatchTouchEvent(me); } - // The touch events that hit the top padding of keyboard should be forwarded to SuggestionsView. + // The touch events that hit the top padding of keyboard should be forwarded to + // {@link SuggestionStripView}. private boolean forwardTouchEvent(MotionEvent me) { final Rect rect = mInputViewRect; this.getGlobalVisibleRect(rect); @@ -96,7 +97,7 @@ public class InputView extends LinearLayout { } final Rect receivingRect = mEventReceivingRect; - mSuggestionsContainer.getGlobalVisibleRect(receivingRect); + mSuggestionStripContainer.getGlobalVisibleRect(receivingRect); final int translatedX = x - receivingRect.left; final int translatedY; if (y < forwardingLimitY) { @@ -106,7 +107,7 @@ public class InputView extends LinearLayout { translatedY = y - receivingRect.top; } me.setLocation(translatedX, translatedY); - mSuggestionsContainer.dispatchTouchEvent(me); + mSuggestionStripContainer.dispatchTouchEvent(me); return true; } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 49c247660..2ad727e4b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -70,7 +70,7 @@ import com.android.inputmethod.keyboard.KeyboardView; import com.android.inputmethod.keyboard.MainKeyboardView; import com.android.inputmethod.latin.LocaleUtils.RunInLocale; import com.android.inputmethod.latin.define.ProductionFlag; -import com.android.inputmethod.latin.suggestions.SuggestionsView; +import com.android.inputmethod.latin.suggestions.SuggestionStripView; import com.android.inputmethod.research.ResearchLogger; import java.io.FileDescriptor; @@ -82,7 +82,7 @@ import java.util.Locale; * Input method implementation for Qwerty'ish keyboard. */ public class LatinIME extends InputMethodService implements KeyboardActionListener, - SuggestionsView.Listener, TargetApplicationGetter.OnTargetApplicationKnownListener { + SuggestionStripView.Listener, TargetApplicationGetter.OnTargetApplicationKnownListener { private static final String TAG = LatinIME.class.getSimpleName(); private static final boolean TRACE = false; private static boolean DEBUG; @@ -126,7 +126,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen private View mExtractArea; private View mKeyPreviewBackingView; private View mSuggestionsContainer; - private SuggestionsView mSuggestionsView; + private SuggestionStripView mSuggestionStripView; /* package for tests */ Suggest mSuggest; private CompletionInfo[] mApplicationSpecifiedCompletions; private ApplicationInfo mTargetApplicationInfo; @@ -549,9 +549,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen .findViewById(android.R.id.extractArea); mKeyPreviewBackingView = view.findViewById(R.id.key_preview_backing); mSuggestionsContainer = view.findViewById(R.id.suggestions_container); - mSuggestionsView = (SuggestionsView) view.findViewById(R.id.suggestions_view); - if (mSuggestionsView != null) - mSuggestionsView.setListener(this, view); + mSuggestionStripView = (SuggestionStripView)view.findViewById(R.id.suggestion_strip_view); + if (mSuggestionStripView != null) + mSuggestionStripView.setListener(this, view); if (LatinImeLogger.sVISUALDEBUG) { mKeyPreviewBackingView.setBackgroundColor(0x10FF0000); } @@ -674,8 +674,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen switcher.loadKeyboard(editorInfo, mCurrentSettings); - if (mSuggestionsView != null) - mSuggestionsView.clear(); + if (mSuggestionStripView != null) + mSuggestionStripView.clear(); setSuggestionStripShownInternal( isSuggestionsStripVisible(), /* needsInputViewShown */ false); @@ -927,7 +927,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen - keyboardHeight; final LayoutParams params = mKeyPreviewBackingView.getLayoutParams(); - params.height = mSuggestionsView.setMoreSuggestionsHeight(remainingHeight); + params.height = mSuggestionStripView.setMoreSuggestionsHeight(remainingHeight); mKeyPreviewBackingView.setLayoutParams(params); return params.height; } @@ -1091,7 +1091,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen || codePoint == Keyboard.CODE_CLOSING_ANGLE_BRACKET; } - // Callback for the SuggestionsView, to call when the "add to dictionary" hint is pressed. + // Callback for the {@link SuggestionStripView}, to call when the "add to dictionary" hint is + // pressed. @Override public boolean addWordToUserDictionary(String word) { mUserDictionary.addWordToUserDictionary(word, 128); @@ -1564,7 +1565,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSpaceState = SPACE_STATE_WEAK; } // In case the "add to dictionary" hint was still displayed. - if (null != mSuggestionsView) mSuggestionsView.dismissAddToDictionaryHint(); + if (null != mSuggestionStripView) mSuggestionStripView.dismissAddToDictionaryHint(); } mHandler.postUpdateSuggestionStrip(); Utils.Stats.onNonSeparator((char)primaryCode, x, y); @@ -1651,14 +1652,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: make this private // Outside LatinIME, only used by the test suite. /* package for tests */ boolean isShowingPunctuationList() { - if (mSuggestionsView == null) return false; - return mCurrentSettings.mSuggestPuncList == mSuggestionsView.getSuggestions(); + if (mSuggestionStripView == null) return false; + return mCurrentSettings.mSuggestPuncList == mSuggestionStripView.getSuggestions(); } private boolean isSuggestionsStripVisible() { - if (mSuggestionsView == null) + if (mSuggestionStripView == null) return false; - if (mSuggestionsView.isShowingAddToDictionaryHint()) + if (mSuggestionStripView.isShowingAddToDictionaryHint()) return true; if (!mCurrentSettings.isSuggestionStripVisibleInOrientation(mDisplayOrientation)) return false; @@ -1673,8 +1674,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } private void setSuggestions(final SuggestedWords words, final boolean isAutoCorrection) { - if (mSuggestionsView != null) { - mSuggestionsView.setSuggestions(words); + if (mSuggestionStripView != null) { + mSuggestionStripView.setSuggestions(words); mKeyboardSwitcher.onAutoCorrectionStateChanged(isAutoCorrection); } } @@ -1737,10 +1738,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // revert to suggestions - although it is unclear how we can come here if it's displayed. if (suggestedWords.size() > 1 || typedWord.length() <= 1 || !suggestedWords.mTypedWordValid - || mSuggestionsView.isShowingAddToDictionaryHint()) { + || mSuggestionStripView.isShowingAddToDictionaryHint()) { return suggestedWords; } else { - SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions(); + SuggestedWords previousSuggestions = mSuggestionStripView.getSuggestions(); if (previousSuggestions == mCurrentSettings.mSuggestPuncList) { previousSuggestions = SuggestedWords.EMPTY; } @@ -1811,11 +1812,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - // Called from SuggestionsView through the SuggestionsView.Listener interface + // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener} + // interface @Override public void pickSuggestionManually(final int index, final CharSequence suggestion, final int x, final int y) { - final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); + final SuggestedWords suggestedWords = mSuggestionStripView.getSuggestions(); // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput if (suggestion.length() == 1 && isShowingPunctuationList()) { // Word separators are suggested before the user inputs something. @@ -1847,8 +1849,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (mCurrentSettings.isApplicationSpecifiedCompletionsOn() && mApplicationSpecifiedCompletions != null && index >= 0 && index < mApplicationSpecifiedCompletions.length) { - if (mSuggestionsView != null) { - mSuggestionsView.clear(); + if (mSuggestionStripView != null) { + mSuggestionStripView.clear(); } mKeyboardSwitcher.updateShiftState(); resetComposingState(true /* alsoResetLastComposedWord */); @@ -1897,7 +1899,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen Utils.Stats.onSeparator((char)Keyboard.CODE_SPACE, WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE); if (showingAddToDictionaryHint && mIsUserDictionaryAvailable) { - mSuggestionsView.showAddToDictionaryHint(suggestion, mCurrentSettings.mHintToSaveText); + mSuggestionStripView.showAddToDictionaryHint( + suggestion, mCurrentSettings.mHintToSaveText); } else { // If we're not showing the "Touch again to save", then update the suggestion strip. mHandler.postUpdateSuggestionStrip(); @@ -1909,7 +1912,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen */ private void commitChosenWord(final CharSequence chosenWord, final int commitType, final int separatorCode) { - final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); + final SuggestedWords suggestedWords = mSuggestionStripView.getSuggestions(); mConnection.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( this, chosenWord, suggestedWords, mIsMainDictionaryAvailable), 1); if (ProductionFlag.IS_EXPERIMENTAL) { diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java index c6fe43b69..58b01aa55 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestions.java @@ -42,10 +42,10 @@ public class MoreSuggestions extends Keyboard { private int mToPos; public static class MoreSuggestionsParam extends Keyboard.Params { - private final int[] mWidths = new int[SuggestionsView.MAX_SUGGESTIONS]; - private final int[] mRowNumbers = new int[SuggestionsView.MAX_SUGGESTIONS]; - private final int[] mColumnOrders = new int[SuggestionsView.MAX_SUGGESTIONS]; - private final int[] mNumColumnsInRow = new int[SuggestionsView.MAX_SUGGESTIONS]; + private final int[] mWidths = new int[SuggestionStripView.MAX_SUGGESTIONS]; + private final int[] mRowNumbers = new int[SuggestionStripView.MAX_SUGGESTIONS]; + private final int[] mColumnOrders = new int[SuggestionStripView.MAX_SUGGESTIONS]; + private final int[] mNumColumnsInRow = new int[SuggestionStripView.MAX_SUGGESTIONS]; private static final int MAX_COLUMNS_IN_ROW = 3; private int mNumRows; public Drawable mDivider; @@ -63,7 +63,7 @@ public class MoreSuggestions extends Keyboard { int row = 0; int pos = fromPos, rowStartPos = fromPos; - final int size = Math.min(suggestions.size(), SuggestionsView.MAX_SUGGESTIONS); + final int size = Math.min(suggestions.size(), SuggestionStripView.MAX_SUGGESTIONS); while (pos < size) { final String word = suggestions.getWord(pos).toString(); // TODO: Should take care of text x-scaling. diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java index 19287e3f3..5b23d7f3c 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java @@ -68,7 +68,7 @@ public class MoreSuggestionsView extends KeyboardView implements MoreKeysPanel { @Override public void onCodeInput(int primaryCode, int x, int y) { final int index = primaryCode - MoreSuggestions.SUGGESTION_CODE_BASE; - if (index >= 0 && index < SuggestionsView.MAX_SUGGESTIONS) { + if (index >= 0 && index < SuggestionStripView.MAX_SUGGESTIONS) { mListener.onCustomRequest(index); } } diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 52ceb8698..b57ffd2de 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -68,7 +68,7 @@ import com.android.inputmethod.research.ResearchLogger; import java.util.ArrayList; -public class SuggestionsView extends RelativeLayout implements OnClickListener, +public class SuggestionStripView extends RelativeLayout implements OnClickListener, OnLongClickListener { public interface Listener { public boolean addWordToUserDictionary(String word); @@ -98,24 +98,24 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, private Listener mListener; private SuggestedWords mSuggestedWords = SuggestedWords.EMPTY; - private final SuggestionsViewParams mParams; + private final SuggestionStripViewParams mParams; private static final float MIN_TEXT_XSCALE = 0.70f; private final UiHandler mHandler = new UiHandler(this); - private static class UiHandler extends StaticInnerHandlerWrapper<SuggestionsView> { + private static class UiHandler extends StaticInnerHandlerWrapper<SuggestionStripView> { private static final int MSG_HIDE_PREVIEW = 0; - public UiHandler(SuggestionsView outerInstance) { + public UiHandler(SuggestionStripView outerInstance) { super(outerInstance); } @Override public void dispatchMessage(Message msg) { - final SuggestionsView suggestionsView = getOuterInstance(); + final SuggestionStripView suggestionStripView = getOuterInstance(); switch (msg.what) { case MSG_HIDE_PREVIEW: - suggestionsView.hidePreview(); + suggestionStripView.hidePreview(); break; } } @@ -129,7 +129,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, } } - private static class SuggestionsViewParams { + private static class SuggestionStripViewParams { private static final int DEFAULT_SUGGESTIONS_COUNT_IN_STRIP = 3; private static final int DEFAULT_CENTER_SUGGESTION_PERCENTILE = 40; private static final int DEFAULT_MAX_MORE_SUGGESTIONS_ROW = 2; @@ -175,7 +175,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, private final TextView mLeftwardsArrowView; private final TextView mHintToSaveView; - public SuggestionsViewParams(Context context, AttributeSet attrs, int defStyle, + public SuggestionStripViewParams(Context context, AttributeSet attrs, int defStyle, ArrayList<TextView> words, ArrayList<View> dividers, ArrayList<TextView> infos) { mWords = words; mDividers = dividers; @@ -191,38 +191,39 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, final Resources res = word.getResources(); mSuggestionsStripHeight = res.getDimensionPixelSize(R.dimen.suggestions_strip_height); - final TypedArray a = context.obtainStyledAttributes( - attrs, R.styleable.SuggestionsView, defStyle, R.style.SuggestionsViewStyle); - mSuggestionStripOption = a.getInt(R.styleable.SuggestionsView_suggestionStripOption, 0); + final TypedArray a = context.obtainStyledAttributes(attrs, + R.styleable.SuggestionStripView, defStyle, R.style.SuggestionStripViewStyle); + mSuggestionStripOption = a.getInt( + R.styleable.SuggestionStripView_suggestionStripOption, 0); final float alphaValidTypedWord = getPercent(a, - R.styleable.SuggestionsView_alphaValidTypedWord, 100); + R.styleable.SuggestionStripView_alphaValidTypedWord, 100); final float alphaTypedWord = getPercent(a, - R.styleable.SuggestionsView_alphaTypedWord, 100); + R.styleable.SuggestionStripView_alphaTypedWord, 100); final float alphaAutoCorrect = getPercent(a, - R.styleable.SuggestionsView_alphaAutoCorrect, 100); + R.styleable.SuggestionStripView_alphaAutoCorrect, 100); final float alphaSuggested = getPercent(a, - R.styleable.SuggestionsView_alphaSuggested, 100); - mAlphaObsoleted = getPercent(a, R.styleable.SuggestionsView_alphaSuggested, 100); - mColorValidTypedWord = applyAlpha( - a.getColor(R.styleable.SuggestionsView_colorValidTypedWord, 0), - alphaValidTypedWord); - mColorTypedWord = applyAlpha( - a.getColor(R.styleable.SuggestionsView_colorTypedWord, 0), alphaTypedWord); - mColorAutoCorrect = applyAlpha( - a.getColor(R.styleable.SuggestionsView_colorAutoCorrect, 0), alphaAutoCorrect); - mColorSuggested = applyAlpha( - a.getColor(R.styleable.SuggestionsView_colorSuggested, 0), alphaSuggested); + R.styleable.SuggestionStripView_alphaSuggested, 100); + mAlphaObsoleted = getPercent(a, + R.styleable.SuggestionStripView_alphaSuggested, 100); + mColorValidTypedWord = applyAlpha(a.getColor( + R.styleable.SuggestionStripView_colorValidTypedWord, 0), alphaValidTypedWord); + mColorTypedWord = applyAlpha(a.getColor( + R.styleable.SuggestionStripView_colorTypedWord, 0), alphaTypedWord); + mColorAutoCorrect = applyAlpha(a.getColor( + R.styleable.SuggestionStripView_colorAutoCorrect, 0), alphaAutoCorrect); + mColorSuggested = applyAlpha(a.getColor( + R.styleable.SuggestionStripView_colorSuggested, 0), alphaSuggested); mSuggestionsCountInStrip = a.getInt( - R.styleable.SuggestionsView_suggestionsCountInStrip, + R.styleable.SuggestionStripView_suggestionsCountInStrip, DEFAULT_SUGGESTIONS_COUNT_IN_STRIP); mCenterSuggestionWeight = getPercent(a, - R.styleable.SuggestionsView_centerSuggestionPercentile, + R.styleable.SuggestionStripView_centerSuggestionPercentile, DEFAULT_CENTER_SUGGESTION_PERCENTILE); mMaxMoreSuggestionsRow = a.getInt( - R.styleable.SuggestionsView_maxMoreSuggestionsRow, + R.styleable.SuggestionStripView_maxMoreSuggestionsRow, DEFAULT_MAX_MORE_SUGGESTIONS_ROW); mMinMoreSuggestionsWidth = getRatio(a, - R.styleable.SuggestionsView_minMoreSuggestionsWidth); + R.styleable.SuggestionStripView_minMoreSuggestionsWidth); a.recycle(); mMoreSuggestionsHint = getMoreSuggestionsHint(res, @@ -596,15 +597,15 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, } /** - * Construct a {@link SuggestionsView} for showing suggestions to be picked by the user. + * Construct a {@link SuggestionStripView} for showing suggestions to be picked by the user. * @param context * @param attrs */ - public SuggestionsView(Context context, AttributeSet attrs) { - this(context, attrs, R.attr.suggestionsViewStyle); + public SuggestionStripView(Context context, AttributeSet attrs) { + this(context, attrs, R.attr.suggestionStripViewStyle); } - public SuggestionsView(Context context, AttributeSet attrs, int defStyle) { + public SuggestionStripView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); final LayoutInflater inflater = LayoutInflater.from(context); @@ -631,7 +632,8 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, mInfos.add((TextView)inflater.inflate(R.layout.suggestion_info, null)); } - mParams = new SuggestionsViewParams(context, attrs, defStyle, mWords, mDividers, mInfos); + mParams = new SuggestionStripViewParams( + context, attrs, defStyle, mWords, mDividers, mInfos); mMoreSuggestionsContainer = inflater.inflate(R.layout.more_suggestions, null); mMoreSuggestionsView = (MoreSuggestionsView)mMoreSuggestionsContainer @@ -677,7 +679,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, mSuggestedWords = suggestedWords; mParams.layout(mSuggestedWords, mSuggestionsStrip, this, getWidth()); if (ProductionFlag.IS_EXPERIMENTAL) { - ResearchLogger.suggestionsView_setSuggestions(mSuggestedWords); + ResearchLogger.suggestionStripView_setSuggestions(mSuggestedWords); } } @@ -759,7 +761,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, } private boolean showMoreSuggestions() { - final SuggestionsViewParams params = mParams; + final SuggestionStripViewParams params = mParams; if (params.mMoreSuggestionsAvailable) { final int stripWidth = getWidth(); final View container = mMoreSuggestionsContainer; diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index d0523f66e..68bd98a23 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -1258,16 +1258,16 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } } - private static final String[] EVENTKEYS_SUGGESTIONSVIEW_SETSUGGESTIONS = { - "SuggestionsViewSetSuggestions", "suggestedWords" + private static final String[] EVENTKEYS_SUGGESTIONSTRIPVIEW_SETSUGGESTIONS = { + "SuggestionStripViewSetSuggestions", "suggestedWords" }; - public static void suggestionsView_setSuggestions(final SuggestedWords suggestedWords) { + public static void suggestionStripView_setSuggestions(final SuggestedWords suggestedWords) { if (suggestedWords != null) { final Object[] values = { suggestedWords }; - getInstance().enqueuePotentiallyPrivateEvent(EVENTKEYS_SUGGESTIONSVIEW_SETSUGGESTIONS, - values); + getInstance().enqueuePotentiallyPrivateEvent( + EVENTKEYS_SUGGESTIONSTRIPVIEW_SETSUGGESTIONS, values); } } |