Merge "Moves icon management to NotificationRowBinder."
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
index 52b84de..2d31650 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
@@ -431,7 +431,6 @@
}
Dependency.get(LeakDetector.class).trackInstance(entry);
- entry.createIcons(mContext, sbn);
// Construct the expanded view.
getRowBinder().inflateViews(entry, () -> performRemoveNotification(sbn),
mNotificationData.get(entry.key) != null);
@@ -508,7 +507,6 @@
mNotificationData.update(entry, ranking, notification);
- entry.updateIcons(mContext, notification);
getRowBinder().inflateViews(entry, () -> performRemoveNotification(notification),
mNotificationData.get(entry.key) != null);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationRowBinder.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationRowBinder.java
index 0bde99b..058efca 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationRowBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationRowBinder.java
@@ -125,17 +125,22 @@
/**
* Inflates the views for the given entry (possibly asynchronously).
*/
- public void inflateViews(NotificationData.Entry entry, Runnable onDismissRunnable,
- boolean isUpdate) {
+ public void inflateViews(
+ NotificationData.Entry entry,
+ Runnable onDismissRunnable,
+ boolean isUpdate)
+ throws InflationException {
ViewGroup parent = mListContainer.getViewParentForNotification(entry);
PackageManager pmUser = StatusBar.getPackageManagerForUser(mContext,
entry.notification.getUser().getIdentifier());
final StatusBarNotification sbn = entry.notification;
if (entry.rowExists()) {
+ entry.updateIcons(mContext, sbn);
entry.reset();
updateNotification(entry, pmUser, sbn, entry.getRow(), isUpdate);
} else {
+ entry.createIcons(mContext, sbn);
new RowInflaterTask().inflate(mContext, parent, entry,
row -> {
bindRow(entry, pmUser, sbn, row, onDismissRunnable);