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

Commit 7454466d authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas
Browse files

[4/n] Disable cts tests with freeform activities when desktop windowing enabled

Desktop Windowing is currently only available on selected devices when the desktop windowing flag is enabled. Desktop windowing currently changes the behaviour of freeform activities and thus when this feature is available the legacy behaviour of freeform activities will not be respected and any tests that depend on this behaviour will fail. So we ignore these tests for tablets if desktop windowing is enabled while we work to have the legacy freeform behaviour and desktop mode coexist. Legacy behaviour of launching activities with multi display also seems to be impact. These tests will also be ignored under that same condition.

Bug: 330152508
Bug: 331170652
Bug: 332937436
Test: atest WmTests:ActivityStarterTests
Change-Id: Iab4a238126c339f0ba07883fdd071c6583f7383a
parent 65dc94c7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_INSTANCE;
import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_TASK;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.Process.SYSTEM_UID;
import static android.server.wm.ActivityManagerTestBase.isTablet;

import static com.android.dx.mockito.inline.extended.ExtendedMockito.clearInvocations;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.doAnswer;
@@ -75,6 +76,7 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -122,6 +124,7 @@ import com.android.server.pm.pkg.AndroidPackage;
import com.android.server.wm.BackgroundActivityStartController.BalVerdict;
import com.android.server.wm.LaunchParamsController.LaunchParamsModifier;
import com.android.server.wm.utils.MockTracker;
import com.android.window.flags.Flags;

import org.junit.After;
import org.junit.Before;
@@ -1295,6 +1298,12 @@ public class ActivityStarterTests extends WindowTestsBase {
     */
    @Test
    public void testDeliverIntentToTopActivityOfNonTopDisplay() {
        // TODO(b/330152508): Remove check once legacy multi-display behaviour can coexist with
        //  desktop windowing mode
        // Ignore test if desktop windowing is enabled on tablets as legacy multi-display
        // behaviour will not be respected
        assumeFalse(Flags.enableDesktopWindowingMode() && isTablet());

        final ActivityStarter starter = prepareStarter(FLAG_ACTIVITY_NEW_TASK,
                false /* mockGetRootTask */);