Use WaitForDeviceAvailable

WaitForDeviceOnline doesn't gurantee that device
can execute commands

Test: atest -c Enable16KbTest
Bug: 401597066
Change-Id: Icf55035ebe4b4a028892dc22665dafc8a5b492b4
This commit is contained in:
Pawan Wagh
2025-03-14 06:46:47 +00:00
parent 2ed16df7ca
commit cc282f8470

View File

@@ -115,9 +115,9 @@ public class Enable16KbTest extends BaseHostJUnit4Test {
private void prepareDevice() throws Exception { private void prepareDevice() throws Exception {
// Verify that device is online before running test and enable root // Verify that device is online before running test and enable root
getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT); getDevice().waitForDeviceAvailable(DEVICE_WAIT_TIMEOUT);
getDevice().enableAdbRoot(); getDevice().enableAdbRoot();
getDevice().waitForDeviceOnline(DEVICE_WAIT_TIMEOUT); getDevice().waitForDeviceAvailable(DEVICE_WAIT_TIMEOUT);
getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP"); getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP");
getDevice().executeShellCommand("wm dismiss-keyguard"); getDevice().executeShellCommand("wm dismiss-keyguard");