summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ioana Alexandru <aioana@google.com> 2025-01-30 13:00:06 +0100
committer Ioana Alexandru <aioana@google.com> 2025-01-30 04:26:04 -0800
commit8803136f920a61b482fd22c336c96249f9b6f71a (patch)
tree5a6f44e1a0e031f297864fe7e64c05a3cbd61178
parent613b67fa52f75c97aa5e9700ed3f82aa03bc8955 (diff)
[Notif redesign] Fix broken expand animation in minimized groups
With the recent change to perform a translation on the expand button for the group header while it's being expanded via dragging, an issue was introduced where minimized group headers would show two expanders overlapping and moving in a weird way on expansion. To fix this, we just need to make sure that we're not applying the translations to the normal group header when we're actually showing the minimized one. Also simplified the calculateDesiredHeader method a little bit. Bug: 378660052 Test: post low priority group and expand it via dragging Flag: android.app.notifications_redesign_templates Change-Id: If33c503a3ed528ea69f79c806d55e8c1a5cd89f0
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java12
1 files changed, 6 insertions, 6 deletions
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 ea397b61fe84..b548b5835e1e 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
@@ -970,7 +970,9 @@ public class NotificationChildrenContainer extends ViewGroup
if (mHeaderViewState != null) {
mHeaderViewState.applyToView(mGroupHeader);
}
- if (notificationsRedesignTemplates()) {
+ // Only apply the special viewState for the header's children if we're not currently showing
+ // the minimized header.
+ if (notificationsRedesignTemplates() && !showingAsLowPriority()) {
if (mTopLineViewState != null) {
mTopLineViewState.applyToView(mGroupHeader.getTopLineView());
}
@@ -1236,14 +1238,12 @@ public class NotificationChildrenContainer extends ViewGroup
}
}
- private ViewGroup calculateDesiredHeader() {
- ViewGroup desiredHeader;
+ private NotificationHeaderView calculateDesiredHeader() {
if (showingAsLowPriority()) {
- desiredHeader = mMinimizedGroupHeader;
+ return mMinimizedGroupHeader;
} else {
- desiredHeader = mGroupHeader;
+ return mGroupHeader;
}
- return desiredHeader;
}
private void startChildAlphaAnimations(boolean toVisible) {