Fix a crash when starting up LatinIME or changing orientation. Bug:2403575

This commit is contained in:
Amith Yamasani 2010-01-28 12:34:01 -08:00
parent a16ff1b19e
commit b8f98ad014

View file

@ -793,7 +793,9 @@ public class LatinIME extends InputMethodService
}
mKeyboardSwitcher.setInputLocale(new Locale(mInputLanguage),
getSelectedInputLanguages() != null);
mKeyboardSwitcher.setVoiceMode(mEnableVoice, mVoiceOnPrimary);
if (mInputView != null) {
mKeyboardSwitcher.setVoiceMode(mEnableVoice, mVoiceOnPrimary);
}
mKeyboardSwitcher.makeKeyboards(true);
}