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:
@@ -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");
|
||||||
|
Reference in New Issue
Block a user