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

Commit dd079691 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Deprecating LauncherInstrumentation constructor with parameter" into...

Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
parents 83b03b08 2611d79f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class FallbackRecentsTest {
        Context context = instrumentation.getContext();
        mDevice = UiDevice.getInstance(instrumentation);
        mDevice.setOrientationNatural();
        mLauncher = new LauncherInstrumentation(instrumentation);
        mLauncher = new LauncherInstrumentation();

        mOrderSensitiveRules = RuleChain.
                outerRule(new NavigationModeSwitchRule(mLauncher)).
+1 −2
Original line number Diff line number Diff line
@@ -92,8 +92,7 @@ public abstract class AbstractLauncherUiTest {

    protected MainThreadExecutor mMainThreadExecutor = new MainThreadExecutor();
    protected final UiDevice mDevice = UiDevice.getInstance(getInstrumentation());
    protected final LauncherInstrumentation mLauncher =
            new LauncherInstrumentation(getInstrumentation());
    protected final LauncherInstrumentation mLauncher = new LauncherInstrumentation();
    protected Context mTargetContext;
    protected String mTargetPackage;

+10 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import android.view.accessibility.AccessibilityEvent;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.test.InstrumentationRegistry;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.Configurator;
@@ -144,6 +145,15 @@ public final class LauncherInstrumentation {
    /**
     * Constructs the root of TAPL hierarchy. You get all other objects from it.
     */
    public LauncherInstrumentation() {
        this(InstrumentationRegistry.getInstrumentation());
    }

    /**
     * Constructs the root of TAPL hierarchy. You get all other objects from it.
     * Deprecated: use the constructor without parameters instead.
     */
    @Deprecated
    public LauncherInstrumentation(Instrumentation instrumentation) {
        mInstrumentation = instrumentation;
        mDevice = UiDevice.getInstance(instrumentation);