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

Commit 003a65a7 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Fixed the clear all animation on the locked shade" into oc-dr1-dev

am: 890c4304

Change-Id: Id19480f5051b3e96b2fea0e768af5fbaf3d746a8
parents 9208057d 890c4304
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -2589,9 +2589,6 @@ public class NotificationStackScrollLayout extends ViewGroup
        }
        updateAnimationState(false, child);

        // Make sure the clipRect we might have set is removed
        expandableView.setClipTopAmount(0);

        focusNextViewIfFocused(child);
    }

@@ -3038,10 +3035,6 @@ public class NotificationStackScrollLayout extends ViewGroup
    private void generateChildRemovalEvents() {
        for (View child : mChildrenToRemoveAnimated) {
            boolean childWasSwipedOut = mSwipedOutViews.contains(child);
            int animationType = childWasSwipedOut
                    ? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT
                    : AnimationEvent.ANIMATION_TYPE_REMOVE;
            AnimationEvent event = new AnimationEvent(child, animationType);

            // we need to know the view after this one
            float removedTranslation = child.getTranslationY();
@@ -3052,7 +3045,16 @@ public class NotificationStackScrollLayout extends ViewGroup
                    removedTranslation = row.getTranslationWhenRemoved();
                    ignoreChildren = false;
                }
                childWasSwipedOut |= Math.abs(row.getTranslation()) == row.getWidth();
            }
            if (!childWasSwipedOut) {
                Rect clipBounds = child.getClipBounds();
                childWasSwipedOut = clipBounds.height() == 0;
            }
            int animationType = childWasSwipedOut
                    ? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT
                    : AnimationEvent.ANIMATION_TYPE_REMOVE;
            AnimationEvent event = new AnimationEvent(child, animationType);
            event.viewAfterChangingView = getFirstChildBelowTranlsationY(removedTranslation,
                    ignoreChildren);
            mAnimationEvents.add(event);