am 169acbf9: Add null check in createDistracterFilter().
* commit '169acbf9f0127c7b6a95592fc412524d27b50953': Add null check in createDistracterFilter().main
commit
a11b60ac33
|
@ -543,7 +543,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private DistracterFilter createDistracterFilter() {
|
private DistracterFilter createDistracterFilter() {
|
||||||
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
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,
|
final DistracterFilter distracterFilter = new DistracterFilter(mInputLogic.mSuggest,
|
||||||
keyboard);
|
keyboard);
|
||||||
return distracterFilter;
|
return distracterFilter;
|
||||||
|
|
Loading…
Reference in New Issue