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

Commit a737b741 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Make isInvisible ActivityEmbeddingSecondaryActivity check optional

We don't always have an in between frame with the ActivityEmbeddingSecondaryActivity being invisible once the main activity doesn't cover the entire screen.

Test: atest com.android.server.wm.flicker.activityembedding.OpenTrampolineActivityTest

Bug: 288591571
Change-Id: I9846ef34a7d9e007031c85545c58676b78dcb60d
parent 3249255e
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -14,18 +14,18 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


package com.android.server.wm.flicker.activityembedding
package com.android.server.wm.flicker.activityembedding.open


import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import android.tools.common.datatypes.Rect
import android.tools.common.datatypes.Rect
import android.tools.common.flicker.subject.region.RegionSubject
import android.tools.common.flicker.subject.region.RegionSubject
import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTest
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import android.tools.device.flicker.legacy.LegacyFlickerTestFactory
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.activityembedding.ActivityEmbeddingTestBase
import com.android.server.wm.flicker.helpers.ActivityEmbeddingAppHelper
import com.android.server.wm.flicker.helpers.ActivityEmbeddingAppHelper
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
@@ -173,7 +173,8 @@ class OpenTrampolineActivityTest(flicker: LegacyFlickerTest) : ActivityEmbedding
                        .coversExactly(startDisplayBounds)
                        .coversExactly(startDisplayBounds)
                }
                }
                .then()
                .then()
                .isInvisible(ActivityEmbeddingAppHelper.SECONDARY_ACTIVITY_COMPONENT)
                .isInvisible(ActivityEmbeddingAppHelper.SECONDARY_ACTIVITY_COMPONENT,
                    isOptional = true)
                .then()
                .then()
                .isVisible(ActivityEmbeddingAppHelper.SECONDARY_ACTIVITY_COMPONENT)
                .isVisible(ActivityEmbeddingAppHelper.SECONDARY_ACTIVITY_COMPONENT)
        }
        }