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

Commit b8f6a77f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed an issue where the footerview and others would fly over the...

Merge "Fixed an issue where the footerview and others would fly over the screen" into sc-dev am: 6e76e995 am: c8deb1fd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14733697

Change-Id: I83c0e9aacdb4afdebc62942e896e4d56df7bf934
parents ff57bf6a c8deb1fd
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import com.android.systemui.statusbar.StatusBarIconView;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;

import java.util.ArrayList;
import java.util.HashSet;
@@ -187,11 +188,17 @@ public class StackStateAnimator {

    private void adaptDurationWhenGoingToFullShade(ExpandableView child,
            ExpandableViewState viewState, boolean wasAdded, int animationStaggerCount) {
        if (wasAdded && mAnimationFilter.hasGoToFullShadeEvent) {
            child.setTranslationY(child.getTranslationY() + mGoToFullShadeAppearingTranslation);
        boolean isDecorView = child instanceof StackScrollerDecorView;
        boolean needsAdjustment = wasAdded || isDecorView;
        if (needsAdjustment && mAnimationFilter.hasGoToFullShadeEvent) {
            int startOffset = 0;
            if (!isDecorView) {
                startOffset = mGoToFullShadeAppearingTranslation;
                float longerDurationFactor = (float) Math.pow(animationStaggerCount, 0.7f);
            mAnimationProperties.duration = ANIMATION_DURATION_APPEAR_DISAPPEAR + 50 +
                    (long) (100 * longerDurationFactor);
                mAnimationProperties.duration = ANIMATION_DURATION_APPEAR_DISAPPEAR + 50
                        + (long) (100 * longerDurationFactor);
            }
            child.setTranslationY(viewState.yTranslation + startOffset);
        }
    }