am c60a846e: Fix NPE in Settings.updateCustomInputStylesSummary

* commit 'c60a846e219ead1a40307d1a562013c38ea81b9d':
  Fix NPE in Settings.updateCustomInputStylesSummary
main
Tadashi G. Takaoka 2012-05-24 00:48:35 -07:00 committed by Android Git Automerger
commit bc48a8f7ab
1 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import android.view.inputmethod.InputMethodSubtype;
import java.util.ArrayList; import java.util.ArrayList;
public class AdditionalSubtype { public class AdditionalSubtype {
private static final InputMethodSubtype EMPTY_SUBTYPE_ARRAY = new InputMethodSubtype[0];
private AdditionalSubtype() { private AdditionalSubtype() {
// This utility class is not publicly instantiable. // This utility class is not publicly instantiable.
@ -86,7 +87,7 @@ public class AdditionalSubtype {
public static InputMethodSubtype[] createAdditionalSubtypesArray(String prefSubtypes) { public static InputMethodSubtype[] createAdditionalSubtypesArray(String prefSubtypes) {
if (TextUtils.isEmpty(prefSubtypes)) { if (TextUtils.isEmpty(prefSubtypes)) {
return null; return EMPTY_SUBTYPE_ARRAY;
} }
final String[] prefSubtypeArray = prefSubtypes.split(PREF_SUBTYPE_SEPARATOR); final String[] prefSubtypeArray = prefSubtypes.split(PREF_SUBTYPE_SEPARATOR);
final ArrayList<InputMethodSubtype> subtypesList = final ArrayList<InputMethodSubtype> subtypesList =