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

Commit a1358232 authored by Jerry Chang's avatar Jerry Chang Committed by Automerger Merge Worker
Browse files

Merge "Fix DragDividerToResize flicker tests" into udc-dev am: 88dd1d6c

parents 39a739b4 88dd1d6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ class SplitScreenTransitions {
        }
    }

    void applyResizeTransition(@NonNull IBinder transition, @NonNull TransitionInfo info,
    void playResizeAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info,
            @NonNull SurfaceControl.Transaction startTransaction,
            @NonNull SurfaceControl.Transaction finishTransaction,
            @NonNull Transitions.TransitionFinishCallback finishCallback,
+1 −1
Original line number Diff line number Diff line
@@ -2376,7 +2376,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                return true;
            }
        } else if (mSplitTransitions.isPendingResize(transition)) {
            mSplitTransitions.applyResizeTransition(transition, info, startTransaction,
            mSplitTransitions.playResizeAnimation(transition, info, startTransaction,
                    finishTransaction, finishCallback, mMainStage.mRootTaskInfo.token,
                    mSideStage.mRootTaskInfo.token, mMainStage.getSplitDecorManager(),
                    mSideStage.getSplitDecorManager());
+25 −16
Original line number Diff line number Diff line
@@ -217,14 +217,23 @@ fun FlickerTest.splitAppLayerBoundsChanges(
) {
    assertLayers {
        if (landscapePosLeft) {
            this.splitAppLayerBoundsSnapToDivider(
            splitAppLayerBoundsSnapToDivider(
                component,
                landscapePosLeft,
                portraitPosTop,
                scenario.endRotation
            )
            .then()
            .isInvisible(component)
            .then()
            .splitAppLayerBoundsSnapToDivider(
                component,
                landscapePosLeft,
                portraitPosTop,
                scenario.endRotation
            )
        } else {
            this.splitAppLayerBoundsSnapToDivider(
            splitAppLayerBoundsSnapToDivider(
                component,
                landscapePosLeft,
                portraitPosTop,
+12 −24
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.wm.shell.flicker.splitscreen

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.IwTest
import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.isShellTransitionsEnabled
@@ -86,16 +85,14 @@ class DragDividerToResize(flicker: FlickerTest) : SplitScreenBase(flicker) {

    @Presubmit
    @Test
    fun primaryAppLayerKeepVisible() {
        Assume.assumeFalse(isShellTransitionsEnabled)
        flicker.layerKeepVisible(primaryApp)
    fun primaryAppLayerVisibilityChanges() {
        flicker.assertLayers {
            this.isVisible(secondaryApp)
                .then()
                .isInvisible(secondaryApp)
                .then()
                .isVisible(secondaryApp)
        }

    @FlakyTest(bugId = 263213649)
    @Test
    fun primaryAppLayerKeepVisible_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        flicker.layerKeepVisible(primaryApp)
    }

    @Presubmit
@@ -110,7 +107,9 @@ class DragDividerToResize(flicker: FlickerTest) : SplitScreenBase(flicker) {
        }
    }

    @Presubmit @Test fun primaryAppWindowKeepVisible() = flicker.appWindowKeepVisible(primaryApp)
    @Presubmit
    @Test
    fun primaryAppWindowKeepVisible() = flicker.appWindowKeepVisible(primaryApp)

    @Presubmit
    @Test
@@ -127,17 +126,6 @@ class DragDividerToResize(flicker: FlickerTest) : SplitScreenBase(flicker) {
        )
    }

    @FlakyTest(bugId = 263213649)
    @Test
    fun primaryAppBoundsChanges_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        flicker.splitAppLayerBoundsChanges(
            primaryApp,
            landscapePosLeft = true,
            portraitPosTop = false
        )
    }

    @Presubmit
    @Test
    fun secondaryAppBoundsChanges() =
@@ -148,7 +136,7 @@ class DragDividerToResize(flicker: FlickerTest) : SplitScreenBase(flicker) {
        )

    /** {@inheritDoc} */
    @FlakyTest(bugId = 263213649)
    @Presubmit
    @Test
    override fun entireScreenCovered() = super.entireScreenCovered()

+1 −1
Original line number Diff line number Diff line
@@ -293,7 +293,7 @@ internal object SplitScreenUtils {
            wmHelper.currentState.layerState.displays.firstOrNull { !it.isVirtual }?.layerStackSpace
                ?: error("Display not found")
        val dividerBar = device.wait(Until.findObject(dividerBarSelector), TIMEOUT_MS)
        dividerBar.drag(Point(displayBounds.width * 1 / 3, displayBounds.height * 2 / 3))
        dividerBar.drag(Point(displayBounds.width * 1 / 3, displayBounds.height * 2 / 3), 2000)

        wmHelper
            .StateSyncBuilder()