mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
[IL93] Refactor a method inside another
The calls to setAutoCorrectionIndicator with a constant are always the exact same as mWillAutoCorrect. Bug: 8636060 Change-Id: I8106919819b978b0a9655af2ef444664fad4c1ad
This commit is contained in:
parent
4c6029e530
commit
37e1cc931f
@ -1011,7 +1011,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
false /* isPrediction */);
|
false /* isPrediction */);
|
||||||
// When in fullscreen mode, show completions generated by the application
|
// When in fullscreen mode, show completions generated by the application
|
||||||
setSuggestedWords(suggestedWords);
|
setSuggestedWords(suggestedWords);
|
||||||
setAutoCorrectionIndicator(false);
|
|
||||||
setSuggestionStripShown(true);
|
setSuggestionStripShown(true);
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
||||||
@ -1336,6 +1335,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
mSuggestionStripView.setSuggestions(words);
|
mSuggestionStripView.setSuggestions(words);
|
||||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
||||||
}
|
}
|
||||||
|
setAutoCorrectionIndicator(words.mWillAutoCorrect);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAutoCorrectionIndicator(final boolean newAutoCorrectionIndicator) {
|
private void setAutoCorrectionIndicator(final boolean newAutoCorrectionIndicator) {
|
||||||
@ -1440,7 +1440,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
}
|
}
|
||||||
setSuggestedWords(suggestedWords);
|
setSuggestedWords(suggestedWords);
|
||||||
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(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.
|
||||||
@ -1558,7 +1557,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
} else {
|
} else {
|
||||||
setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList);
|
setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList);
|
||||||
}
|
}
|
||||||
setAutoCorrectionIndicator(false);
|
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user