summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/NotificationManagerService.java
diff options
context:
space:
mode:
authorAndrew Wilson <anwilson@google.com>2013-05-22 09:35:35 -0700
committerAndrew Wilson <anwilson@google.com>2013-05-22 09:35:35 -0700
commit152942be13c422e475ec1e323e2a885bf988cd0a (patch)
treec228aa376d524a028d2112da37a20eeba11684d3 /services/java/com/android/server/NotificationManagerService.java
parent5c11e8ee5463b88907814e3e8716af292f90fb86 (diff)
Compare binder instances when checking if listeners match.
Bug: 9069919 Change-Id: I06130105cb703de35de76ab2fceba3855fa5407a
Diffstat (limited to 'services/java/com/android/server/NotificationManagerService.java')
-rw-r--r--services/java/com/android/server/NotificationManagerService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 4348a81178f3..350b406e1689 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -762,7 +762,8 @@ public class NotificationManagerService extends INotificationManager.Stub
final int N = mListeners.size();
for (int i=N-1; i>=0; i--) {
final NotificationListenerInfo info = mListeners.get(i);
- if (info.listener == listener && info.userid == userid) {
+ if (info.listener.asBinder() == listener.asBinder()
+ && info.userid == userid) {
mListeners.remove(i);
if (info.connection != null) {
mContext.unbindService(info.connection);