/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | NativeDeviceStateMonitor.java | 44 private TestDeviceState mDeviceState; 69 mDeviceState = TestDeviceState.getStateByDdms(device.getState()); in NativeDeviceStateMonitor() 103 if (waitForDeviceState(TestDeviceState.ONLINE, waitTime)) { in waitForDeviceOnline() 111 if (waitForDeviceState(TestDeviceState.RECOVERY, mDefaultOnlineTimeout)) { in waitForDeviceInRecovery() 151 boolean result = waitForDeviceState(TestDeviceState.NOT_AVAILABLE, waitTime); in waitForDeviceNotAvailable() 163 return waitForDeviceState(TestDeviceState.RECOVERY, waitTime); in waitForDeviceInRecovery() 169 return waitForDeviceState(TestDeviceState.SIDELOAD, waitTime); in waitForDeviceInSideload() 381 public TestDeviceState getDeviceState() { in getDeviceState() 414 TestDeviceState mode = TestDeviceState.FASTBOOT; in waitForDeviceBootloaderOrFastbootd() 416 mode = TestDeviceState.FASTBOOTD; in waitForDeviceBootloaderOrFastbootd() [all …]
|
D | WaitDeviceRecovery.java | 132 TestDeviceState state = monitor.getDeviceState(); in recoverDevice() 133 if (TestDeviceState.FASTBOOT.equals(state) || TestDeviceState.FASTBOOTD.equals(state)) { in recoverDevice() 280 } else if (monitor.getDeviceState() == TestDeviceState.ONLINE) { in recoverDeviceBootloader() 309 } else if (monitor.getDeviceState() == TestDeviceState.ONLINE) { in recoverDeviceFastbootd() 484 TestDeviceState state = monitor.getDeviceState(); in attemptDeviceUnavailableRecovery() 485 if (TestDeviceState.FASTBOOT.equals(state) || TestDeviceState.FASTBOOTD.equals(state)) { in attemptDeviceUnavailableRecovery() 510 if (TestDeviceState.RECOVERY.equals(monitor.getDeviceState())) { in attemptDeviceUnavailableRecovery()
|
D | DeviceManager.java | 698 managedDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in freeDevice() 724 if (TestDeviceState.NOT_AVAILABLE.equals(managedDevice.getDeviceState())) { in getEventFromFree() 752 if (!device.getDeviceState().equals(TestDeviceState.NOT_AVAILABLE)) { in launchEmulator() 755 device.getDeviceState(), TestDeviceState.NOT_AVAILABLE)); in launchEmulator() 1200 TestDeviceState newState = TestDeviceState.getStateByDdms(idevice.getState()); in deviceChanged() 1202 if (newState == TestDeviceState.ONLINE) { in deviceChanged() 1239 TestDeviceState newState = in deviceConnected() 1240 TestDeviceState.getStateByDdms(idevice.getState()); in deviceConnected() 1242 if (newState == TestDeviceState.ONLINE) { in deviceConnected() 1285 d.setDeviceState(TestDeviceState.NOT_AVAILABLE); in deviceDisconnected()
|
D | ManagedTestDeviceFactory.java | 79 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 86 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 99 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 116 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 134 testDevice.setDeviceState(TestDeviceState.FASTBOOTD); in createDevice() 136 testDevice.setDeviceState(TestDeviceState.FASTBOOT); in createDevice() 139 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice()
|
D | ManagedDeviceList.java | 141 TestDeviceState state = TestDeviceState.FASTBOOT; 143 state = TestDeviceState.FASTBOOTD; 151 d.setDeviceState(TestDeviceState.NOT_AVAILABLE);
|
D | NativeDevice.java | 195 private TestDeviceState mState = TestDeviceState.ONLINE; 473 if (!TestDeviceState.ONLINE.equals(getDeviceState())) { in getProperty() 2999 return TestDeviceState.FASTBOOT.equals(getDeviceState()) in isStateBootloaderOrFastbootd() 3000 || TestDeviceState.FASTBOOTD.equals(getDeviceState()); in isStateBootloaderOrFastbootd() 3754 public void setDeviceState(final TestDeviceState deviceState) { in setDeviceState() 3771 public TestDeviceState getDeviceState() { in getDeviceState() 4465 if (TestDeviceState.ONLINE.equals(getDeviceState())) { in postInvocationTearDown() 4796 if (!TestDeviceState.ONLINE.equals(mState)) { in getMacAddress()
|
/tools/tradefederation/core/remote/src/com/android/tradefed/device/ |
D | TestDeviceState.java | 26 public enum TestDeviceState { enum 55 static TestDeviceState getStateByDdms(DeviceState ddmsState) { in getStateByDdms() 57 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 62 return TestDeviceState.ONLINE; in getStateByDdms() 64 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 66 return TestDeviceState.RECOVERY; in getStateByDdms() 68 return TestDeviceState.SIDELOAD; in getStateByDdms() 70 return TestDeviceState.NOT_AVAILABLE; in getStateByDdms() 72 return TestDeviceState.FASTBOOT; in getStateByDdms() 74 return TestDeviceState.FASTBOOTD; in getStateByDdms() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | DeviceManagerTest.java | 591 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetIDevice() 592 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testSetIDevice() 622 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_excludeDevice() 651 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in testInit_includeDevice() 679 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_disconnected() 695 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testSetState_offline() 939 mMockTestDevice.setDeviceState(TestDeviceState.ONLINE); in setCheckAvailableDeviceExpectations() 960 .andReturn(TestDeviceState.NOT_AVAILABLE).times(2); in testFreeDevice_tcpDevice() 963 mMockTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice() 977 assertTrue(tcp.getDeviceState() == TestDeviceState.NOT_AVAILABLE); in testFreeDevice_tcpDevice() [all …]
|
D | WaitDeviceRecoveryTest.java | 80 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDevice_success() 100 EasyMock.expect(mMockMonitor.getDeviceState()).andStubReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDevice_unavailable() 117 EasyMock.expect(mMockMonitor.getDeviceState()).andStubReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDevice_unavailable_recovers() 138 EasyMock.expect(mMockMonitor.getDeviceState()).andStubReturn(TestDeviceState.RECOVERY); in testRecoverDevice_unavailable_recovery() 163 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.RECOVERY).times(3); in testRecoverDevice_unavailable_recovery_fail() 187 EasyMock.expect(mMockMonitor.getDeviceState()).andStubReturn(TestDeviceState.FASTBOOT); in testRecoverDevice_unavailable_fastboot() 220 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testRecoverDevice_unresponsive() 246 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testRecoverDevice_fastboot() 298 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testRecoverDeviceBootloader_unavailable() 325 EasyMock.expect(mMockMonitor.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testRecoverDeviceBootloader_online() [all …]
|
D | NativeDeviceTest.java | 1605 public TestDeviceState getDeviceState() { in testDoReboot() 1606 return TestDeviceState.ONLINE; in testDoReboot() 1624 public TestDeviceState getDeviceState() { in testDoReboot_skipped() 1631 return TestDeviceState.ONLINE; in testDoReboot_skipped() 1644 public TestDeviceState getDeviceState() { in testDoReboot_fastboot() 1645 return TestDeviceState.FASTBOOT; in testDoReboot_fastboot() 1666 public TestDeviceState getDeviceState() { in testRebootIntoSideload() 1667 return TestDeviceState.ONLINE; in testRebootIntoSideload() 1686 public TestDeviceState getDeviceState() { in testRebootIntoBootloader() 1687 return TestDeviceState.ONLINE; in testRebootIntoBootloader() [all …]
|
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 | TestDeviceFuncTest.java | 527 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 532 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 536 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_deviceInAdb() 555 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand() 566 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testExecuteFastbootCommand_badCommand() 580 assertEquals(TestDeviceState.FASTBOOT, mMonitor.getDeviceState()); in testRebootIntoBootloader() 583 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testRebootIntoBootloader() 592 assertEquals(TestDeviceState.ONLINE, mMonitor.getDeviceState()); in testReboot() 607 assertEquals(TestDeviceState.RECOVERY, mMonitor.getDeviceState()); in testRebootIntoRecovery()
|
D | DeviceStateMonitorTest.java | 70 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOnline() 76 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOnline() 89 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOnline_timeout() 122 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOffline_alreadyOffline() 132 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOffline() 138 mMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testWaitForDeviceOffline() 152 mMonitor.setState(TestDeviceState.ONLINE); in testWaitForDeviceOffline_timeout()
|
D | TestDeviceTest.java | 326 mRecoveryTestDevice.setDeviceState(TestDeviceState.FASTBOOT); in testGetProductType_fastboot() 347 mRecoveryTestDevice.setDeviceState(TestDeviceState.FASTBOOT); in testGetProductType_fastbootNonalpha() 369 mTestDevice.setDeviceState(TestDeviceState.FASTBOOT); in testGetProductType_fastbootFail() 982 mMockStateMonitor.setState(TestDeviceState.FASTBOOT); in testExecuteFastbootCommand_state() 983 mMockStateMonitor.setState(TestDeviceState.NOT_AVAILABLE); in testExecuteFastbootCommand_state() 988 mTestDevice.setDeviceState(TestDeviceState.FASTBOOT); in testExecuteFastbootCommand_state() 989 assertEquals(TestDeviceState.FASTBOOT, mTestDevice.getDeviceState()); in testExecuteFastbootCommand_state() 1009 mTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testExecuteFastbootCommand_state() 1010 assertEquals(TestDeviceState.FASTBOOT, mTestDevice.getDeviceState()); in testExecuteFastbootCommand_state() 1017 mTestDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testExecuteFastbootCommand_state() [all …]
|
D | ManagedDeviceListTest.java | 127 mockDevice.setDeviceState(TestDeviceState.FASTBOOT); in testUpdateFastbootState() 148 EasyMock.expect(mockDevice.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testUpdateFastbootState_gone() 149 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()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/presubmit/ |
D | DeviceStateTransitionFuncTests.java | 23 import com.android.tradefed.device.TestDeviceState; 45 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition() 47 assertEquals(TestDeviceState.FASTBOOT, getDevice().getDeviceState()); in testFastbootTransition() 50 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition() 54 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/ |
D | CommandSchedulerTest.java | 51 import com.android.tradefed.device.TestDeviceState; 356 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand() 873 mMockManager.setNumDevicesCustom(1, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailable() 893 mMockManager.setNumDevicesCustom(2, TestDeviceState.NOT_AVAILABLE, IDevice.class); in testDeviceReleased_unavailableMulti() 911 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleased() 929 mMockManager.setNumDevicesStub(2, TestDeviceState.NOT_AVAILABLE, new TcpDevice("serial")); in testTcpDevice_NotReleasedMulti() 948 mMockManager.setNumDevicesStub(1, TestDeviceState.NOT_AVAILABLE, stub); in testStubDevice_NotReleased() 1269 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand_versioning()
|
/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/ |
D | DeviceDescriptor.java | 22 import com.android.tradefed.device.TestDeviceState; 35 private final TestDeviceState mTestDeviceState; // Tradefed updated state. 158 TestDeviceState testDeviceState, in DeviceDescriptor() 253 public TestDeviceState getTestDeviceState() { in getTestDeviceState()
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | ScreenshotOnFailureCollector.java | 20 import com.android.tradefed.device.TestDeviceState; 51 TestDeviceState state = device.getDeviceState(); in shouldCollect() 52 if (!TestDeviceState.ONLINE.equals(state)) { in shouldCollect()
|
D | LogcatOnFailureCollector.java | 24 import com.android.tradefed.device.TestDeviceState; 161 TestDeviceState state = device.getDeviceState(); in shouldCollect() 162 if (!TestDeviceState.ONLINE.equals(state)) { in shouldCollect()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
D | UsbResetTest.java | 23 import com.android.tradefed.device.TestDeviceState; 57 TestDeviceState state = device.getDeviceState(); in run() 58 if (TestDeviceState.RECOVERY.equals(state) in run()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | ScreenshotOnFailureCollectorTest.java | 21 import com.android.tradefed.device.TestDeviceState; 69 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testCollect() 95 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.NOT_AVAILABLE); in testCollect_skipOffline()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | FastbootDeviceFlasherTest.java | 26 import com.android.tradefed.device.TestDeviceState; 152 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testGetCurrentSlot_fastboot() 165 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testGetCurrentSlot_adb() 181 EasyMock.expect(mMockDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE); in testGetCurrentSlot_null()
|
D | RunCommandTargetPreparerTest.java | 26 import com.android.tradefed.device.TestDeviceState; 47 private static final TestDeviceState ONLINE_STATE = TestDeviceState.ONLINE;
|