mOnActivatedListener = onActivatedListener;
}
+ public void reset() {
+ setTintColor(0);
+ setShowingLegacyBackground(false);
+ setBelowSpeedBump(false);
+ }
+
public interface OnActivatedListener {
void onActivated(ActivatableNotificationView view);
void onActivationReset(ActivatableNotificationView view);
hasUserChangedExpansion = row.hasUserChangedExpansion();
userExpanded = row.isUserExpanded();
userLocked = row.isUserLocked();
- row.reset();
+ entry.reset();
if (hasUserChangedExpansion) {
row.setUserExpanded(userExpanded);
}
updateNotifications();
}
- private void addNotificationViews(StatusBarNotification notification, RankingMap ranking) {
- addNotificationViews(createNotificationViews(notification), ranking);
- }
-
/**
* @return The number of notifications we show on Keyguard.
*/
} else {
if (DEBUG) Log.d(TAG, "rebuilding update in place for key: " + key);
oldEntry.notification = notification;
+ final StatusBarIcon ic = new StatusBarIcon(notification.getPackageName(),
+ notification.getUser(),
+ notification.getNotification().icon,
+ notification.getNotification().iconLevel,
+ notification.getNotification().number,
+ notification.getNotification().tickerText);
+ oldEntry.icon.set(ic);
inflateViews(oldEntry, mStackScroller, wasHeadsUp);
updateNotifications();
}
public boolean hasInterrupted() {
return interruption;
}
+
+ /**
+ * Resets the notification entry to be re-used.
+ */
+ public void reset() {
+ // NOTE: Icon needs to be preserved for now.
+ // We should fix this at some point.
+ expanded = null;
+ expandedPublic = null;
+ expandedBig = null;
+ autoRedacted = false;
+ legacy = false;
+ if (row != null) {
+ row.reset();
+ }
+ }
}
private final ArrayList<Entry> mEntries = new ArrayList<Entry>();