From cf383a8175593aaba287903661889bbb1a34b152 Mon Sep 17 00:00:00 2001 From: satok Date: Fri, 25 Mar 2011 20:01:24 -0700 Subject: [PATCH] Fix a NPE in InputMethodManagerCompatWrapper Change-Id: Ia7c9b7135ba38a8df29464f7776b51d412f71acb --- .../inputmethod/compat/InputMethodManagerCompatWrapper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java index 3bf0ed6b5..5e66bf4d9 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/InputMethodManagerCompatWrapper.java @@ -75,6 +75,9 @@ public class InputMethodManagerCompatWrapper { InputMethodInfoCompatWrapper imi, boolean allowsImplicitlySelectedSubtypes) { Object retval = CompatUtils.invoke(mImm, null, METHOD_getEnabledInputMethodSubtypeList, (imi != null ? imi.getInputMethodInfo() : null), allowsImplicitlySelectedSubtypes); + // Returns an empty list + if (retval == null) + return Collections.emptyList(); return CompatUtils.copyInputMethodSubtypeListToWrapper((List)retval); }