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

Commit 9969559d authored by Selim Cinek's avatar Selim Cinek
Browse files

Removed staggering animation with notification groups

It was more distracting than helping

Change-Id: I5a1110268d23d9f964ad515b6fff16cf9d9a4992
parent 1b5f07d4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -371,9 +371,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    }

    public void startChildAnimation(StackScrollState finalState,
            StackStateAnimator stateAnimator, boolean withDelays, long delay, long duration) {
            StackStateAnimator stateAnimator, long delay, long duration) {
        if (mIsSummaryWithChildren) {
            mChildrenContainer.startAnimationToState(finalState, stateAnimator, withDelays, delay,
            mChildrenContainer.startAnimationToState(finalState, stateAnimator, delay,
                    duration);
        }
    }
+5 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.widget.TextView;
import com.android.systemui.statusbar.CrossFadeHelper;
import com.android.systemui.statusbar.TransformableView;
import com.android.systemui.statusbar.ViewTransformationHelper;
import com.android.systemui.statusbar.stack.StackStateAnimator;

/**
 * Wraps a notification view inflated from a template.
@@ -61,7 +62,8 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp
                                    .translationY((otherStablePosition[1]
                                            + otherState.getTransformedView().getHeight()
                                            - ownPosition[1]) * 0.33f)
                                    .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH)
                                    .setDuration(
                                            StackStateAnimator.ANIMATION_DURATION_STANDARD)
                                    .setInterpolator(TransformState.FAST_OUT_SLOW_IN)
                                    .withEndAction(new Runnable() {
                                        @Override
@@ -99,7 +101,8 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp
                            }
                            mText.animate()
                                    .translationY(0)
                                    .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH)
                                    .setDuration(
                                            StackStateAnimator.ANIMATION_DURATION_STANDARD)
                                    .setInterpolator(TransformState.FAST_OUT_SLOW_IN)
                                    .withEndAction(new Runnable() {
                                        @Override
+3 −2
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.widget.TextView;
import com.android.systemui.R;
import com.android.systemui.statusbar.CrossFadeHelper;
import com.android.systemui.statusbar.ExpandableNotificationRow;
import com.android.systemui.statusbar.stack.StackStateAnimator;

/**
 * A transform state of a view.
@@ -92,7 +93,7 @@ public class TransformState {
        }
        transformedView.animate()
                .setInterpolator(TransformState.FAST_OUT_SLOW_IN)
                .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH)
                .setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD)
                .withEndAction(new Runnable() {
                    @Override
                    public void run() {
@@ -146,7 +147,7 @@ public class TransformState {
        }
        transformedView.animate()
                .setInterpolator(TransformState.FAST_OUT_SLOW_IN)
                .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH)
                .setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD)
                .withEndAction(new Runnable() {
                    @Override
                    public void run() {
+3 −14
Original line number Diff line number Diff line
@@ -403,31 +403,20 @@ public class NotificationChildrenContainer extends ViewGroup {
    }

    public void startAnimationToState(StackScrollState state, StackStateAnimator stateAnimator,
            boolean withDelays, long baseDelay, long duration) {
            long baseDelay, long duration) {
        int childCount = mChildren.size();
        ViewState tmpState = new ViewState();
        int delayIndex = 0;
        int maxAllowChildCount = getMaxAllowedVisibleChildren(true /* likeCollapsed */);
        for (int i = childCount - 1; i >= 0; i--) {
            ExpandableNotificationRow child = mChildren.get(i);
            StackViewState viewState = state.getViewStateForView(child);
            int difference = Math.min(StackStateAnimator.DELAY_EFFECT_MAX_INDEX_DIFFERENCE_CHILDREN,
                    delayIndex);
            long delay = withDelays
                    ? difference * StackStateAnimator.ANIMATION_DELAY_PER_ELEMENT_EXPAND_CHILDREN
                    : 0;
            delay = (long) (delay * (mChildrenExpanded ? 1.0f : 0.5f) + baseDelay);
            stateAnimator.startStackAnimations(child, viewState, state, -1, delay);
            stateAnimator.startStackAnimations(child, viewState, state, -1, baseDelay);

            // layout the divider
            View divider = mDividers.get(i);
            tmpState.initFrom(divider);
            tmpState.yTranslation = viewState.yTranslation - mDividerHeight;
            tmpState.alpha = mChildrenExpanded && viewState.alpha != 0 ? 0.5f : 0;
            stateAnimator.startViewAnimations(divider, tmpState, delay, duration);
            if (i < maxAllowChildCount) {
                delayIndex++;
            }
            stateAnimator.startViewAnimations(divider, tmpState, baseDelay, duration);
        }
        if (mGroupOverflowContainer != null) {
            stateAnimator.startViewAnimations(mGroupOverflowContainer, mGroupOverFlowState,
+1 −1
Original line number Diff line number Diff line
@@ -3124,7 +3124,7 @@ public class NotificationStackScrollLayout extends ViewGroup
                StackStateAnimator.ANIMATION_DURATION_STANDARD,

                // ANIMATION_TYPE_GROUP_EXPANSION_CHANGED
                StackStateAnimator.ANIMATION_DURATION_EXPAND_CLICKED,
                StackStateAnimator.ANIMATION_DURATION_STANDARD,

                // ANIMATION_TYPE_HEADS_UP_APPEAR
                StackStateAnimator.ANIMATION_DURATION_HEADS_UP_APPEAR,
Loading