Fix voice key enable status has not been reflected to keyboard id

Bug: 3355428
Change-Id: Id4e572357a7b5603e9a609b7e80b81d8e2c500f6
main
Tadashi G. Takaoka 2011-01-17 19:27:39 +09:00
parent dc64b138b5
commit 8bec4aa912
1 changed files with 7 additions and 7 deletions

View File

@ -174,12 +174,6 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
private void loadKeyboardInternal(int mode, int imeOptions, boolean voiceButtonEnabled,
boolean voiceButtonOnPrimary, boolean isSymbols) {
if (mInputView == null) return;
final Keyboard oldKeyboard = mInputView.getKeyboard();
final KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);
if (oldKeyboard != null && oldKeyboard.mId.equals(id))
return;
mInputView.setPreviewEnabled(mInputMethodService.getPopupOn());
mMode = mode;
mImeOptions = imeOptions;
@ -188,9 +182,15 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
mIsSymbols = isSymbols;
// Update the settings key state because number of enabled IMEs could have been changed
mHasSettingsKey = getSettingsKeyMode(mPrefs, mInputMethodService);
makeSymbolsKeyboardIds();
final KeyboardId id = getKeyboardId(mode, imeOptions, isSymbols);
final Keyboard oldKeyboard = mInputView.getKeyboard();
if (oldKeyboard != null && oldKeyboard.mId.equals(id))
return;
makeSymbolsKeyboardIds();
mCurrentId = id;
mInputView.setPreviewEnabled(mInputMethodService.getPopupOn());
mInputView.setKeyboard(getKeyboard(id));
}