Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc282f84 authored by Pawan Wagh's avatar Pawan Wagh
Browse files

Use WaitForDeviceAvailable

WaitForDeviceOnline doesn't gurantee that device
can execute commands

Test: atest -c Enable16KbTest
Bug: 401597066
Change-Id: Icf55035ebe4b4a028892dc22665dafc8a5b492b4
parent 2ed16df7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,9 +115,9 @@ public class Enable16KbTest extends BaseHostJUnit4Test {

    private void prepareDevice() throws Exception {
        // Verify that device is online before running test and enable root
        getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT);
        getDevice().waitForDeviceAvailable(DEVICE_WAIT_TIMEOUT);
        getDevice().enableAdbRoot();
        getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT);
        getDevice().waitForDeviceAvailable(DEVICE_WAIT_TIMEOUT);

        getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP");
        getDevice().executeShellCommand("wm dismiss-keyguard");