From 66b4c5bb36f57a9d83bb7f34288235b82f9be407 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Sun, 23 May 2010 15:39:40 -0400 Subject: [PATCH] Implement removeNotification. Change-Id: I58b999901b45b4dce6d3af3a7701e0c9ad2b77df --- .../statusbar/phone/NotificationData.java | 18 +++++++++++++-- .../phone/PhoneStatusBarService.java | 22 ++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/NotificationData.java b/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/NotificationData.java index ae71bda67f366..5c7a90cc9492b 100644 --- a/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/NotificationData.java +++ b/packages/StatusBarPhone/src/com/android/policy/statusbar/phone/NotificationData.java @@ -30,8 +30,8 @@ public class NotificationData { public static final class Entry { public IBinder key; public StatusBarNotification notification; - public StatusBarIconView icon; public View expanded; + public StatusBarIconView icon; } private final ArrayList mEntries = new ArrayList(); @@ -43,16 +43,30 @@ public class NotificationData { return mEntries.get(index); } - public int add(IBinder key, StatusBarNotification notification, View expanded) { + public int add(IBinder key, StatusBarNotification notification, View expanded, + StatusBarIconView icon) { Entry entry = new Entry(); entry.key = key; entry.notification = notification; entry.expanded = expanded; + entry.icon = icon; final int index = chooseIndex(notification.notification.when); mEntries.add(index, entry); return index; } + public Entry remove(IBinder key) { + final int N = mEntries.size(); + for (int i=0; i