diff options
author | Jason Monk <jmonk@google.com> | 2015-11-09 22:36:21 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-11-09 22:36:21 +0000 |
commit | e198f7b84fde2b3ca3f0e0c9195166b06363850e (patch) | |
tree | 71cdb5f4f8d074440d3282c0737bff2d8f46398a | |
parent | 44643bad268fa65d8a5d95055a8a9c2c4bf86fdf (diff) | |
parent | e27cada8c49c8aec2463c352faf5211502b1b372 (diff) | |
download | packages_apps_Settings-e198f7b84fde2b3ca3f0e0c9195166b06363850e.zip packages_apps_Settings-e198f7b84fde2b3ca3f0e0c9195166b06363850e.tar.gz packages_apps_Settings-e198f7b84fde2b3ca3f0e0c9195166b06363850e.tar.bz2 |
Null check queryIntentServices am: a4c9492b50
am: e27cada8c4
* commit 'e27cada8c49c8aec2463c352faf5211502b1b372':
Null check queryIntentServices
-rw-r--r-- | src/com/android/settings/search/DynamicIndexableContentMonitor.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/settings/search/DynamicIndexableContentMonitor.java b/src/com/android/settings/search/DynamicIndexableContentMonitor.java index 12bb6ef..e11f564 100644 --- a/src/com/android/settings/search/DynamicIndexableContentMonitor.java +++ b/src/com/android/settings/search/DynamicIndexableContentMonitor.java @@ -233,7 +233,8 @@ public final class DynamicIndexableContentMonitor extends PackageMonitor impleme private void handlePackageAvailable(String packageName) { if (!mAccessibilityServices.contains(packageName)) { final Intent intent = getAccessibilityServiceIntent(packageName); - if (!mContext.getPackageManager().queryIntentServices(intent, 0).isEmpty()) { + List<?> services = mContext.getPackageManager().queryIntentServices(intent, 0); + if (services != null && !services.isEmpty()) { mAccessibilityServices.add(packageName); Index.getInstance(mContext).updateFromClassNameResource( AccessibilitySettings.class.getName(), false, true); @@ -243,7 +244,8 @@ public final class DynamicIndexableContentMonitor extends PackageMonitor impleme if (mHasFeaturePrinting) { if (!mPrintServices.contains(packageName)) { final Intent intent = getPrintServiceIntent(packageName); - if (!mContext.getPackageManager().queryIntentServices(intent, 0).isEmpty()) { + List<?> services = mContext.getPackageManager().queryIntentServices(intent, 0); + if (services != null && !services.isEmpty()) { mPrintServices.add(packageName); Index.getInstance(mContext).updateFromClassNameResource( PrintSettingsFragment.class.getName(), false, true); @@ -254,7 +256,8 @@ public final class DynamicIndexableContentMonitor extends PackageMonitor impleme if (mHasFeatureIme) { if (!mImeServices.contains(packageName)) { Intent intent = getIMEServiceIntent(packageName); - if (!mContext.getPackageManager().queryIntentServices(intent, 0).isEmpty()) { + List<?> services = mContext.getPackageManager().queryIntentServices(intent, 0); + if (services != null && !services.isEmpty()) { mImeServices.add(packageName); Index.getInstance(mContext).updateFromClassNameResource( InputMethodAndLanguageSettings.class.getName(), false, true); |