commit | c255c8b357a95a8be9dbfb2aca48002f203de14d | [log] [tgz] |
---|---|---|
author | vadimt <vadimt@google.com> | Fri Apr 12 14:00:40 2019 -0700 |
committer | vadimt <vadimt@google.com> | Fri Apr 12 14:00:40 2019 -0700 |
tree | 749069d6f5fc75722bd8ffe631297c206993ac1b | |
parent | c6d9ddfddbc70aa1f486b3ed730111741566989f [diff] |
Unlock the phone before each test We were trying to do so from the test config, but this didn't work Change-Id: I098eb392c76572bc43443adac130fa8700b49bde
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java index 9e77937..4a9df98 100644 --- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java +++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -163,6 +163,8 @@ public void setUp() throws Exception { mTargetContext = InstrumentationRegistry.getTargetContext(); mTargetPackage = mTargetContext.getPackageName(); + // Unlock the phone + mDevice.executeShellCommand("input keyevent 82"); } @After
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 08f2681..cde68f2 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -154,8 +154,6 @@ } catch (IOException e) { fail(e.toString()); } - - assertTrue("Phone is locked", !hasSystemUiObject("keyguard_status_view")); } Context getContext() {