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

Commit b4f4dc4e authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Refactoring and unifying TaskView animations."

parents 3b8e5a1c f24f2169
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@
    <integer name="recents_nav_bar_scrim_enter_duration">400</integer>

    <!-- The animation duration for animating the removal of a task view. -->
    <integer name="recents_animate_task_view_remove_duration">250</integer>
    <integer name="recents_animate_task_view_remove_duration">175</integer>

    <!-- The animation duration for scrolling the stack to a particular item. -->
    <integer name="recents_animate_task_stack_scroll_duration">200</integer>
+0 −1
Original line number Diff line number Diff line
@@ -28,5 +28,4 @@ public class DismissRecentsToHomeAnimationStarted extends EventBus.AnimatedEvent
    public DismissRecentsToHomeAnimationStarted(boolean animated) {
        this.animated = animated;
    }

}
+9 −7
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.systemui.recents.misc;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.util.Log;

import java.util.ArrayList;

@@ -107,16 +105,20 @@ public class ReferenceCountedTrigger {
        mLastDecRunnables.clear();
    }

    /** Convenience method to decrement this trigger as a runnable. */
    public Runnable decrementAsRunnable() {
        return mDecrementRunnable;
    }
    /** Convenience method to decrement this trigger as a animator listener. */
    /**
     * Convenience method to decrement this trigger as a animator listener.  This listener is
     * guarded to prevent being called back multiple times, and will trigger a decrement once and
     * only once.
     */
    public Animator.AnimatorListener decrementOnAnimationEnd() {
        return new AnimatorListenerAdapter() {
            private boolean hasEnded;

            @Override
            public void onAnimationEnd(Animator animation) {
                if (hasEnded) return;
                decrement();
                hasEnded = true;
            }
        };
    }
+9 −0
Original line number Diff line number Diff line
@@ -87,6 +87,15 @@ public class Utilities {
                    (1f - overlayAlpha) * Color.blue(overlayColor)));
    }

    /**
     * Cancels an animation.
     */
    public static void cancelAnimation(Animator animator) {
        if (animator != null) {
            animator.cancel();
        }
    }

    /**
     * Cancels an animation ensuring that if it has listeners, onCancel and onEnd
     * are not called.
+0 −3
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.ArraySet;
import android.util.Log;
import com.android.systemui.Prefs;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsConfiguration;
@@ -115,8 +114,6 @@ public class RecentsTaskLoadPlan {
     * - least-recent to most-recent freeform tasks
     */
    public synchronized void preloadPlan(RecentsTaskLoader loader, boolean isTopTaskHome) {
        RecentsConfiguration config = Recents.getConfiguration();
        SystemServicesProxy ssp = Recents.getSystemServices();
        Resources res = mContext.getResources();
        ArrayList<Task> allTasks = new ArrayList<>();
        if (mRawTasks == null) {
Loading