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

Commit cd258079 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Set the correct when value for the public view of groups; reset when no longer a group.

Bug: 326348484
Test: atest SystemUITests
Flag: NONE
Change-Id: Ida7330fdb32466edf1eedc376f46deb67ac50758
parent dd8353a6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -849,6 +849,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    public void setNotificationGroupWhen(long whenMillis) {
        if (mIsSummaryWithChildren) {
            mChildrenContainer.setNotificationGroupWhen(whenMillis);
            mPublicLayout.setNotificationWhen(whenMillis);
        } else {
            Log.w(TAG, "setNotificationGroupWhen( whenMillis: " + whenMillis + ")"
                    + " mIsSummaryWithChildren: false"
@@ -2704,6 +2705,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    private void onAttachedChildrenCountChanged() {
        final boolean wasSummary = mIsSummaryWithChildren;
        mIsSummaryWithChildren = mChildrenContainer != null
                && mChildrenContainer.getNotificationChildCount() > 0;
        if (mIsSummaryWithChildren) {
@@ -2714,6 +2716,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                        isConversation());
            }
        }
        if (!mIsSummaryWithChildren && wasSummary) {
            // Reset the 'when' once the row stops being a summary
            mPublicLayout.setNotificationWhen(mEntry.getSbn().getNotification().when);
        }
        getShowingLayout().updateBackgroundColor(false /* animate */);
        mPrivateLayout.updateExpandButtons(isExpandable());
        updateChildrenAppearance();
+8 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.systemui.statusbar.notification.collection.render.GroupMember
import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier;
import com.android.systemui.statusbar.notification.row.shared.AsyncHybridViewInflation;
import com.android.systemui.statusbar.notification.row.wrapper.NotificationCustomViewWrapper;
import com.android.systemui.statusbar.notification.row.wrapper.NotificationHeaderViewWrapper;
import com.android.systemui.statusbar.notification.row.wrapper.NotificationViewWrapper;
import com.android.systemui.statusbar.policy.InflatedSmartReplyState;
import com.android.systemui.statusbar.policy.InflatedSmartReplyViewHolder;
@@ -2314,6 +2315,13 @@ public class NotificationContentView extends FrameLayout implements Notification
        return false;
    }

    public void setNotificationWhen(long whenMillis) {
        NotificationViewWrapper wrapper = getNotificationViewWrapper();
        if (wrapper instanceof NotificationHeaderViewWrapper headerViewWrapper) {
            headerViewWrapper.setNotificationWhen(whenMillis);
        }
    }

    private static class RemoteInputViewData {
        @Nullable RemoteInputView mView;
        @Nullable RemoteInputViewController mController;