summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorChristoph Studer <chstuder@google.com>2014-05-23 13:15:54 +0200
committerChristoph Studer <chstuder@google.com>2014-05-26 16:07:37 +0200
commit5d423844f253951a1d79dabe638aba81a21207bc (patch)
tree070c0619ec417e192f9488b421d979254b2d5afb /services
parent7d7090d66692170b0584a5b9f4fe3e47285ee615 (diff)
downloadframeworks_base-5d423844f253951a1d79dabe638aba81a21207bc.zip
frameworks_base-5d423844f253951a1d79dabe638aba81a21207bc.tar.gz
frameworks_base-5d423844f253951a1d79dabe638aba81a21207bc.tar.bz2
NoMan: Don't unbind system listeners
Listeners registered via INotificationMananger.registerListener() must not be unbound by NoMan because it won't be able to re-bind them later. Bug: 15131411 Change-Id: Ic5088252c86e7c32c522ba1606f123cefde3720d
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/notification/ManagedServices.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java
index b94ea62..1b1fc8b 100644
--- a/services/core/java/com/android/server/notification/ManagedServices.java
+++ b/services/core/java/com/android/server/notification/ManagedServices.java
@@ -259,13 +259,17 @@ abstract public class ManagedServices {
userIds[i]));
}
- ManagedServiceInfo[] toRemove = new ManagedServiceInfo[mServices.size()];
+ ArrayList<ManagedServiceInfo> toRemove = new ArrayList<ManagedServiceInfo>();
final SparseArray<ArrayList<ComponentName>> toAdd
= new SparseArray<ArrayList<ComponentName>>();
synchronized (mMutex) {
- // unbind and remove all existing services
- toRemove = mServices.toArray(toRemove);
+ // Unbind automatically bound services, retain system services.
+ for (ManagedServiceInfo service : mServices) {
+ if (!service.isSystem) {
+ toRemove.add(service);
+ }
+ }
final ArraySet<ComponentName> newEnabled = new ArraySet<ComponentName>();
final ArraySet<String> newPackages = new ArraySet<String>();