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

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

Merge changes from topic "launcher-tapl"

* changes:
  Use TAPL to launch apps and recents
  Add TAPL as a direct dependency to the flicker tests
parents d9e7150b 150075b7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,5 +28,6 @@ android_test {
        "flickerlib",
        "truth-prebuilt",
        "app-helpers-core",
        "launcher-aosp-tapl"
    ],
}
+5 −3
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.server.wm.flicker.helpers.AutomationUtils.expandPipWin
import static com.android.server.wm.flicker.helpers.AutomationUtils.launchSplitScreen;
import static com.android.server.wm.flicker.helpers.AutomationUtils.stopPackage;

import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.os.RemoteException;
@@ -222,8 +223,9 @@ class CommonTransitions {
                .repeat(ITERATIONS);
    }

    static TransitionBuilder resizeSplitScreen(IAppHelper testAppTop, ImeAppHelper testAppBottom,
            UiDevice device, int beginRotation, Rational startRatio, Rational stopRatio) {
    static TransitionBuilder resizeSplitScreen(Instrumentation instr, IAppHelper testAppTop,
            ImeAppHelper testAppBottom, UiDevice device, int beginRotation, Rational startRatio,
            Rational stopRatio) {
        String testTag = "resizeSplitScreen_" + testAppTop.getLauncherName() + "_"
                + testAppBottom.getLauncherName() + "_"
                + startRatio.toString().replace("/", ":") + "_to_"
@@ -234,7 +236,7 @@ class CommonTransitions {
                .recordAllRuns()
                .runBeforeAll(AutomationUtils::wakeUpAndGoToHomeScreen)
                .runBeforeAll(() -> setRotation(device, beginRotation))
                .runBeforeAll(() -> clearRecents(device))
                .runBeforeAll(() -> clearRecents(instr))
                .runBefore(testAppBottom::open)
                .runBefore(device::pressHome)
                .runBefore(testAppTop::open)
+4 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.wm.flicker;

import android.app.Instrumentation;
import android.platform.helpers.IAppHelper;
import android.util.Rational;
import android.view.Surface;
@@ -114,8 +115,9 @@ public class DebugTest {
     */
    @Test
    public void resizeSplitScreen() {
        ImeAppHelper bottomApp = new ImeAppHelper(InstrumentationRegistry.getInstrumentation());
        CommonTransitions.resizeSplitScreen(testApp, bottomApp, uiDevice, Surface.ROTATION_0,
        Instrumentation instr = InstrumentationRegistry.getInstrumentation();
        ImeAppHelper bottomApp = new ImeAppHelper(instr);
        CommonTransitions.resizeSplitScreen(instr, testApp, bottomApp, uiDevice, Surface.ROTATION_0,
                new Rational(1, 3), new Rational(2, 3))
                .includeJankyRuns().build().run();
    }
+4 −2
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import static com.android.server.wm.flicker.helpers.AutomationUtils.isInSplitScr

import static com.google.common.truth.Truth.assertThat;

import android.app.Instrumentation;
import android.graphics.Rect;
import android.util.Rational;
import android.view.Surface;
@@ -65,8 +66,9 @@ public class ResizeSplitScreenTest extends FlickerTestBase {

    @Override
    TransitionRunner getTransitionToRun() {
        ImeAppHelper bottomApp = new ImeAppHelper(InstrumentationRegistry.getInstrumentation());
        return resizeSplitScreen(mTestApp, bottomApp, mUiDevice, Surface.ROTATION_0,
        Instrumentation instr = InstrumentationRegistry.getInstrumentation();
        ImeAppHelper bottomApp = new ImeAppHelper(instr);
        return resizeSplitScreen(instr, mTestApp, bottomApp, mUiDevice, Surface.ROTATION_0,
                new Rational(1, 3), new Rational(2, 3))
                .includeJankyRuns().build();
    }