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

Commit 14940bd7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I60bc5899,I97696070 into rvc-dev am: ed1adb19

Change-Id: I937d1278e18118e953a35df5fc7fe54c0ea16dd9
parents f301697e ed1adb19
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi

    private void handleSummaryDismissalInterception(NotificationEntry summary) {
        // current children in the row:
        final List<NotificationEntry> children = summary.getChildren();
        final List<NotificationEntry> children = summary.getAttachedNotifChildren();
        if (children != null) {
            for (int i = 0; i < children.size(); i++) {
                NotificationEntry child = children.get(i);
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ public class NotificationHeaderUtil {
    }

    public void updateChildrenHeaderAppearance() {
        List<ExpandableNotificationRow> notificationChildren = mRow.getNotificationChildren();
        List<ExpandableNotificationRow> notificationChildren = mRow.getAttachedChildren();
        if (notificationChildren == null) {
            return;
        }
+12 −9
Original line number Diff line number Diff line
@@ -307,17 +307,20 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle
            }

            ExpandableNotificationRow parent = (ExpandableNotificationRow) view;
            List<ExpandableNotificationRow> children = parent.getNotificationChildren();
            List<ExpandableNotificationRow> children = parent.getAttachedChildren();
            List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry());

            for (int childIndex = 0; orderedChildren != null && childIndex < orderedChildren.size();
                    childIndex++) {
            if (orderedChildren == null) {
                // Not a group
                continue;
            }
            parent.setUntruncatedChildCount(orderedChildren.size());
            for (int childIndex = 0; childIndex < orderedChildren.size(); childIndex++) {
                ExpandableNotificationRow childView = orderedChildren.get(childIndex).getRow();
                if (children == null || !children.contains(childView)) {
                    if (childView.getParent() != null) {
                        Log.wtf(TAG, "trying to add a notification child that already has " +
                                "a parent. class:" + childView.getParent().getClass() +
                                "\n child: " + childView);
                        Log.wtf(TAG, "trying to add a notification child that already has "
                                + "a parent. class:" + childView.getParent().getClass()
                                + "\n child: " + childView);
                        // This shouldn't happen. We can recover by removing it though.
                        ((ViewGroup) childView.getParent()).removeView(childView);
                    }
@@ -349,7 +352,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle
            }

            ExpandableNotificationRow parent = (ExpandableNotificationRow) view;
            List<ExpandableNotificationRow> children = parent.getNotificationChildren();
            List<ExpandableNotificationRow> children = parent.getAttachedChildren();
            List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry());

            if (children != null) {
@@ -454,7 +457,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle
            }
            if (row.isSummaryWithChildren()) {
                List<ExpandableNotificationRow> notificationChildren =
                        row.getNotificationChildren();
                        row.getAttachedChildren();
                int size = notificationChildren.size();
                for (int i = size - 1; i >= 0; i--) {
                    stack.push(notificationChildren.get(i));
+1 −1
Original line number Diff line number Diff line
@@ -515,7 +515,7 @@ public class NotificationEntryManager implements
                // always cancelled. We only remove them if they were dismissed by the user.
                return;
            }
            List<NotificationEntry> childEntries = entry.getChildren();
            List<NotificationEntry> childEntries = entry.getAttachedNotifChildren();
            if (childEntries == null) {
                return;
            }
+20 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;

import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.statusbar.notification.collection.coordinator.PreparationCoordinator;

import java.util.ArrayList;
import java.util.Collections;
@@ -36,6 +37,7 @@ public class GroupEntry extends ListEntry {

    private final List<NotificationEntry> mUnmodifiableChildren =
            Collections.unmodifiableList(mChildren);
    private int mUntruncatedChildCount;

    @VisibleForTesting
    public GroupEntry(String key) {
@@ -62,6 +64,24 @@ public class GroupEntry extends ListEntry {
        mSummary = summary;
    }

    /**
     * @see #getUntruncatedChildCount()
     */
    public void setUntruncatedChildCount(int childCount) {
        mUntruncatedChildCount = childCount;
    }

    /**
     * Get the untruncated number of children from the data model, including those that will not
     * have views bound. This includes children that {@link PreparationCoordinator} will filter out
     * entirely when they are beyond the last visible child.
     *
     * TODO: This should move to some shared class between the model and view hierarchy
     */
    public int getUntruncatedChildCount() {
        return mUntruncatedChildCount;
    }

    void clearChildren() {
        mChildren.clear();
    }
Loading