diff options
| author | 2025-02-28 14:15:24 +0000 | |
|---|---|---|
| committer | 2025-03-03 03:55:13 -0800 | |
| commit | 1901510f309cb160a946dc60fc06547f937a7701 (patch) | |
| tree | 84ebfda7dd41c4395a3adfeb7198d375fc02b42c | |
| parent | 5a532c10b56831a3c0750213bef09a2951e2d760 (diff) | |
Removed Notification Delays when adding / removing notifications
This leads to nicer transitions with physics rather than wobbling.
Outstanding (regardless of the physics flag or this change):
Fix overlapping notifications with row transparency.
Bug: 393581344
Test: manual
Flag: com.android.systemui.physical_notification_movement
Change-Id: I455f3b10fa091776275391e4cef9a5a1de309115
2 files changed, 48 insertions, 20 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 1a17b8efb4ae..f70d57653ac0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -6469,30 +6469,50 @@ public class NotificationStackScrollLayout static AnimationFilter[] FILTERS = new AnimationFilter[]{ // ANIMATION_TYPE_ADD - new AnimationFilter() - .animateAlpha() - .animateHeight() - .animateTopInset() - .animateY() - .animateZ() - .hasDelays(), + physicalNotificationMovement() + ? new AnimationFilter() + .animateAlpha() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + : new AnimationFilter() + .animateAlpha() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + .hasDelays(), // ANIMATION_TYPE_REMOVE - new AnimationFilter() - .animateAlpha() - .animateHeight() - .animateTopInset() - .animateY() - .animateZ() - .hasDelays(), + physicalNotificationMovement() + ? new AnimationFilter() + .animateAlpha() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + : new AnimationFilter() + .animateAlpha() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + .hasDelays(), // ANIMATION_TYPE_REMOVE_SWIPED_OUT - new AnimationFilter() - .animateHeight() - .animateTopInset() - .animateY() - .animateZ() - .hasDelays(), + physicalNotificationMovement() + ? new AnimationFilter() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + : new AnimationFilter() + .animateHeight() + .animateTopInset() + .animateY() + .animateZ() + .hasDelays(), // ANIMATION_TYPE_TOP_PADDING_CHANGED new AnimationFilter() diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java index 19abfa8140df..efbcaed73b62 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java @@ -289,6 +289,10 @@ public class StackStateAnimator { long delayPerElement = ANIMATION_DELAY_PER_ELEMENT_INTERRUPTING; switch (event.animationType) { case NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_ADD: { + if (physicalNotificationMovement()) { + // We don't want any delays when adding anymore + continue; + } int ownIndex = viewState.notGoneIndex; int changingIndex = ((ExpandableView) (event.mChangingView)).getViewState().notGoneIndex; @@ -302,6 +306,10 @@ public class StackStateAnimator { case NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT: delayPerElement = ANIMATION_DELAY_PER_ELEMENT_MANUAL; case NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE: { + if (physicalNotificationMovement()) { + // We don't want any delays when removing anymore + continue; + } int ownIndex = viewState.notGoneIndex; boolean noNextView = event.viewAfterChangingView == null; ExpandableView viewAfterChangingView = noNextView |