diff options
author | Christoph Studer <chstuder@google.com> | 2014-05-28 12:10:34 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-28 12:10:34 +0000 |
commit | 19a81a616f3b70510e557caaeaf3cae4ec1356ad (patch) | |
tree | 994767313eef51e220c6ce3cfc710b6c3e1b4494 /services | |
parent | d3ee3ca90cc5ca073dfc6aa401f5dcaa6e4e34fd (diff) | |
parent | 5d423844f253951a1d79dabe638aba81a21207bc (diff) | |
download | frameworks_base-19a81a616f3b70510e557caaeaf3cae4ec1356ad.zip frameworks_base-19a81a616f3b70510e557caaeaf3cae4ec1356ad.tar.gz frameworks_base-19a81a616f3b70510e557caaeaf3cae4ec1356ad.tar.bz2 |
Merge "NoMan: Don't unbind system listeners" into lmp-preview-dev
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>(); |