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

Commit 07afdffd authored by Orhan Uysal's avatar Orhan Uysal Committed by Android (Google) Code Review
Browse files

Merge "Modify to accommodate changes in StandardAppHelper" into main

parents 204e508b aff80feb
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ package com.android.server.wm.flicker.helpers

import android.app.Instrumentation
import android.tools.common.Rotation
import android.tools.common.traces.Condition
import android.tools.common.traces.DeviceStateDump
import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.common.traces.component.IComponentMatcher
import android.tools.device.helpers.FIND_TIMEOUT
@@ -54,14 +52,14 @@ constructor(
        launchedAppComponentMatcherOverride: IComponentMatcher?,
        action: String?,
        stringExtras: Map<String, String>,
        waitConditions: Array<Condition<DeviceStateDump>>
        waitConditionsBuilder: WindowManagerStateHelper.StateSyncBuilder
    ) {
        super.launchViaIntent(
            wmHelper,
            launchedAppComponentMatcherOverride,
            action,
            stringExtras,
            waitConditions
            waitConditionsBuilder
        )
        waitIMEShown(wmHelper)
    }
+7 −3
Original line number Diff line number Diff line
@@ -244,12 +244,16 @@ open class PipAppHelper(instrumentation: Instrumentation) :
        action: String? = null,
        stringExtras: Map<String, String>
    ) {
        launchViaIntentAndWaitShown(
        launchViaIntent(
            wmHelper,
            launchedAppComponentMatcherOverride,
            action,
            stringExtras,
            waitConditions = arrayOf(ConditionsFactory.hasPipWindow())
            waitConditionsBuilder = wmHelper
                .StateSyncBuilder()
                .add(ConditionsFactory.isWMStateComplete())
                .withAppTransitionIdle()
                .add(ConditionsFactory.hasPipWindow())
        )

        wmHelper
@@ -261,7 +265,7 @@ open class PipAppHelper(instrumentation: Instrumentation) :

    /** Expand the PIP window back to full screen via intent and wait until the app is visible */
    fun exitPipToFullScreenViaIntent(wmHelper: WindowManagerStateHelper) =
        launchViaIntentAndWaitShown(wmHelper)
        launchViaIntent(wmHelper)

    fun clickEnterPipButton(wmHelper: WindowManagerStateHelper) {
        clickObject(ENTER_PIP_BUTTON_ID)