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

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

Merge "Forcing no animations to be played if swiping fast" into oc-dev am: b4f3e430

am: ffb1bdb7

Change-Id: I3138386d7a2d85898e4e1b2310801522d0fad539
parents b9b9bdda ffb1bdb7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -356,7 +356,8 @@ public class NotificationShelf extends ActivatableNotificationView implements
        }
        float clampedAmount = iconTransitionAmount > 0.5f ? 1.0f : 0.0f;
        if (clampedAmount == fullTransitionAmount) {
            iconState.useFullTransitionAmount = scrollingFast || expandingAnimated
            iconState.noAnimations = scrollingFast || expandingAnimated;
            iconState.useFullTransitionAmount = iconState.noAnimations
                || (!ICON_ANMATIONS_WHILE_SCROLLING && fullTransitionAmount == 0.0f && scrolling);
            iconState.useLinearTransitionAmount = !ICON_ANMATIONS_WHILE_SCROLLING
                    && fullTransitionAmount == 0.0f && !mAmbientState.isExpansionChanging();
@@ -367,6 +368,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
                && !ViewState.isAnimatingY(icon))) {
            iconState.cancelAnimations(icon);
            iconState.useFullTransitionAmount = true;
            iconState.noAnimations = true;
        }
        float transitionAmount;
        if (isLastChild || !USE_ANIMATIONS_WHEN_OPENING || iconState.useFullTransitionAmount
+3 −1
Original line number Diff line number Diff line
@@ -466,6 +466,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
        public boolean useLinearTransitionAmount;
        public boolean translateContent;
        public int iconColor = StatusBarIconView.NO_COLOR;
        public boolean noAnimations;

        @Override
        public void applyToView(View view) {
@@ -473,7 +474,8 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
                StatusBarIconView icon = (StatusBarIconView) view;
                boolean animate = false;
                AnimationProperties animationProperties = null;
                boolean animationsAllowed = mAnimationsEnabled && !mDisallowNextAnimation;
                boolean animationsAllowed = mAnimationsEnabled && !mDisallowNextAnimation
                        && !noAnimations;
                if (animationsAllowed) {
                    if (justAdded) {
                        super.applyToView(icon);