Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ public class NotificationData { public View row; // the outer expanded view public View content; // takes the click events and sends the PendingIntent public View expanded; // the inflated RemoteViews public boolean cancelled; } private final ArrayList<Entry> mEntries = new ArrayList<Entry>(); Loading Loading @@ -66,6 +67,7 @@ public class NotificationData { entry.content = content; entry.expanded = expanded; entry.icon = icon; entry.cancelled = false; final int index = chooseIndex(notification.notification.when); mEntries.add(index, entry); return index; Loading packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +12 −3 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks } } View[] makeNotificationView(final StatusBarNotification notification, ViewGroup parent) { View[] makeNotificationView(final IBinder key, final StatusBarNotification notification, ViewGroup parent) { Notification n = notification.notification; RemoteViews remoteViews = n.contentView; if (remoteViews == null) { Loading @@ -731,6 +731,11 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks public void run() { try { mBarService.onNotificationClear(notification.pkg, notification.tag, notification.id); int index = mLatest.findEntry(key); if (index >= 0) { mLatest.getEntryAt(index).cancelled = true; } } catch (RemoteException e) { // Skip it, don't crash. } Loading Loading @@ -780,7 +785,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks parent = mLatestItems; } // Construct the expanded view. final View[] views = makeNotificationView(notification, parent); final View[] views = makeNotificationView(key, notification, parent); if (views == null) { handleNotificationError(key, notification, "Couldn't expand RemoteViews for: " + notification); Loading Loading @@ -821,6 +826,10 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // Remove the icon. ((ViewGroup)entry.icon.getParent()).removeView(entry.icon); if (entry.cancelled && !mLatest.hasClearableItems()) { animateCollapse(); } return entry.notification; } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ public class NotificationData { public View row; // the outer expanded view public View content; // takes the click events and sends the PendingIntent public View expanded; // the inflated RemoteViews public boolean cancelled; } private final ArrayList<Entry> mEntries = new ArrayList<Entry>(); Loading Loading @@ -66,6 +67,7 @@ public class NotificationData { entry.content = content; entry.expanded = expanded; entry.icon = icon; entry.cancelled = false; final int index = chooseIndex(notification.notification.when); mEntries.add(index, entry); return index; Loading
packages/SystemUI/src/com/android/systemui/statusbar/StatusBarService.java +12 −3 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks } } View[] makeNotificationView(final StatusBarNotification notification, ViewGroup parent) { View[] makeNotificationView(final IBinder key, final StatusBarNotification notification, ViewGroup parent) { Notification n = notification.notification; RemoteViews remoteViews = n.contentView; if (remoteViews == null) { Loading @@ -731,6 +731,11 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks public void run() { try { mBarService.onNotificationClear(notification.pkg, notification.tag, notification.id); int index = mLatest.findEntry(key); if (index >= 0) { mLatest.getEntryAt(index).cancelled = true; } } catch (RemoteException e) { // Skip it, don't crash. } Loading Loading @@ -780,7 +785,7 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks parent = mLatestItems; } // Construct the expanded view. final View[] views = makeNotificationView(notification, parent); final View[] views = makeNotificationView(key, notification, parent); if (views == null) { handleNotificationError(key, notification, "Couldn't expand RemoteViews for: " + notification); Loading Loading @@ -821,6 +826,10 @@ public class StatusBarService extends Service implements CommandQueue.Callbacks // Remove the icon. ((ViewGroup)entry.icon.getParent()).removeView(entry.icon); if (entry.cancelled && !mLatest.hasClearableItems()) { animateCollapse(); } return entry.notification; } Loading