Home
last modified time | relevance | path

Searched refs:TestDeviceState (Results 1 – 25 of 36) sorted by relevance

12

/tools/tradefederation/core/src/com/android/tradefed/device/
DTestDeviceState.java26 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()
DNativeDeviceStateMonitor.java43 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 …]
DIDeviceStateMonitor.java128 public TestDeviceState getDeviceState(); in getDeviceState()
135 public void setState(TestDeviceState deviceState); in setState()
DManagedTestDeviceFactory.java71 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice()
85 testDevice.setDeviceState(TestDeviceState.FASTBOOT); in createDevice()
87 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice()
DManagedDeviceList.java138 d.setDeviceState(TestDeviceState.FASTBOOT);
139 } else if (d.getDeviceState() == TestDeviceState.FASTBOOT) {
141 d.setDeviceState(TestDeviceState.NOT_AVAILABLE);
DIManagedTestDevice.java56 public void setDeviceState(TestDeviceState deviceState); in setDeviceState()
DDeviceManager.java555 managedDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in freeDevice()
581 if (TestDeviceState.NOT_AVAILABLE.equals(managedDevice.getDeviceState())) { in getEventFromFree()
609 if (!device.getDeviceState().equals(TestDeviceState.NOT_AVAILABLE)) { in launchEmulator()
612 device.getDeviceState(), TestDeviceState.NOT_AVAILABLE)); in launchEmulator()
1026 TestDeviceState newState = TestDeviceState.getStateByDdms(idevice.getState()); in deviceChanged()
1028 if (newState == TestDeviceState.ONLINE) { in deviceChanged()
1065 TestDeviceState newState = in deviceConnected()
1066 TestDeviceState.getStateByDdms(idevice.getState()); in deviceConnected()
1068 if (newState == TestDeviceState.ONLINE) { in deviceConnected()
1111 d.setDeviceState(TestDeviceState.NOT_AVAILABLE); in deviceDisconnected()
DBackgroundDeviceAction.java146 || !TestDeviceState.ONLINE.equals(mTestDevice.getDeviceState())) { in blockUntilOnlineNoThrow()
DWaitDeviceRecovery.java123 if (monitor.getDeviceState().equals(TestDeviceState.FASTBOOT)) { in recoverDevice()
260 } else if (monitor.getDeviceState() == TestDeviceState.ONLINE) { in recoverDeviceBootloader()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DBackgroundDeviceActionTest.java45 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()
DWaitDeviceRecoveryTest.java69 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()
DManagedDeviceListTest.java119 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()
DTestDeviceStressTest.java77 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testManyReboots()
85 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testManyRebootBootloaders()
87 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testManyRebootBootloaders()
DTestDeviceFuncTest.java520 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb()
525 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb()
529 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb()
548 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand()
559 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand()
573 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testRebootIntoBootloader()
576 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testRebootIntoBootloader()
585 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testReboot()
600 assertEquals(TestDeviceState.RECOVERY, mMonitor.getDeviceState()); in testRebootIntoRecovery()
DDeviceManagerTest.java514 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetIDevice()
515 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testSetIDevice()
546 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_excludeDevice()
576 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_includeDevice()
606 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_disconnected()
623 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_offline()
871 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in setCheckAvailableDeviceExpectations()
894 .andReturn(TestDeviceState.NOT_AVAILABLE).times(2); in testFreeDevice_tcpDevice()
897 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice()
910 assertTrue(tcp.getDeviceState() == TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice()
[all …]
DDeviceStateMonitorTest.java69 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()
DMockDeviceManager.java72 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()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DDeviceWiperFuncTest.java4 import com.android.tradefed.device.TestDeviceState;
15 assertTrue(getDevice().getDeviceState().equals(TestDeviceState.ONLINE)); in testWipe()
DSdkAvdPreparerTest.java26 import com.android.tradefed.device.TestDeviceState;
114 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testSetUp()
141 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testSetUp_noAvdName()
176 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testSetUp_failedBoot()
DRunCommandTargetPreparerTest.java29 import com.android.tradefed.device.TestDeviceState;
46 private static final TestDeviceState ONLINE_STATE = TestDeviceState.ONLINE;
/tools/tradefederation/core/src/com/android/tradefed/util/
DDeviceRecoveryModeUtil.java23 import com.android.tradefed.device.TestDeviceState;
55 if (managedDevice.getDeviceState().equals(TestDeviceState.RECOVERY)) { in bootOutOfRecovery()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DDeviceRecoveryModeUtilTest.java21 import com.android.tradefed.device.TestDeviceState;
50 EasyMock.expect(mMockManagedDevice.getDeviceState()).andReturn(TestDeviceState.RECOVERY); in testBootOutOfRecovery()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/companion/
DCompanionDeviceTracker.java25 import com.android.tradefed.device.TestDeviceState;
87 if (!TestDeviceState.ONLINE.equals(companion.getDeviceState())) { in freeCompanionDevice()
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DDeviceCleaner.java25 import com.android.tradefed.device.TestDeviceState;
98 if (TestDeviceState.ONLINE.equals(device.getDeviceState())) { in clean()
/tools/tradefederation/core/tests/src/com/android/tradefed/command/
DCommandSchedulerTest.java42 import com.android.tradefed.device.TestDeviceState;
343 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand()
776 mMockManager.setNumDevicesCustom(1, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailable()
795 mMockManager.setNumDevicesCustom(2, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailableMulti()
814 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleased()
833 mMockManager.setNumDevicesStub(2, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleasedMulti()
853 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, stub); in testStubDevice_NotReleased()
1131 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand_versioning()

12