Loading java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java +5 −5 Original line number Diff line number Diff line Loading @@ -218,10 +218,10 @@ public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeL mService.showSuggestions(builder.build(), entries.getOriginalWord()); } public void setRecorrectionSuggestions(VoiceProxy voiceProxy, CandidateView candidateView, Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word, boolean hasUncommittedTypedChars, int lastSelectionStart, int lastSelectionEnd, String wordSeparators) { public void fetchAndDisplayRecorrectionSuggestions(VoiceProxy voiceProxy, CandidateView candidateView, Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word, boolean hasUncommittedTypedChars, int lastSelectionStart, int lastSelectionEnd, String wordSeparators) { if (!InputConnectionCompatUtils.RECORRECTION_SUPPORTED) return; if (SuggestionSpanUtils.SUGGESTION_SPAN_IS_SUPPORTED || !mRecorrectionEnabled) return; voiceProxy.setShowingVoiceSuggestions(false); Loading Loading @@ -249,7 +249,7 @@ public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeL ic.endBatchEdit(); } else { abortRecorrection(true); mService.setPunctuationSuggestions(); // Show the punctuation suggestions list mService.updateBigramPredictions(); } } else { abortRecorrection(true); Loading java/src/com/android/inputmethod/latin/LatinIME.java +8 −6 Original line number Diff line number Diff line Loading @@ -222,9 +222,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar updateSuggestions(); break; case MSG_UPDATE_OLD_SUGGESTIONS: mRecorrection.setRecorrectionSuggestions(mVoiceProxy, mCandidateView, mSuggest, mKeyboardSwitcher, mWord, mHasUncommittedTypedChars, mLastSelectionStart, mLastSelectionEnd, mSettingsValues.mWordSeparators); mRecorrection.fetchAndDisplayRecorrectionSuggestions(mVoiceProxy, mCandidateView, mSuggest, mKeyboardSwitcher, mWord, mHasUncommittedTypedChars, mLastSelectionStart, mLastSelectionEnd, mSettingsValues.mWordSeparators); break; case MSG_UPDATE_SHIFT_STATE: switcher.updateShiftState(); Loading Loading @@ -1623,8 +1623,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (!showingAddToDictionaryHint) { // If we're not showing the "Touch again to save", then show corrections again. // In case the cursor position doesn't change, make sure we show the suggestions again. clearSuggestions(); mHandler.postUpdateOldSuggestions(); updateBigramPredictions(); // Updating the predictions right away may be slow and feel unresponsive on slower // terminals. On the other hand if we just postUpdateBigramPredictions() it will // take a noticeable delay to update them which may feel uneasy. } if (showingAddToDictionaryHint) { mCandidateView.showAddToDictionaryHint(suggestion); Loading Loading @@ -1655,7 +1657,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } private static final WordComposer sEmptyWordComposer = new WordComposer(); private void updateBigramPredictions() { public void updateBigramPredictions() { if (mSuggest == null || !isSuggestionsRequested()) return; Loading Loading
java/src/com/android/inputmethod/deprecated/recorrection/Recorrection.java +5 −5 Original line number Diff line number Diff line Loading @@ -218,10 +218,10 @@ public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeL mService.showSuggestions(builder.build(), entries.getOriginalWord()); } public void setRecorrectionSuggestions(VoiceProxy voiceProxy, CandidateView candidateView, Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word, boolean hasUncommittedTypedChars, int lastSelectionStart, int lastSelectionEnd, String wordSeparators) { public void fetchAndDisplayRecorrectionSuggestions(VoiceProxy voiceProxy, CandidateView candidateView, Suggest suggest, KeyboardSwitcher keyboardSwitcher, WordComposer word, boolean hasUncommittedTypedChars, int lastSelectionStart, int lastSelectionEnd, String wordSeparators) { if (!InputConnectionCompatUtils.RECORRECTION_SUPPORTED) return; if (SuggestionSpanUtils.SUGGESTION_SPAN_IS_SUPPORTED || !mRecorrectionEnabled) return; voiceProxy.setShowingVoiceSuggestions(false); Loading Loading @@ -249,7 +249,7 @@ public class Recorrection implements SharedPreferences.OnSharedPreferenceChangeL ic.endBatchEdit(); } else { abortRecorrection(true); mService.setPunctuationSuggestions(); // Show the punctuation suggestions list mService.updateBigramPredictions(); } } else { abortRecorrection(true); Loading
java/src/com/android/inputmethod/latin/LatinIME.java +8 −6 Original line number Diff line number Diff line Loading @@ -222,9 +222,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar updateSuggestions(); break; case MSG_UPDATE_OLD_SUGGESTIONS: mRecorrection.setRecorrectionSuggestions(mVoiceProxy, mCandidateView, mSuggest, mKeyboardSwitcher, mWord, mHasUncommittedTypedChars, mLastSelectionStart, mLastSelectionEnd, mSettingsValues.mWordSeparators); mRecorrection.fetchAndDisplayRecorrectionSuggestions(mVoiceProxy, mCandidateView, mSuggest, mKeyboardSwitcher, mWord, mHasUncommittedTypedChars, mLastSelectionStart, mLastSelectionEnd, mSettingsValues.mWordSeparators); break; case MSG_UPDATE_SHIFT_STATE: switcher.updateShiftState(); Loading Loading @@ -1623,8 +1623,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (!showingAddToDictionaryHint) { // If we're not showing the "Touch again to save", then show corrections again. // In case the cursor position doesn't change, make sure we show the suggestions again. clearSuggestions(); mHandler.postUpdateOldSuggestions(); updateBigramPredictions(); // Updating the predictions right away may be slow and feel unresponsive on slower // terminals. On the other hand if we just postUpdateBigramPredictions() it will // take a noticeable delay to update them which may feel uneasy. } if (showingAddToDictionaryHint) { mCandidateView.showAddToDictionaryHint(suggestion); Loading Loading @@ -1655,7 +1657,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } private static final WordComposer sEmptyWordComposer = new WordComposer(); private void updateBigramPredictions() { public void updateBigramPredictions() { if (mSuggest == null || !isSuggestionsRequested()) return; Loading