parent
c029e0f4a7
commit
5e4e05afd2
|
@ -782,11 +782,15 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
|||
}
|
||||
|
||||
public void onAutoCorrectionStateChanged(boolean isAutoCorrection) {
|
||||
if (isAutoCorrection != mIsAutoCorrectionActive) {
|
||||
LatinKeyboardView keyboardView = getKeyboardView();
|
||||
if (mIsAutoCorrectionActive != isAutoCorrection) {
|
||||
mIsAutoCorrectionActive = isAutoCorrection;
|
||||
keyboardView.invalidateKey(((LatinKeyboard) keyboardView.getKeyboard())
|
||||
.onAutoCorrectionStateChanged(isAutoCorrection));
|
||||
final LatinKeyboard keyboard = getLatinKeyboard();
|
||||
if (keyboard != null && keyboard.needsAutoCorrectionSpacebarLed()) {
|
||||
final Key invalidatedKey = keyboard.onAutoCorrectionStateChanged(isAutoCorrection);
|
||||
final LatinKeyboardView keyboardView = getKeyboardView();
|
||||
if (keyboardView != null)
|
||||
keyboardView.invalidateKey(invalidatedKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1459,16 +1459,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
|||
}
|
||||
|
||||
public void setSuggestions(SuggestedWords words) {
|
||||
// if (mVoiceProxy.getAndResetIsShowingHint()) {
|
||||
// setCandidatesView(mCandidateViewContainer);
|
||||
// }
|
||||
|
||||
if (mCandidateView != null) {
|
||||
mCandidateView.setSuggestions(words);
|
||||
if (mKeyboardSwitcher.getLatinKeyboard().needsAutoCorrectionSpacebarLed()) {
|
||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(
|
||||
words.hasWordAboveAutoCorrectionScoreThreshold());
|
||||
}
|
||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(
|
||||
words.hasWordAboveAutoCorrectionScoreThreshold());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue