/tools/tradefederation/core/remote/src/com/android/tradefed/device/ |
D | DeviceAllocationEventHandler.java | 24 DeviceAllocationState handleDeviceEvent(DeviceEvent event); in handleDeviceEvent() 41 public DeviceAllocationState handleDeviceEvent(DeviceEvent event) { in handleDeviceEvent() 44 return DeviceAllocationState.Allocated; in handleDeviceEvent() 46 return DeviceAllocationState.Checking_Availability; in handleDeviceEvent() 48 return DeviceAllocationState.Unavailable; in handleDeviceEvent() 50 return DeviceAllocationState.Checking_Availability; in handleDeviceEvent() 52 return DeviceAllocationState.Unavailable; in handleDeviceEvent() 54 return DeviceAllocationState.Available; in handleDeviceEvent() 56 return DeviceAllocationState.Unknown; in handleDeviceEvent() 77 public DeviceAllocationState handleDeviceEvent(DeviceEvent event) { in handleDeviceEvent() [all …]
|
D | DeviceAllocationState.java | 21 public enum DeviceAllocationState implements DeviceAllocationEventHandler { enum 37 DeviceAllocationState(DeviceAllocationEventHandler eventHandler) { in DeviceAllocationState() method in DeviceAllocationState 42 public DeviceAllocationState handleDeviceEvent(DeviceEvent event) { in handleDeviceEvent()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | DeviceManagerTest.java | 308 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice() 326 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_match() 342 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_match_temporary() 347 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_match_temporary() 353 .andReturn(new DeviceEventResponse(DeviceAllocationState.Unknown, true)); in testAllocateDevice_match_temporary() 381 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_stubEmulator() 384 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_stubEmulator() 421 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator() 424 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testFreeDevice_emulator() 430 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator() [all …]
|
D | MockDeviceManager.java | 205 DeviceAllocationState.Allocated, DeviceAllocationState.Available); in freeDevice() 266 mDvcMon.notifyDeviceStateChange(d.getSerialNumber(), DeviceAllocationState.Available, in allocateDevice() 267 DeviceAllocationState.Allocated); in allocateDevice() 377 DeviceAllocationState.Available, in getDeviceDescriptor()
|
D | TestDeviceTest.java | 2480 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2483 assertEquals(DeviceAllocationState.Checking_Availability, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2486 assertEquals(DeviceAllocationState.Available, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2489 assertEquals(DeviceAllocationState.Allocated, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2492 assertEquals(DeviceAllocationState.Available, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2495 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2498 assertEquals(DeviceAllocationState.Allocated, mTestDevice.getAllocationState()); in testHandleAllocationEvent() 2501 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/cluster/ |
D | ClusterCommandSchedulerTest.java | 40 import com.android.tradefed.device.DeviceAllocationState; 246 String product, String variant, DeviceAllocationState state) { 251 String serial, String product, String variant, DeviceAllocationState state) { 259 deviceList.add(createDevice("product1", "variant1", DeviceAllocationState.Available)); 260 deviceList.add(createDevice("product2", "variant2", DeviceAllocationState.Available)); 261 deviceList.add(createDevice("product2", "variant2", DeviceAllocationState.Allocated)); 262 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Available)); 263 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Allocated)); 264 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Unavailable)); 283 deviceList.add(createDevice("product1", "variant1", DeviceAllocationState.Available)); [all …]
|
D | ClusterHostUtilTest.java | 21 import com.android.tradefed.device.DeviceAllocationState; 88 DeviceAllocationState.Available, in testGetDefaultRunTarget() 105 DeviceAllocationState.Available, in testGetDefaultRunTargetWithSameProductAndProductVariant() 122 DeviceAllocationState.Available, in testSimpleConstantRunTargetMatchPattern() 139 DeviceAllocationState.Available, in testDeviceTagRunTargetMatchPattern_simple() 158 DeviceAllocationState.Available, in testDeviceTagRunTargetMatchPattern_missingSerial() 176 DeviceAllocationState.Available, in testInvalidRunTargetMetachPattern() 201 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern() 227 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern_unknownProperty() 250 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern_productAndStub() [all …]
|
/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/ |
D | DeviceDescriptor.java | 21 import com.android.tradefed.device.DeviceAllocationState; 34 private final DeviceAllocationState mState; 52 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor() 59 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor() 86 DeviceAllocationState state, in DeviceDescriptor() 121 DeviceAllocationState state, in DeviceDescriptor() 157 DeviceAllocationState state, in DeviceDescriptor() 190 public DeviceDescriptor(DeviceDescriptor d, DeviceAllocationState state) { in DeviceDescriptor() 249 public DeviceAllocationState getState() { in getState()
|
D | ListDevicesOp.java | 19 import com.android.tradefed.device.DeviceAllocationState; 91 deviceList.add(new DeviceDescriptor(serial, isStubDevice, DeviceAllocationState in unpackResponseFromJson()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/recovery/ |
D | UsbResetMultiDeviceRecoveryTest.java | 27 import com.android.tradefed.device.DeviceAllocationState; 98 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Available); in testRecover_available() 111 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Unavailable); in testRecover_unavailable() 125 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Allocated); in testRecover_fastboot_allocated() 139 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Ignored); in testRecover_fastboot_unallocated() 164 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Unknown); in testRecover_notConnected()
|
D | RunConfigDeviceRecoveryTest.java | 23 import com.android.tradefed.device.DeviceAllocationState; 78 .andReturn(DeviceAllocationState.Allocated); in testRecoverDevice_allocated() 89 .andReturn(DeviceAllocationState.Available); in testRecoverDevice_offline() 109 .andReturn(DeviceAllocationState.Available); in testRecoverDevice_fastboot() 125 .andReturn(DeviceAllocationState.Available); in testRecoverDevice_run()
|
D | UsbResetRunConfigRecoveryTest.java | 22 import com.android.tradefed.device.DeviceAllocationState; 66 doReturn(DeviceAllocationState.Available).when(mockDevice).getAllocationState(); in testShouldSkip_available()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | DeviceManager.java | 451 if (r.stateChanged && r.allocationState == DeviceAllocationState.Available) { in checkAndAddAvailableDevice() 461 if (r.stateChanged && r.allocationState == DeviceAllocationState.Unavailable) { in checkAndAddAvailableDevice() 636 if (r.stateChanged && r.allocationState == DeviceAllocationState.Allocated) { in forceAllocateDevice() 859 if (r.stateChanged && r.allocationState == DeviceAllocationState.Allocated) { in connectToTcpDevice() 1158 if (desc.isStubDevice() && desc.getState() != DeviceAllocationState.Allocated) { in addDevicesInfo() 1206 DeviceAllocationState.Checking_Availability) { in deviceChanged() 1248 == DeviceAllocationState.Checking_Availability) { in deviceConnected()
|
D | ManagedDeviceList.java | 63 return r.stateChanged && r.allocationState == DeviceAllocationState.Allocated; in matches() 234 if (d == null || DeviceAllocationState.Unavailable.equals(d.getAllocationState())) { 285 if (r != null && r.allocationState == DeviceAllocationState.Unknown) {
|
D | NativeDevice.java | 211 private DeviceAllocationState mAllocationState = DeviceAllocationState.Unknown; 4006 public DeviceAllocationState getAllocationState() { in getAllocationState() 4022 DeviceAllocationState newState; in handleAllocationEvent() 4023 DeviceAllocationState oldState = mAllocationState; in handleAllocationEvent() 4502 if (DeviceAllocationState.Allocated.equals(getAllocationState())) { in getCachedDeviceDescriptor()
|
D | IDeviceMonitor.java | 60 public void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange() 61 DeviceAllocationState newState); in notifyDeviceStateChange()
|
D | DeviceMonitorMultiplexer.java | 56 public synchronized void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange() 57 DeviceAllocationState newState) { in notifyDeviceStateChange()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/ |
D | RemoteManagerFuncTest.java | 21 import com.android.tradefed.device.DeviceAllocationState; 201 DeviceAllocationState.Available, in testListDevices() 212 DeviceAllocationState.Allocated, in testListDevices() 230 assertEquals(DeviceAllocationState.Available, returnedDevices.get(0).getState()); in testListDevices() 238 assertEquals(DeviceAllocationState.Allocated, returnedDevices.get(1).getState()); in testListDevices()
|
/tools/tradefederation/core/src/com/android/tradefed/device/recovery/ |
D | UsbResetMultiDeviceRecovery.java | 24 import com.android.tradefed.device.DeviceAllocationState; 123 DeviceAllocationState state = device.getAllocationState(); in shouldReset() 124 return !DeviceAllocationState.Allocated.equals(state) in shouldReset() 125 && !DeviceAllocationState.Available.equals(state); in shouldReset()
|
D | UsbResetRunConfigRecovery.java | 19 import com.android.tradefed.device.DeviceAllocationState; 35 if (!res && DeviceAllocationState.Available.equals(device.getAllocationState())) { in shouldSkip()
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/ |
D | IManagedTestDevice.java | 31 final DeviceAllocationState allocationState; 35 DeviceEventResponse(DeviceAllocationState s, boolean b) { in DeviceEventResponse() 111 public DeviceAllocationState getAllocationState(); in getAllocationState()
|
/tools/tradefederation/core/src/com/android/tradefed/cluster/ |
D | ClusterDeviceMonitor.java | 23 import com.android.tradefed.device.DeviceAllocationState; 178 String serial, DeviceAllocationState oldState, DeviceAllocationState newState) { in notifyDeviceStateChange()
|
/tools/tradefederation/core/src/com/android/tradefed/command/ |
D | CommandScheduler.java | 48 import com.android.tradefed.device.DeviceAllocationState; 868 public void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange() 869 DeviceAllocationState newState) { in notifyDeviceStateChange() 870 if (newState.equals(DeviceAllocationState.Available)) { in notifyDeviceStateChange() 1841 if (DeviceAllocationState.Allocated.equals(deviceDesc.getState()) in handoverDevices()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | TargetSetupErrorTest.java | 22 import com.android.tradefed.device.DeviceAllocationState; 66 DeviceAllocationState.Allocated, in testSerialization_withIDevice()
|
D | InstrumentationPreparerTest.java | 25 import com.android.tradefed.device.DeviceAllocationState; 111 "SERIAL", false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", in testRun_testFailed()
|