Fix a null pointer exception when disabledSystemIMEs is null.
Bug: 3298244 Change-Id: Ifb3349def052bd50633b0cfe04e5636e22115245
This commit is contained in:
@@ -138,6 +138,9 @@ public class InputMethodAndSubtypeUtil {
|
|||||||
HashSet<String> set = new HashSet<String>();
|
HashSet<String> set = new HashSet<String>();
|
||||||
String disabledIMEsStr = Settings.Secure.getString(
|
String disabledIMEsStr = Settings.Secure.getString(
|
||||||
resolver, Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS);
|
resolver, Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS);
|
||||||
|
if (TextUtils.isEmpty(disabledIMEsStr)) {
|
||||||
|
return set;
|
||||||
|
}
|
||||||
sStringInputMethodSplitter.setString(disabledIMEsStr);
|
sStringInputMethodSplitter.setString(disabledIMEsStr);
|
||||||
while(sStringInputMethodSplitter.hasNext()) {
|
while(sStringInputMethodSplitter.hasNext()) {
|
||||||
set.add(sStringInputMethodSplitter.next());
|
set.add(sStringInputMethodSplitter.next());
|
||||||
|
Reference in New Issue
Block a user