diff options
author | Satoshi Kataoka <satok@google.com> | 2013-04-17 18:59:33 +0900 |
---|---|---|
committer | Satoshi Kataoka <satok@google.com> | 2013-04-17 18:59:33 +0900 |
commit | 7987a3172b0502ea70a26d80e7cd16ca7e460035 (patch) | |
tree | f1a3ae6006d75c20668f76900b3f4e24b603e9c0 /services/java/com/android/server/InputMethodManagerService.java | |
parent | 83d90b200babe43d5e91cef1bbcf0b224f48e16d (diff) |
Fix possible NPE
Bug: 8517083
Change-Id: Iea6bdcb0e39ee951b7f90f41cd3350bd1c7c5f71
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index a28c387c66f6..f872cc3b59a8 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -1595,7 +1595,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub ApplicationInfo ai = mIPackageManager.getApplicationInfo(imm.getPackageName(), PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS, mSettings.getCurrentUserId()); - if (ai.enabledSetting + if (ai != null && ai.enabledSetting == PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED) { mIPackageManager.setApplicationEnabledSetting(imm.getPackageName(), PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, |