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

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

Merge "Remove canStartRecentsAnimation logics" into rvc-dev am: 715d65f9 am: 4349472e

Change-Id: Ie2c58c8a32e61c5843e204771b46c40b2e8af2ae
parents 02db0751 4349472e
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -165,17 +165,6 @@ class RecentsAnimation implements RecentsAnimationCallbacks,
        ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "startRecentsActivity(): intent=%s", mTargetIntent);
        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "RecentsAnimation#startRecentsActivity");

        // TODO(multi-display) currently only support recents animation in default display.
        final DisplayContent dc =
                mService.mRootWindowContainer.getDefaultDisplay().mDisplayContent;
        if (!mWindowManager.canStartRecentsAnimation()) {
            notifyAnimationCancelBeforeStart(recentsAnimationRunner);
            ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS,
                    "Can't start recents animation, nextAppTransition=%s",
                        dc.mAppTransition.getAppTransition());
            return;
        }

        // If the activity is associated with the recents stack, then try and get that first
        ActivityStack targetStack = mDefaultTaskDisplayArea.getStack(WINDOWING_MODE_UNDEFINED,
                mTargetActivityType);
+0 −12
Original line number Diff line number Diff line
@@ -2797,18 +2797,6 @@ public class WindowManagerService extends IWindowManager.Stub
        return mRecentsAnimationController;
    }

    /**
     * @return Whether the next recents animation can continue to start. Called from
     *         {@link RecentsAnimation#startRecentsActivity}.
     */
    boolean canStartRecentsAnimation() {
        // TODO(multi-display): currently only default display support recent activity
        if (getDefaultDisplayContentLocked().mAppTransition.isTransitionSet()) {
            return false;
        }
        return true;
    }

    void cancelRecentsAnimation(
            @RecentsAnimationController.ReorderMode int reorderMode, String reason) {
        if (mRecentsAnimationController != null) {
+0 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ public class RecentsAnimationTest extends ActivityTestsBase {
        mService.mWindowManager.setRecentsAnimationController(mRecentsAnimationController);
        doNothing().when(mService.mWindowManager).initializeRecentsAnimation(
                anyInt(), any(), any(), anyInt(), any(), any());
        doReturn(true).when(mService.mWindowManager).canStartRecentsAnimation();

        final RecentTasks recentTasks = mService.getRecentTasks();
        spyOn(recentTasks);