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

Commit 330e3414 authored by Winson Chung's avatar Winson Chung Committed by Android Git Automerger
Browse files

am f5bcd887: Merge "Refactoring filter animation logic."

* commit 'f5bcd887':
  Refactoring filter animation logic.
parents 02b9b981 f5bcd887
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -24,9 +24,6 @@ public class BakedBezierInterpolator implements TimeInterpolator {
     * P3 (1.0, 1.0)
     *
     * Values sampled with x at regular intervals between 0 and 1.
     *
     * These values were generated using:
     *   ./scripts/bezier_interpolator_values_gen.py 0.4 0.2
     */
    private static final float[] VALUES = new float[] {
        0.0f, 0.0002f, 0.0009f, 0.0019f, 0.0036f, 0.0059f, 0.0086f, 0.0119f, 0.0157f, 0.0209f,
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ public class RecentsConfiguration {
                res.getInteger(R.integer.recents_animate_task_bar_enter_duration);
    }

    /** Updates the system insets */
    public void updateSystemInsets(Rect insets) {
        systemInsets.set(insets);
    }
+2 −2
Original line number Diff line number Diff line
@@ -134,9 +134,9 @@ public class TaskStack {
        /* Notifies when a task has been removed from the stack */
        public void onStackTaskRemoved(TaskStack stack, Task t);
        /** Notifies when the stack was filtered */
        public void onStackFiltered(TaskStack newStack, ArrayList<Task> curStack, Task t);
        public void onStackFiltered(TaskStack newStack, ArrayList<Task> curTasks, Task t);
        /** Notifies when the stack was un-filtered */
        public void onStackUnfiltered(TaskStack newStack, ArrayList<Task> curStack);
        public void onStackUnfiltered(TaskStack newStack, ArrayList<Task> curTasks);
    }

    Context mContext;
+152 −232

File changed.

Preview size limit exceeded, changes collapsed.

+8 −20
Original line number Diff line number Diff line
@@ -16,21 +16,13 @@

package com.android.systemui.recents.views;

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Outline;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import com.android.systemui.R;
import com.android.systemui.recents.BakedBezierInterpolator;
import com.android.systemui.recents.Constants;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.Utilities;
import com.android.systemui.recents.model.Task;
@@ -115,18 +107,6 @@ public class TaskView extends FrameLayout implements View.OnClickListener, Task.
        }
    }

    /** Returns an animator to animate this task to the specified transform */
    Animator getAnimatorToTaskTransform(TaskViewTransform toTransform) {
        AnimatorSet anims = new AnimatorSet();
        anims.playTogether(
                ObjectAnimator.ofFloat(this, "translationY", toTransform.translationY),
                ObjectAnimator.ofFloat(this, "scaleX", toTransform.scale),
                ObjectAnimator.ofFloat(this, "scaleY", toTransform.scale),
                ObjectAnimator.ofFloat(this, "alpha", toTransform.alpha)
        );
        return anims;
    }

    /** Resets this view's properties */
    void resetViewProperties() {
        setTranslationX(0f);
@@ -136,12 +116,20 @@ public class TaskView extends FrameLayout implements View.OnClickListener, Task.
        setAlpha(1f);
    }

    /**
     * When we are un/filtering, this method will set up the transform that we are animating to,
     * in order to hide the task.
     */
    void prepareTaskTransformForFilterTaskHidden(TaskViewTransform toTransform) {
        // Fade the view out and slide it away
        toTransform.alpha = 0f;
        toTransform.translationY += 200;
    }

    /**
     * When we are un/filtering, this method will setup the transform that we are animating from,
     * in order to show the task.
     */
    void prepareTaskTransformForFilterTaskVisible(TaskViewTransform fromTransform) {
        // Fade the view in
        fromTransform.alpha = 0f;