Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a08863f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Moves icon management to NotificationRowBinder."

parents c4085a8f 86928bb1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -431,7 +431,6 @@ public class NotificationEntryManager implements
        }

        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 @@ public class NotificationEntryManager implements

        mNotificationData.update(entry, ranking, notification);

        entry.updateIcons(mContext, notification);
        getRowBinder().inflateViews(entry, () -> performRemoveNotification(notification),
                mNotificationData.get(entry.key) != null);

+7 −2
Original line number Diff line number Diff line
@@ -125,17 +125,22 @@ public class NotificationRowBinder {
    /**
     * 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);