Fix NPE happening in unit tests.
Change-Id: I2fc0dba53e18883755ff77351c152a9d3534c92b
This commit is contained in:
parent
dc1e70b379
commit
a2ce9a49ac
1 changed files with 3 additions and 2 deletions
|
@ -1747,9 +1747,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
@UsedForTesting
|
||||
/* package for test */ DistracterFilter createDistracterFilter() {
|
||||
return new DistracterFilter(this /* Context */,
|
||||
// Return an empty distracter filter when this method is called before onCreate().
|
||||
return (mRichImm != null) ? new DistracterFilter(this /* Context */,
|
||||
mRichImm.getMyEnabledInputMethodSubtypeList(
|
||||
true /* allowsImplicitlySelectedSubtypes */));
|
||||
true /* allowsImplicitlySelectedSubtypes */)) : new DistracterFilter();
|
||||
}
|
||||
|
||||
public void dumpDictionaryForDebug(final String dictName) {
|
||||
|
|
Loading…
Reference in a new issue