From 37e1cc931f8487c6d8f0b6633c7f626d0839ebf5 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 24 Jan 2014 21:12:41 +0900 Subject: [PATCH] [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 --- java/src/com/android/inputmethod/latin/LatinIME.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 58f4eb954..1670844ed 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1011,7 +1011,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen false /* isPrediction */); // When in fullscreen mode, show completions generated by the application setSuggestedWords(suggestedWords); - setAutoCorrectionIndicator(false); setSuggestionStripShown(true); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions); @@ -1336,6 +1335,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggestionStripView.setSuggestions(words); mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect); } + setAutoCorrectionIndicator(words.mWillAutoCorrect); } private void setAutoCorrectionIndicator(final boolean newAutoCorrectionIndicator) { @@ -1440,7 +1440,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mInputLogic.mWordComposer.setAutoCorrection(autoCorrection); } setSuggestedWords(suggestedWords); - setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect); setSuggestionStripShown(isSuggestionsStripVisible()); // Cache the auto-correction in accessibility code so we can speak it if the user // touches a key that will insert it. @@ -1558,7 +1557,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } else { setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList); } - setAutoCorrectionIndicator(false); setSuggestionStripShown(isSuggestionsStripVisible()); }