OSDN Git Service

Merge "Rebind managed services more" into nyc-dev
authorJulia Reynolds <juliacr@google.com>
Wed, 16 Mar 2016 14:08:19 +0000 (14:08 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 16 Mar 2016 14:08:20 +0000 (14:08 +0000)
1  2 
services/core/java/com/android/server/notification/NotificationManagerService.java

@@@ -948,24 -944,10 +949,12 @@@ public class NotificationManagerServic
          // This is a MangedServices object that keeps track of the ranker.
          mRankerServices = new NotificationRankers();
          // Find the updatable ranker and register it.
-         Set<ComponentName> rankerComponents = mRankerServices.queryPackageForServices(
-                 mRankerServicePackageName, UserHandle.USER_SYSTEM, null);
-         Iterator<ComponentName> iterator = rankerComponents.iterator();
-         if (iterator.hasNext()) {
-             ComponentName rankerComponent = iterator.next();
-             if (iterator.hasNext()) {
-                 Slog.e(TAG, "found multiple ranker services:" + rankerComponents);
-             } else {
-                 mRankerServices.registerSystemService(rankerComponent, UserHandle.USER_SYSTEM);
-             }
-         } else {
-             Slog.w(TAG, "could not start ranker service: none found");
-         }
+         mRankerServices.registerRanker();
  
          mStatusBar = getLocalService(StatusBarManagerInternal.class);
 -        mStatusBar.setNotificationDelegate(mNotificationDelegate);
 +        if (mStatusBar != null) {
 +            mStatusBar.setNotificationDelegate(mNotificationDelegate);
 +        }
  
          final LightsManager lights = getLocalService(LightsManager.class);
          mNotificationLight = lights.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS);