From d95569b44b6d2c002cd150f0a15354ff5ec99268 Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Thu, 3 Nov 2022 12:22:51 +0000 Subject: [PATCH] Revert "Revert "Fix notification group dismissal fade animation"" This reverts commit eb145298311d05157f85c4fe50e4b8d5d13a7775. Reason for revert: Reverting the "Fix notification group dismissal fade animation" CL did not cause the test metric to recover. Apparently, another CL caused the metric to increase. Therefore, it should be save to merge this change back in. Bug: 253532643 Test: Manual, i.e. posting a Standard notification and an Inbox notification from the Notify2-RVC App (as well as the Notify2-SC app), then dismissing both notifications together by swiping the group header. Change-Id: Iadfa1db6630bf01ca3a36977c41366af77e4b263 --- .../row/ExpandableNotificationRow.java | 2 +- .../stack/NotificationChildrenContainer.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) 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 9e7717caf69c3..96dc5c8db9efb 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 @@ -1526,7 +1526,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView l.setAlpha(alpha); } if (mChildrenContainer != null) { - mChildrenContainer.setAlpha(alpha); + mChildrenContainer.setContentAlpha(alpha); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java index 0554fb5b3689d..645a02dbda14a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java @@ -494,6 +494,20 @@ public class NotificationChildrenContainer extends ViewGroup return mAttachedChildren; } + /** + * Sets the alpha on the content, while leaving the background of the container itself as is. + * + * @param alpha alpha value to apply to the content + */ + public void setContentAlpha(float alpha) { + for (int i = 0; i < mNotificationHeader.getChildCount(); i++) { + mNotificationHeader.getChildAt(i).setAlpha(alpha); + } + for (ExpandableNotificationRow child : getAttachedChildren()) { + child.setContentAlpha(alpha); + } + } + /** * To be called any time the rows have been updated */