Home | History | Annotate | Download | only in targetprep

Lines Matching defs:device

22 import com.android.tradefed.device.DeviceNotAvailableException;
23 import com.android.tradefed.device.DeviceUnresponsiveException;
24 import com.android.tradefed.device.ITestDevice;
25 import com.android.tradefed.device.TestDeviceState;
30 @OptionClass(alias = "device-cleaner")
36 /** reboot the device as post test cleanup */
74 public void setUp(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError,
80 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
85 device.executeShellCommand("stop");
90 clean(device);
97 protected void clean(ITestDevice device) throws DeviceNotAvailableException {
98 if (TestDeviceState.ONLINE.equals(device.getDeviceState())) {
104 device.reboot();
107 device.rebootIntoBootloader();
108 device.executeLongFastbootCommand("-w");
109 device.executeFastbootCommand("reboot");
110 device.waitForDeviceAvailable();
122 turnScreenOff(device);
125 turnScreenOff(device);
126 device.executeShellCommand("stop");
132 private void turnScreenOff(ITestDevice device) throws DeviceNotAvailableException {
133 String output = device.executeShellCommand("dumpsys power");
139 device.executeShellCommand("input keyevent 26");
140 // due to framework initialization, device may not actually turn off screen
143 output = device.executeShellCommand("dumpsys power");