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

Commit b8653e30 authored by Yining Liu's avatar Yining Liu Committed by Android (Google) Code Review
Browse files

Merge "Fix Overlapping notifications when the swiping out is canceled" into main

parents 5722cd9a 5fd32337
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ package com.android.systemui;

import static androidx.dynamicanimation.animation.DynamicAnimation.TRANSLATION_X;
import static androidx.dynamicanimation.animation.FloatPropertyCompat.createFloatPropertyCompat;

import static com.android.systemui.classifier.Classifier.NOTIFICATION_DISMISS;
import static com.android.systemui.flags.Flags.SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX;
import static com.android.systemui.statusbar.notification.NotificationUtils.logKey;

import android.animation.Animator;
@@ -482,8 +482,15 @@ public class SwipeHelper implements Gefingerpoken, Dumpable {
                boolean wasRemoved = false;
                if (animView instanceof ExpandableNotificationRow) {
                    ExpandableNotificationRow row = (ExpandableNotificationRow) animView;
                    if (mFeatureFlags.isEnabled(SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX)) {
                        // If the view is already removed from its parent and added as Transient,
                        // we need to clean the transient view upon animation end
                        wasRemoved = row.getTransientContainer() != null
                            || row.getParent() == null || row.isRemoved();
                    } else {
                        wasRemoved = row.isRemoved();
                    }
                }
                if (!mCancelled || wasRemoved) {
                    mCallback.onChildDismissed(animView);
                    resetViewIfSwiping(animView);