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

Commit f529ec2b authored by Ned Burns's avatar Ned Burns
Browse files

Remove unused isUpdate argument in RowBinder

No longer necessary due to VisualStabilityManager changes.

Test: atest, manual
Change-Id: I0bd67c64b62cbe15a6e826d184fed20d9d6e64df
parent 6b19b089
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -345,8 +345,7 @@ public class NotificationEntryManager implements


        Dependency.get(LeakDetector.class).trackInstance(entry);
        Dependency.get(LeakDetector.class).trackInstance(entry);
        // Construct the expanded view.
        // Construct the expanded view.
        getRowBinder().inflateViews(entry, () -> performRemoveNotification(notification),
        getRowBinder().inflateViews(entry, () -> performRemoveNotification(notification));
                mNotificationData.get(entry.key) != null);


        abortExistingInflation(key);
        abortExistingInflation(key);


@@ -387,8 +386,7 @@ public class NotificationEntryManager implements
            listener.onPreEntryUpdated(entry);
            listener.onPreEntryUpdated(entry);
        }
        }


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


        if (DEBUG) {
        if (DEBUG) {
@@ -446,8 +444,7 @@ public class NotificationEntryManager implements
                    entry,
                    entry,
                    oldImportances.get(entry.key),
                    oldImportances.get(entry.key),
                    oldAdjustments.get(entry.key),
                    oldAdjustments.get(entry.key),
                    NotificationUiAdjustment.extractFromNotificationEntry(entry),
                    NotificationUiAdjustment.extractFromNotificationEntry(entry));
                    mNotificationData.get(entry.key) != null);
        }
        }


        updateNotifications();
        updateNotifications();
+6 −9
Original line number Original line Diff line number Diff line
@@ -124,8 +124,7 @@ public class NotificationRowBinder {
     */
     */
    public void inflateViews(
    public void inflateViews(
            NotificationEntry entry,
            NotificationEntry entry,
            Runnable onDismissRunnable,
            Runnable onDismissRunnable)
            boolean isUpdate)
            throws InflationException {
            throws InflationException {
        ViewGroup parent = mListContainer.getViewParentForNotification(entry);
        ViewGroup parent = mListContainer.getViewParentForNotification(entry);
        PackageManager pmUser = StatusBar.getPackageManagerForUser(mContext,
        PackageManager pmUser = StatusBar.getPackageManagerForUser(mContext,
@@ -135,13 +134,13 @@ public class NotificationRowBinder {
        if (entry.rowExists()) {
        if (entry.rowExists()) {
            entry.updateIcons(mContext, sbn);
            entry.updateIcons(mContext, sbn);
            entry.reset();
            entry.reset();
            updateNotification(entry, pmUser, sbn, entry.getRow(), isUpdate);
            updateNotification(entry, pmUser, sbn, entry.getRow());
        } else {
        } else {
            entry.createIcons(mContext, sbn);
            entry.createIcons(mContext, sbn);
            new RowInflaterTask().inflate(mContext, parent, entry,
            new RowInflaterTask().inflate(mContext, parent, entry,
                    row -> {
                    row -> {
                        bindRow(entry, pmUser, sbn, row, onDismissRunnable);
                        bindRow(entry, pmUser, sbn, row, onDismissRunnable);
                        updateNotification(entry, pmUser, sbn, row, isUpdate);
                        updateNotification(entry, pmUser, sbn, row);
                    });
                    });
        }
        }
    }
    }
@@ -197,15 +196,14 @@ public class NotificationRowBinder {
            NotificationEntry entry,
            NotificationEntry entry,
            @Nullable Integer oldImportance,
            @Nullable Integer oldImportance,
            NotificationUiAdjustment oldAdjustment,
            NotificationUiAdjustment oldAdjustment,
            NotificationUiAdjustment newAdjustment,
            NotificationUiAdjustment newAdjustment) {
            boolean isUpdate) {
        if (NotificationUiAdjustment.needReinflate(oldAdjustment, newAdjustment)) {
        if (NotificationUiAdjustment.needReinflate(oldAdjustment, newAdjustment)) {
            if (entry.rowExists()) {
            if (entry.rowExists()) {
                entry.reset();
                entry.reset();
                PackageManager pmUser = StatusBar.getPackageManagerForUser(
                PackageManager pmUser = StatusBar.getPackageManagerForUser(
                        mContext,
                        mContext,
                        entry.notification.getUser().getIdentifier());
                        entry.notification.getUser().getIdentifier());
                updateNotification(entry, pmUser, entry.notification, entry.getRow(), isUpdate);
                updateNotification(entry, pmUser, entry.notification, entry.getRow());
            } else {
            } else {
                // Once the RowInflaterTask is done, it will pick up the updated entry, so
                // Once the RowInflaterTask is done, it will pick up the updated entry, so
                // no-op here.
                // no-op here.
@@ -224,8 +222,7 @@ public class NotificationRowBinder {
            NotificationEntry entry,
            NotificationEntry entry,
            PackageManager pmUser,
            PackageManager pmUser,
            StatusBarNotification sbn,
            StatusBarNotification sbn,
            ExpandableNotificationRow row,
            ExpandableNotificationRow row) {
            boolean isUpdate) {
        row.setIsLowPriority(entry.ambient);
        row.setIsLowPriority(entry.ambient);
        // bind the click event to the content area
        // bind the click event to the content area
        checkNotNull(mNotificationClicker).register(row, sbn);
        checkNotNull(mNotificationClicker).register(row, sbn);