Merge "Wake up/unlock device before running tests"

This commit is contained in:
Fan Zhang
2019-03-05 21:32:44 +00:00
committed by Android (Google) Code Review

View File

@@ -50,8 +50,10 @@ public class LifecycleEventHandlingTest {
private UiDevice mDevice;
@Before
public void setUp() {
public void setUp() throws Exception {
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
mDevice.wakeUp();
mDevice.executeShellCommand("wm dismiss-keyguard");
mContext = InstrumentationRegistry.getTargetContext();
mTargetPackage = mContext.getPackageName();
}