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

Commit f0dbfd00 authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Don't reorder tasks if the recents animation is not running to home"...

Merge "Don't reorder tasks if the recents animation is not running to home" into sc-dev am: 470baa31

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

Change-Id: Ia0c86c507d5134dfd4f66a8dba390a85a23117d7
parents 2acf538a 470baa31
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.wm;

import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
@@ -823,8 +824,10 @@ public class RecentsAnimationController implements DeathRecipient {
        if (mCanceled) {
            return;
        }
        cancelAnimation(mWillFinishToHome ? REORDER_MOVE_TO_TOP : REORDER_KEEP_IN_PLACE,
                true /* screenshot */, "cancelAnimationForHomeStart");
        final int reorderMode = mTargetActivityType == ACTIVITY_TYPE_HOME && mWillFinishToHome
                ? REORDER_MOVE_TO_TOP
                : REORDER_KEEP_IN_PLACE;
        cancelAnimation(reorderMode, true /* screenshot */, "cancelAnimationForHomeStart");
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -683,12 +683,12 @@ public class RecentsAnimationControllerTest extends WindowTestsBase {
    @Test
    public void testCancelForStartHome() throws Exception {
        mWm.setRecentsAnimationController(mController);
        final ActivityRecord homeActivity = createHomeActivity();
        final ActivityRecord activity = createActivityRecord(mDefaultDisplay);
        final WindowState win1 = createWindow(null, TYPE_BASE_APPLICATION, activity, "win1");
        activity.addWindow(win1);

        RecentsAnimationController.TaskAnimationAdapter adapter = mController.addAnimation(
                activity.getTask(), false /* isRecentTaskInvisible */);
        initializeRecentsAnimationController(mController, homeActivity);
        mController.setWillFinishToHome(true);

        // Verify cancel is called with a snapshot and that we've created an overlay