/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | TestDeviceState.java | 26 public enum TestDeviceState { enum 50 static TestDeviceState getStateByDdms(DeviceState ddmsState) { in getStateByDdms() 52 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 57 return TestDeviceState.ONLINE; in getStateByDdms() 59 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 61 return TestDeviceState.RECOVERY; in getStateByDdms() 63 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 65 return TestDeviceState.FASTBOOT; in getStateByDdms() 67 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms()
|
D | NativeDeviceStateMonitor.java | 43 private TestDeviceState mDeviceState; 68 mDeviceState = TestDeviceState.getStateByDdms(device.getState()); in NativeDeviceStateMonitor() 102 if (waitForDeviceState(TestDeviceState.ONLINE, waitTime)) { in waitForDeviceOnline() 142 boolean result = waitForDeviceState(TestDeviceState.NOT_AVAILABLE, waitTime); in waitForDeviceNotAvailable() 154 return waitForDeviceState(TestDeviceState.RECOVERY, waitTime); in waitForDeviceInRecovery() 362 public TestDeviceState getDeviceState() { in getDeviceState() 385 boolean result = waitForDeviceState(TestDeviceState.FASTBOOT, waitTime); in waitForDeviceBootloader() 409 private boolean waitForDeviceState(TestDeviceState state, long time) { in waitForDeviceState() 454 public void setState(TestDeviceState deviceState) { in setState() 479 private final TestDeviceState mExpectedState; [all …]
|
D | ManagedTestDeviceFactory.java | 79 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 86 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 92 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 109 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 126 testDevice.setDeviceState(TestDeviceState.FASTBOOT); in createDevice() 128 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice()
|
D | DeviceManager.java | 645 managedDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in freeDevice() 671 if (TestDeviceState.NOT_AVAILABLE.equals(managedDevice.getDeviceState())) { in getEventFromFree() 699 if (!device.getDeviceState().equals(TestDeviceState.NOT_AVAILABLE)) { in launchEmulator() 702 device.getDeviceState(), TestDeviceState.NOT_AVAILABLE)); in launchEmulator() 1101 TestDeviceState newState = TestDeviceState.getStateByDdms(idevice.getState()); in deviceChanged() 1103 if (newState == TestDeviceState.ONLINE) { in deviceChanged() 1140 TestDeviceState newState = in deviceConnected() 1141 TestDeviceState.getStateByDdms(idevice.getState()); in deviceConnected() 1143 if (newState == TestDeviceState.ONLINE) { in deviceConnected() 1186 d.setDeviceState(TestDeviceState.NOT_AVAILABLE); in deviceDisconnected()
|
D | ManagedDeviceList.java | 138 d.setDeviceState(TestDeviceState.FASTBOOT); 139 } else if (d.getDeviceState() == TestDeviceState.FASTBOOT) { 141 d.setDeviceState(TestDeviceState.NOT_AVAILABLE);
|
D | IDeviceStateMonitor.java | 128 public TestDeviceState getDeviceState(); in getDeviceState() 135 public void setState(TestDeviceState deviceState); in setState()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | BackgroundDeviceActionTest.java | 45 private TestDeviceState mDeviceState = TestDeviceState.ONLINE; 50 mDeviceState = TestDeviceState.ONLINE; in setUp() 68 EasyMock.expect(mMockTestDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE) in testBackgroundActionComplete() 100 mDeviceState = TestDeviceState.NOT_AVAILABLE; in testBackgroundAction_shellException() 113 assertEquals(TestDeviceState.NOT_AVAILABLE, mDeviceState); in testBackgroundAction_shellException() 147 mDeviceState = TestDeviceState.NOT_AVAILABLE; in testwaitForDeviceRecovery_blockOffline()
|
D | WaitDeviceRecoveryTest.java | 69 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDevice_success() 88 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDevice_unavailable() 108 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testRecoverDevice_unresponsive() 133 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testRecoverDevice_fastboot() 183 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDeviceBootloader_unavailable() 209 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testRecoverDeviceBootloader_online() 228 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDeviceBootloader_unavailable_online() 231 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testRecoverDeviceBootloader_unavailable_online() 250 EasyMock.expect(mMockMonitor.getDeviceState()).andStubReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDeviceBootloader_unavailable_failure()
|
D | TestDeviceFuncTest.java | 522 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 527 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 531 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 550 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand() 561 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand() 575 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testRebootIntoBootloader() 578 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testRebootIntoBootloader() 587 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testReboot() 602 assertEquals(TestDeviceState.RECOVERY, mMonitor.getDeviceState()); in testRebootIntoRecovery()
|
D | DeviceManagerTest.java | 589 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetIDevice() 590 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testSetIDevice() 620 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_excludeDevice() 649 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_includeDevice() 677 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_disconnected() 693 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_offline() 937 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in setCheckAvailableDeviceExpectations() 958 .andReturn(TestDeviceState.NOT_AVAILABLE).times(2); in testFreeDevice_tcpDevice() 961 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice() 975 assertTrue(tcp.getDeviceState() == TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice() [all …]
|
D | DeviceStateMonitorTest.java | 69 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOnline() 75 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOnline() 88 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOnline_timeout() 121 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOffline_alreadyOffline() 131 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOffline() 137 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOffline() 151 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOffline_timeout()
|
D | ManagedDeviceListTest.java | 119 mockDevice.setDeviceState(TestDeviceState.FASTBOOT); in testUpdateFastbootState() 139 EasyMock.expect(mockDevice.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testUpdateFastbootState_gone() 140 mockDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testUpdateFastbootState_gone()
|
D | TestDeviceStressTest.java | 77 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testManyReboots() 85 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testManyRebootBootloaders() 87 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testManyRebootBootloaders()
|
D | MockDeviceManager.java | 72 TestDeviceState.ONLINE).anyTimes(); in setNumDevicesInternal() 103 public void setNumDevicesCustom(int numDevices, TestDeviceState state, in setNumDevicesCustom() 120 public void setNumDevicesStub(int numDevices, TestDeviceState state, in setNumDevicesStub()
|
D | NativeDeviceTest.java | 1591 public TestDeviceState getDeviceState() { in testDoReboot() 1592 return TestDeviceState.ONLINE; in testDoReboot() 1610 public TestDeviceState getDeviceState() { in testDoReboot_skipped() 1617 return TestDeviceState.ONLINE; in testDoReboot_skipped() 1630 public TestDeviceState getDeviceState() { in testDoReboot_fastboot() 1631 return TestDeviceState.FASTBOOT; in testDoReboot_fastboot() 2187 mTestDevice.setDeviceState(TestDeviceState.FASTBOOT); in testGetMacAddress_fastboot() 2247 mMockStateMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testGetSimState_unavailableDevice() 2250 mTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testGetSimState_unavailableDevice() 2259 mMockStateMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testGetSimOperator_unavailableDevice() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/recovery/ |
D | BatteryUnavailableDeviceRecoveryTest.java | 22 import com.android.tradefed.device.TestDeviceState; 44 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testShouldSkip() 53 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testShouldSkip_fastboot() 61 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testShouldSkip_recovery()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/ |
D | CommandSchedulerTest.java | 49 import com.android.tradefed.device.TestDeviceState; 361 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand() 794 mMockManager.setNumDevicesCustom(1, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailable() 814 mMockManager.setNumDevicesCustom(2, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailableMulti() 832 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleased() 850 mMockManager.setNumDevicesStub(2, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleasedMulti() 869 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, stub); in testStubDevice_NotReleased() 1155 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand_versioning()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | RunCommandTargetPreparerTest.java | 29 import com.android.tradefed.device.TestDeviceState; 49 private static final TestDeviceState ONLINE_STATE = TestDeviceState.ONLINE;
|
D | DeviceWiperFuncTest.java | 4 import com.android.tradefed.device.TestDeviceState; 15 assertTrue(getDevice().getDeviceState().equals(TestDeviceState.ONLINE)); in testWipe()
|
/tools/tradefederation/core/src/com/android/tradefed/device/recovery/ |
D | BatteryUnavailableDeviceRecovery.java | 20 import com.android.tradefed.device.TestDeviceState; 28 if (TestDeviceState.FASTBOOT.equals(device.getDeviceState())) { in shouldSkip()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | DeviceRecoveryModeUtil.java | 23 import com.android.tradefed.device.TestDeviceState; 55 if (managedDevice.getDeviceState().equals(TestDeviceState.RECOVERY)) { in bootOutOfRecovery()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | DeviceRecoveryModeUtilTest.java | 21 import com.android.tradefed.device.TestDeviceState; 50 EasyMock.expect(mMockManagedDevice.getDeviceState()).andReturn(TestDeviceState.RECOVERY); in testBootOutOfRecovery()
|
D | LogcatEventParserTest.java | 26 import com.android.tradefed.device.TestDeviceState; 161 EasyMock.expect(mTestDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testEndToEnd()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/companion/ |
D | CompanionDeviceTracker.java | 25 import com.android.tradefed.device.TestDeviceState; 87 if (!TestDeviceState.ONLINE.equals(companion.getDeviceState())) { in freeCompanionDevice()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | DeviceCleaner.java | 25 import com.android.tradefed.device.TestDeviceState; 98 if (TestDeviceState.ONLINE.equals(device.getDeviceState())) { in clean()
|