diff options
author | Christoph Studer <chstuder@google.com> | 2014-05-23 13:15:54 +0200 |
---|---|---|
committer | Christoph Studer <chstuder@google.com> | 2014-05-26 16:07:37 +0200 |
commit | 5d423844f253951a1d79dabe638aba81a21207bc (patch) | |
tree | 070c0619ec417e192f9488b421d979254b2d5afb /services | |
parent | 7d7090d66692170b0584a5b9f4fe3e47285ee615 (diff) | |
download | frameworks_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.java | 10 |
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>(); |