Add null check in createDistracterFilter().
Change-Id: Iff2b73081d48f32b1d3a5d5b32c9734979362c23
This commit is contained in:
parent
516c884b11
commit
169acbf9f0
1 changed files with 5 additions and 1 deletions
|
@ -543,7 +543,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
private DistracterFilter createDistracterFilter() {
|
||||
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
||||
final Keyboard keyboard = mainKeyboardView.getKeyboard();
|
||||
// TODO: Create Keyboard when mainKeyboardView is null.
|
||||
// TODO: Figure out the most reasonable keyboard for the filter. Refer to the
|
||||
// spellchecker's logic.
|
||||
final Keyboard keyboard = (mainKeyboardView != null) ?
|
||||
mainKeyboardView.getKeyboard() : null;
|
||||
final DistracterFilter distracterFilter = new DistracterFilter(mInputLogic.mSuggest,
|
||||
keyboard);
|
||||
return distracterFilter;
|
||||
|
|
Loading…
Reference in a new issue