diff options
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index d828ad70f5c4..decb244947ff 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -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(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java index 402ea51bebb6..374248252d1f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java @@ -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; |