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

Commit d0731a1f authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge changes I123a0cb9,Ieeaf0154 into main

* changes:
  Fix NPE in PreparationCoordinator when bundling single notif
  Move beginNewAttachState to PipelineEntry
parents a67e27f5 2f2e2579
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -65,13 +65,4 @@ public abstract class ListEntry extends PipelineEntry {
    @Nullable public PipelineEntry getPreviousParent() {
        return mPreviousAttachState.getParent();
    }

    /**
     * Stores the current attach state into {@link #getPreviousAttachState()}} and then starts a
     * fresh attach state (all entries will be null/default-initialized).
     */
    void beginNewAttachState() {
        mPreviousAttachState.clone(mAttachState);
        mAttachState.reset();
    }
}
+9 −0
Original line number Diff line number Diff line
@@ -101,4 +101,13 @@ public abstract class PipelineEntry {
    public void setBucket(@PriorityBucket int bucket) {
        mBucket = bucket;
    }

    /**
     * Stores the current attach state into {@link #getPreviousAttachState()}} and then starts a
     * fresh attach state (all entries will be null/default-initialized).
     */
    void beginNewAttachState() {
        mPreviousAttachState.clone(mAttachState);
        mAttachState.reset();
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -565,6 +565,11 @@ public class ShadeListBuilder implements Dumpable, PipelineDumpable {
            entry.beginNewAttachState();
        }

        for (BundleEntry be : mIdToBundleEntry.values()) {
            be.beginNewAttachState();
            // TODO(b/399736937) Clear bundle children
            // BundleEntry has not representative summary so we do not need to clear it here.
        }
        mNotifList.clear();
    }

+1 −2
Original line number Diff line number Diff line
@@ -241,8 +241,7 @@ public class PreparationCoordinator implements Coordinator {
                isMemberOfDelayedGroup = shouldWaitForGroupToInflate(parent, now);
                mIsDelayedGroupCache.put(parent, isMemberOfDelayedGroup);
            }

            return !isInflated(entry) || isMemberOfDelayedGroup;
            return !isInflated(entry) || (isMemberOfDelayedGroup != null && isMemberOfDelayedGroup);
        }

        @Override