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

Commit 2863255d authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Make FASS accessible from winscope"

parents d06ba1aa aa188ce8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@

package com.android.wm.shell.flicker

import android.content.ComponentName
import android.graphics.Region
import android.view.Surface
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.traces.common.FlickerComponentName

fun FlickerTestParameter.appPairsDividerIsVisibleAtEnd() {
    assertLayersEnd {
@@ -72,7 +72,7 @@ fun FlickerTestParameter.dockedStackDividerNotExistsAtEnd() {

fun FlickerTestParameter.appPairsPrimaryBoundsIsVisibleAtEnd(
    rotation: Int,
    primaryComponent: ComponentName
    primaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(APP_PAIR_SPLIT_DIVIDER_COMPONENT).visibleRegion.region
@@ -83,7 +83,7 @@ fun FlickerTestParameter.appPairsPrimaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.dockedStackPrimaryBoundsIsVisibleAtEnd(
    rotation: Int,
    primaryComponent: ComponentName
    primaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(DOCKED_STACK_DIVIDER_COMPONENT).visibleRegion.region
@@ -94,7 +94,7 @@ fun FlickerTestParameter.dockedStackPrimaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.appPairsSecondaryBoundsIsVisibleAtEnd(
    rotation: Int,
    secondaryComponent: ComponentName
    secondaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(APP_PAIR_SPLIT_DIVIDER_COMPONENT).visibleRegion.region
@@ -105,7 +105,7 @@ fun FlickerTestParameter.appPairsSecondaryBoundsIsVisibleAtEnd(

fun FlickerTestParameter.dockedStackSecondaryBoundsIsVisibleAtEnd(
    rotation: Int,
    secondaryComponent: ComponentName
    secondaryComponent: FlickerComponentName
) {
    assertLayersEnd {
        val dividerRegion = layer(DOCKED_STACK_DIVIDER_COMPONENT).visibleRegion.region
+3 −3
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
@file:JvmName("CommonConstants")
package com.android.wm.shell.flicker

import android.content.ComponentName
import com.android.server.wm.traces.common.FlickerComponentName

const val SYSTEM_UI_PACKAGE_NAME = "com.android.systemui"
val APP_PAIR_SPLIT_DIVIDER_COMPONENT = ComponentName("", "AppPairSplitDivider#")
val DOCKED_STACK_DIVIDER_COMPONENT = ComponentName("", "DockedStackDivider#")
 No newline at end of file
val APP_PAIR_SPLIT_DIVIDER_COMPONENT = FlickerComponentName("", "AppPairSplitDivider#")
val DOCKED_STACK_DIVIDER_COMPONENT = FlickerComponentName("", "DockedStackDivider#")
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.statusBarLayerIsVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsVisible
import com.android.server.wm.traces.parser.toFlickerComponent
import com.android.wm.shell.flicker.helpers.AppPairsHelper
import com.android.wm.shell.flicker.helpers.BaseAppHelper
import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.getDevEnableNonResizableMultiWindow
@@ -55,7 +56,7 @@ abstract class AppPairsTransition(protected val testSpec: FlickerTestParameter)
    protected val activityHelper = ActivityHelper.getInstance()
    protected val appPairsHelper = AppPairsHelper(instrumentation,
        Components.SplitScreenActivity.LABEL,
        Components.SplitScreenActivity.COMPONENT)
        Components.SplitScreenActivity.COMPONENT.toFlickerComponent())

    protected val primaryApp = SplitScreenHelper.getPrimary(instrumentation)
    protected val secondaryApp = SplitScreenHelper.getSecondary(instrumentation)
+2 −2
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@
package com.android.wm.shell.flicker.helpers

import android.app.Instrumentation
import android.content.ComponentName
import android.graphics.Region
import com.android.server.wm.flicker.Flicker
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.traces.common.FlickerComponentName

class AppPairsHelper(
    instrumentation: Instrumentation,
    activityLabel: String,
    component: ComponentName
    component: FlickerComponentName
) : BaseAppHelper(instrumentation, activityLabel, component) {
    fun getPrimaryBounds(dividerBounds: Region): android.graphics.Region {
        val primaryAppBounds = Region(0, 0, dividerBounds.bounds.right,
+2 −3
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.wm.shell.flicker.helpers

import android.app.Instrumentation
import android.content.ComponentName
import android.content.pm.PackageManager.FEATURE_LEANBACK
import android.content.pm.PackageManager.FEATURE_LEANBACK_ONLY
import android.os.SystemProperties
@@ -28,13 +27,13 @@ import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
import com.android.compatibility.common.util.SystemUtil
import com.android.server.wm.flicker.helpers.StandardAppHelper
import com.android.server.wm.traces.parser.toWindowName
import com.android.server.wm.traces.common.FlickerComponentName
import java.io.IOException

abstract class BaseAppHelper(
    instrumentation: Instrumentation,
    launcherName: String,
    component: ComponentName
    component: FlickerComponentName
) : StandardAppHelper(
    instrumentation,
    launcherName,
Loading