Skip to content
Snippets Groups Projects
Commit cf383a81 authored by satok's avatar satok
Browse files

Fix a NPE in InputMethodManagerCompatWrapper

Change-Id: Ia7c9b7135ba38a8df29464f7776b51d412f71acb
parent 9115dd27
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,9 @@ public class InputMethodManagerCompatWrapper { ...@@ -75,6 +75,9 @@ public class InputMethodManagerCompatWrapper {
InputMethodInfoCompatWrapper imi, boolean allowsImplicitlySelectedSubtypes) { InputMethodInfoCompatWrapper imi, boolean allowsImplicitlySelectedSubtypes) {
Object retval = CompatUtils.invoke(mImm, null, METHOD_getEnabledInputMethodSubtypeList, Object retval = CompatUtils.invoke(mImm, null, METHOD_getEnabledInputMethodSubtypeList,
(imi != null ? imi.getInputMethodInfo() : null), allowsImplicitlySelectedSubtypes); (imi != null ? imi.getInputMethodInfo() : null), allowsImplicitlySelectedSubtypes);
// Returns an empty list
if (retval == null)
return Collections.emptyList();
return CompatUtils.copyInputMethodSubtypeListToWrapper((List<?>)retval); return CompatUtils.copyInputMethodSubtypeListToWrapper((List<?>)retval);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment