Home
last modified time | relevance | path

Searched refs:TestDeviceState (Results 1 – 25 of 37) 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 …]
DManagedTestDeviceFactory.java79 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()
DDeviceManager.java645 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()
DManagedDeviceList.java138 d.setDeviceState(TestDeviceState.FASTBOOT);
139 } else if (d.getDeviceState() == TestDeviceState.FASTBOOT) {
141 d.setDeviceState(TestDeviceState.NOT_AVAILABLE);
DIDeviceStateMonitor.java128 public TestDeviceState getDeviceState(); in getDeviceState()
135 public void setState(TestDeviceState deviceState); in setState()
/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()
DTestDeviceFuncTest.java522 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()
DDeviceManagerTest.java589 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 …]
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()
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()
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()
DNativeDeviceTest.java1591 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/
DBatteryUnavailableDeviceRecoveryTest.java22 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/
DCommandSchedulerTest.java49 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/
DRunCommandTargetPreparerTest.java29 import com.android.tradefed.device.TestDeviceState;
49 private static final TestDeviceState ONLINE_STATE = TestDeviceState.ONLINE;
DDeviceWiperFuncTest.java4 import com.android.tradefed.device.TestDeviceState;
15 assertTrue(getDevice().getDeviceState().equals(TestDeviceState.ONLINE)); in testWipe()
/tools/tradefederation/core/src/com/android/tradefed/device/recovery/
DBatteryUnavailableDeviceRecovery.java20 import com.android.tradefed.device.TestDeviceState;
28 if (TestDeviceState.FASTBOOT.equals(device.getDeviceState())) { in shouldSkip()
/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()
DLogcatEventParserTest.java26 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/
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()

12