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

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

Merge "Cancel the existing recents animation before any initialization" into...

Merge "Cancel the existing recents animation before any initialization" into sc-dev am: cebca176 am: 9c107fca

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

Change-Id: I1e6c30bd7dd5eaeee5cb17f1cb44e9318a0ceaf3
parents 52d5d43a 9c107fca
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -164,6 +164,13 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
        ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "startRecentsActivity(): intent=%s", mTargetIntent);
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RecentsAnimation#startRecentsActivity");

        // Cancel any existing recents animation running synchronously (do not hold the
        // WM lock) before starting the newly requested recents animation as they can not coexist
        if (mWindowManager.getRecentsAnimationController() != null) {
            mWindowManager.getRecentsAnimationController().forceCancelAnimation(
                    REORDER_MOVE_TO_ORIGINAL_POSITION, "startRecentsActivity");
        }

        // If the activity is associated with the root recents task, then try and get that first
        Task targetRootTask = mDefaultTaskDisplayArea.getRootTask(WINDOWING_MODE_UNDEFINED,
                mTargetActivityType);
@@ -237,12 +244,7 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
            targetActivity.intent.replaceExtras(mTargetIntent);

            // Fetch all the surface controls and pass them to the client to get the animation
            // started. Cancel any existing recents animation running synchronously (do not hold the
            // WM lock)
            if (mWindowManager.getRecentsAnimationController() != null) {
                mWindowManager.getRecentsAnimationController().forceCancelAnimation(
                        REORDER_MOVE_TO_ORIGINAL_POSITION, "startRecentsActivity");
            }
            // started
            mWindowManager.initializeRecentsAnimation(mTargetActivityType, recentsAnimationRunner,
                    this, mDefaultTaskDisplayArea.getDisplayId(),
                    mTaskSupervisor.mRecentTasks.getRecentTaskIds(), targetActivity);