[IL105] Remove more useless arguments
Bug: 8636060 Change-Id: I9e817bb9622c84544a5ca8708e5c1fccad1ed447main
parent
084c9961f4
commit
fa7075768d
|
@ -189,7 +189,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
case MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP:
|
case MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP:
|
||||||
if (msg.arg1 == ARG1_NOT_GESTURE_INPUT) {
|
if (msg.arg1 == ARG1_NOT_GESTURE_INPUT) {
|
||||||
final SuggestedWords suggestedWords = (SuggestedWords) msg.obj;
|
final SuggestedWords suggestedWords = (SuggestedWords) msg.obj;
|
||||||
latinIme.showSuggestionStrip(suggestedWords, suggestedWords.mTypedWord);
|
latinIme.showSuggestionStrip(suggestedWords);
|
||||||
} else {
|
} else {
|
||||||
latinIme.showGesturePreviewAndSuggestionStrip((SuggestedWords) msg.obj,
|
latinIme.showGesturePreviewAndSuggestionStrip((SuggestedWords) msg.obj,
|
||||||
msg.arg1 == ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT);
|
msg.arg1 == ARG1_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT);
|
||||||
|
@ -1254,7 +1254,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// This method must run on the UI Thread.
|
// This method must run on the UI Thread.
|
||||||
private void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
|
private void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords,
|
||||||
final boolean dismissGestureFloatingPreviewText) {
|
final boolean dismissGestureFloatingPreviewText) {
|
||||||
showSuggestionStrip(suggestedWords, suggestedWords.mTypedWord);
|
showSuggestionStrip(suggestedWords);
|
||||||
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
||||||
mainKeyboardView.showGestureFloatingPreviewText(suggestedWords);
|
mainKeyboardView.showGestureFloatingPreviewText(suggestedWords);
|
||||||
if (dismissGestureFloatingPreviewText) {
|
if (dismissGestureFloatingPreviewText) {
|
||||||
|
@ -1390,8 +1390,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO[IL]: Define a clean interface for this
|
// TODO[IL]: Define a clean interface for this
|
||||||
public void showSuggestionStrip(final SuggestedWords sourceSuggestedWords,
|
public void showSuggestionStrip(final SuggestedWords sourceSuggestedWords) {
|
||||||
final String typedWord) {
|
|
||||||
final SuggestedWords suggestedWords =
|
final SuggestedWords suggestedWords =
|
||||||
sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
|
sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
|
||||||
final String autoCorrection;
|
final String autoCorrection;
|
||||||
|
@ -1400,7 +1399,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
} else {
|
} else {
|
||||||
// We can't use suggestedWords.getWord(SuggestedWords.INDEX_OF_TYPED_WORD)
|
// We can't use suggestedWords.getWord(SuggestedWords.INDEX_OF_TYPED_WORD)
|
||||||
// because it may differ from mWordComposer.mTypedWord.
|
// because it may differ from mWordComposer.mTypedWord.
|
||||||
autoCorrection = typedWord;
|
autoCorrection = sourceSuggestedWords.mTypedWord;
|
||||||
}
|
}
|
||||||
if (SuggestedWords.EMPTY != suggestedWords) {
|
if (SuggestedWords.EMPTY != suggestedWords) {
|
||||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
|
@ -1408,7 +1407,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
setSuggestedWords(suggestedWords, isSuggestionsStripVisible());
|
setSuggestedWords(suggestedWords, isSuggestionsStripVisible());
|
||||||
// Cache the auto-correction in accessibility code so we can speak it if the user
|
// Cache the auto-correction in accessibility code so we can speak it if the user
|
||||||
// touches a key that will insert it.
|
// touches a key that will insert it.
|
||||||
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
|
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords,
|
||||||
|
sourceSuggestedWords.mTypedWord);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
|
// Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
|
||||||
|
|
|
@ -1120,7 +1120,7 @@ public final class InputLogic {
|
||||||
final SuggestedWords suggestedWords = holder.get(null,
|
final SuggestedWords suggestedWords = holder.get(null,
|
||||||
Constants.GET_SUGGESTED_WORDS_TIMEOUT);
|
Constants.GET_SUGGESTED_WORDS_TIMEOUT);
|
||||||
if (suggestedWords != null) {
|
if (suggestedWords != null) {
|
||||||
mLatinIME.showSuggestionStrip(suggestedWords, suggestedWords.mTypedWord);
|
mLatinIME.showSuggestionStrip(suggestedWords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1620,8 +1620,7 @@ public final class InputLogic {
|
||||||
mConnection.commitText(batchInputText.substring(0, indexOfLastSpace), 1);
|
mConnection.commitText(batchInputText.substring(0, indexOfLastSpace), 1);
|
||||||
final SuggestedWords suggestedWordsForLastWordOfPhraseGesture =
|
final SuggestedWords suggestedWordsForLastWordOfPhraseGesture =
|
||||||
suggestedWords.getSuggestedWordsForLastWordOfPhraseGesture();
|
suggestedWords.getSuggestedWordsForLastWordOfPhraseGesture();
|
||||||
mLatinIME.showSuggestionStrip(suggestedWordsForLastWordOfPhraseGesture,
|
mLatinIME.showSuggestionStrip(suggestedWordsForLastWordOfPhraseGesture);
|
||||||
suggestedWordsForLastWordOfPhraseGesture.mTypedWord);
|
|
||||||
}
|
}
|
||||||
final String lastWord = batchInputText.substring(indexOfLastSpace);
|
final String lastWord = batchInputText.substring(indexOfLastSpace);
|
||||||
mWordComposer.setBatchInputWord(lastWord);
|
mWordComposer.setBatchInputWord(lastWord);
|
||||||
|
|
Loading…
Reference in New Issue