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

Commit 0c8e7bd6 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

1-Remove dependency between flicker app helpers and app-helpers-core

(and fix ktfmt issues)

Bug: 262241371
Test: atest FlickerLibTest
Change-Id: Ie36cab84741d0752285def375a85fa4e390fca31
parent 8bba546d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ class OpenAppInSizeCompatModeTest(flicker: LegacyFlickerTest) : BaseAppCompat(fl
     */
    @Postsubmit
    @Test
    fun letterboxAppFocusedAtEnd() = flicker.assertEventLog { focusChanges(letterboxApp.`package`) }
    fun letterboxAppFocusedAtEnd() =
        flicker.assertEventLog { focusChanges(letterboxApp.packageName) }

    @Postsubmit
    @Test
+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)

    private val uid =
        context.packageManager
            .getApplicationInfo(testApp.`package`, PackageManager.ApplicationInfoFlags.of(0))
            .getApplicationInfo(testApp.packageName, PackageManager.ApplicationInfoFlags.of(0))
            .uid

    @JvmOverloads
@@ -57,7 +57,7 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)
        return {
            setup {
                notifyManager.setBubblesAllowed(
                    testApp.`package`,
                    testApp.packageName,
                    uid,
                    NotificationManager.BUBBLE_PREFERENCE_ALL
                )
@@ -68,7 +68,7 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)

            teardown {
                notifyManager.setBubblesAllowed(
                    testApp.`package`,
                    testApp.packageName,
                    uid,
                    NotificationManager.BUBBLE_PREFERENCE_NONE
                )
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ abstract class EnterPipTransition(flicker: LegacyFlickerTest) : PipTransition(fl
    @Presubmit
    @Test
    open fun focusChanges() {
        flicker.assertEventLog { this.focusChanges(pipApp.`package`, "NexusLauncherActivity") }
        flicker.assertEventLog { this.focusChanges(pipApp.packageName, "NexusLauncherActivity") }
    }

    companion object {
+3 −3
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import com.android.server.wm.flicker.helpers.PipAppHelper

/** Helper class for PIP app on AndroidTV */
open class PipAppHelperTv(instrumentation: Instrumentation) : PipAppHelper(instrumentation) {
    private val appSelector = By.pkg(`package`).depth(0)
    private val appSelector = By.pkg(packageName).depth(0)

    val ui: UiObject2?
        get() = uiDevice.findObject(appSelector)
@@ -46,7 +46,7 @@ open class PipAppHelperTv(instrumentation: Instrumentation) : PipAppHelper(instr
    }

    override fun clickObject(resId: String) {
        val selector = By.res(`package`, resId)
        val selector = By.res(packageName, resId)
        focusOnObject(selector) || error("Could not focus on `$resId` object")
        uiDevice.pressDPadCenter()
    }
@@ -68,7 +68,7 @@ open class PipAppHelperTv(instrumentation: Instrumentation) : PipAppHelper(instr
    }

    fun waitUntilClosed(): Boolean {
        val appSelector = By.pkg(`package`).depth(0)
        val appSelector = By.pkg(packageName).depth(0)
        return uiDevice.wait(Until.gone(appSelector), APP_CLOSE_WAIT_TIME_MS)
    }

+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
        tapl.launchedAppState.taskbar
            .openAllApps()
            .getAppIcon(secondaryApp.appName)
            .dragToSplitscreen(secondaryApp.`package`, primaryApp.`package`)
            .dragToSplitscreen(secondaryApp.packageName, primaryApp.packageName)
        SplitScreenUtils.waitForSplitComplete(wmHelper, primaryApp, secondaryApp)
    }

Loading