summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2019-09-27 19:57:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-09-27 19:57:00 +0000
commitdd079691c1a27c250d4b387fbc391c5311a1e340 (patch)
treea3c5940fbdcf8fc75c717d6772b1cd2152df0b3a /tests
parent83b03b08de944510917e6ee1ebdbea631d5fb4d4 (diff)
parent2611d79f69a5d9250c90db0d57fea6fda84ab105 (diff)
downloadandroid_packages_apps_Trebuchet-dd079691c1a27c250d4b387fbc391c5311a1e340.tar.gz
android_packages_apps_Trebuchet-dd079691c1a27c250d4b387fbc391c5311a1e340.tar.bz2
android_packages_apps_Trebuchet-dd079691c1a27c250d4b387fbc391c5311a1e340.zip
Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java3
-rw-r--r--tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java10
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index 1f4ba1af0..b20fae431 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -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;
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 98a7a36d5..d89ec8b5d 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -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);