Home
last modified time | relevance | path

Searched refs:DeviceAllocationState (Results 1 – 25 of 34) sorted by relevance

12

/tools/tradefederation/core/remote/src/com/android/tradefed/device/
DDeviceAllocationEventHandler.java24 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 …]
DDeviceAllocationState.java21 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/
DDeviceManagerTest.java308 .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 …]
DMockDeviceManager.java205 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()
DTestDeviceTest.java2480 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/
DClusterCommandSchedulerTest.java40 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 …]
DClusterHostUtilTest.java21 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/
DDeviceDescriptor.java21 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()
DListDevicesOp.java19 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/
DUsbResetMultiDeviceRecoveryTest.java27 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()
DRunConfigDeviceRecoveryTest.java23 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()
DUsbResetRunConfigRecoveryTest.java22 import com.android.tradefed.device.DeviceAllocationState;
66 doReturn(DeviceAllocationState.Available).when(mockDevice).getAllocationState(); in testShouldSkip_available()
/tools/tradefederation/core/src/com/android/tradefed/device/
DDeviceManager.java451 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()
DManagedDeviceList.java63 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) {
DNativeDevice.java211 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()
DIDeviceMonitor.java60 public void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
61 DeviceAllocationState newState); in notifyDeviceStateChange()
DDeviceMonitorMultiplexer.java56 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/
DRemoteManagerFuncTest.java21 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/
DUsbResetMultiDeviceRecovery.java24 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()
DUsbResetRunConfigRecovery.java19 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/
DIManagedTestDevice.java31 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/
DClusterDeviceMonitor.java23 import com.android.tradefed.device.DeviceAllocationState;
178 String serial, DeviceAllocationState oldState, DeviceAllocationState newState) { in notifyDeviceStateChange()
/tools/tradefederation/core/src/com/android/tradefed/command/
DCommandScheduler.java48 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/
DTargetSetupErrorTest.java22 import com.android.tradefed.device.DeviceAllocationState;
66 DeviceAllocationState.Allocated, in testSerialization_withIDevice()
DInstrumentationPreparerTest.java25 import com.android.tradefed.device.DeviceAllocationState;
111 "SERIAL", false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", in testRun_testFailed()

12