am 6b8c7e7c: am 7e554395: Merge "Settings crashing if there are no installed accessibility services." into jb-mr2-dev

* commit '6b8c7e7c33fbf7d6425baf7003222b7603ac8ef5':
  Settings crashing if there are no installed accessibility services.
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index bd802cf..6eb8e67 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -579,11 +579,16 @@
     }
 
     private void loadInstalledServices() {
+        Set<ComponentName> installedServices = sInstalledServices;
+        installedServices.clear();
+
         List<AccessibilityServiceInfo> installedServiceInfos =
                 AccessibilityManager.getInstance(getActivity())
                         .getInstalledAccessibilityServiceList();
-        Set<ComponentName> installedServices = sInstalledServices;
-        installedServices.clear();
+        if (installedServiceInfos == null) {
+            return;
+        }
+
         final int installedServiceInfoCount = installedServiceInfos.size();
         for (int i = 0; i < installedServiceInfoCount; i++) {
             ResolveInfo resolveInfo = installedServiceInfos.get(i).getResolveInfo();