mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
dd079691c1
@@ -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)).
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user