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

Commit 661a3d1c authored by Juan Sebastian Martinez's avatar Juan Sebastian Martinez
Browse files

Avoid clipping when a notification is translating.

Clipping may occur if a notification is being translated quickly by a
gesture or by a magnetic animation when the notification is inside a
notification group. In this change, the proposal is to invalidate the
NotificationChildrenContainer when translating an
ExpandableNotificationRow to make sure that the latest translations are
considered in the clipping path.

Test: manual. Verified clipping does not happen when swiping a
  magnetic notification and when re-attaching a notification.
Flag: com.android.systemui.magnetic_notification_swipes
Bug: 408059305

Change-Id: I58e7c2b17d814721918260667a7ddf0318721cde
parent 4ad9d3df
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2805,6 +2805,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        if (mMenuRow != null && mMenuRow.getMenuView() != null) {
            mMenuRow.onParentTranslationUpdate(translationX);
        }
        // Clipping occurs for children of a NotificationChildrenContainer every time the container
        // needs to draw a child (see drawChild of the container class). Thus, we invalidate the
        // container so that the clip path used to clip the children can access the latest
        // translation of this child.
        if (getParent() instanceof NotificationChildrenContainer childrenContainer) {
            childrenContainer.invalidate();
        }
    }

    @Override