mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Passing instrumentation to LauncherInstrumentation
UiDevice, the old param, belongs to a support lib; as TAPL switched to AndroidX, it became impossible to pass it from platform tests that still use the old support lib. Bug: 110103162 Test: TaplTests Change-Id: I1f82099b432912fa40da96df0d6179579aab66a3
This commit is contained in:
@@ -29,6 +29,9 @@ import android.graphics.Point;
|
||||
import android.os.Process;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.uiautomator.By;
|
||||
import androidx.test.uiautomator.BySelector;
|
||||
@@ -36,8 +39,6 @@ import androidx.test.uiautomator.Direction;
|
||||
import androidx.test.uiautomator.UiDevice;
|
||||
import androidx.test.uiautomator.UiObject2;
|
||||
import androidx.test.uiautomator.Until;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
@@ -90,7 +91,7 @@ public abstract class AbstractLauncherUiTest {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
mDevice = UiDevice.getInstance(getInstrumentation());
|
||||
mLauncher = new LauncherInstrumentation(mDevice);
|
||||
mLauncher = new LauncherInstrumentation(getInstrumentation());
|
||||
mTargetContext = InstrumentationRegistry.getTargetContext();
|
||||
mTargetPackage = mTargetContext.getPackageName();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user