diff options
author | Vadim Tryshev <vadimt@google.com> | 2019-09-27 13:21:46 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-09-27 13:21:46 -0700 |
commit | 1430f132f3519fcf653b8d961f44492d7983c59b (patch) | |
tree | 600f989e6a2a1a4c7bab31461d1ee52b9da4681c | |
parent | 79e9d0adbab1df028453c78a33ab534be97bb001 (diff) | |
parent | dd079691c1a27c250d4b387fbc391c5311a1e340 (diff) | |
download | packages_apps_Trebuchet-1430f132f3519fcf653b8d961f44492d7983c59b.tar.gz packages_apps_Trebuchet-1430f132f3519fcf653b8d961f44492d7983c59b.tar.bz2 packages_apps_Trebuchet-1430f132f3519fcf653b8d961f44492d7983c59b.zip |
Merge "Deprecating LauncherInstrumentation constructor with parameter" into ub-launcher3-qt-qpr1-dev
am: dd079691c1
Change-Id: I7419be6416f26274bf03abfd84eedef20fd6f084
3 files changed, 12 insertions, 3 deletions
diff --git a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java index b8c00e434..8c11c1c2c 100644 --- a/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java +++ b/quickstep/tests/src/com/android/quickstep/FallbackRecentsTest.java @@ -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)). diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index fc3118703..35a9f0151 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java @@ -93,8 +93,7 @@ public abstract class AbstractLauncherUiTest { protected LooperExecutor mMainThreadExecutor = MAIN_EXECUTOR; 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); |