Home
last modified time | relevance | path

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

/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/
DDeviceUtilStatsMonitorTest.java65 DeviceAllocationState.Available)); in testOnlyAvailable()
80 DeviceAllocationState.Allocated)); in testOnlyAllocated()
97 DeviceAllocationState.Allocated)); in testExceededSamples()
98 …ct(mMockDeviceManager.listAllDevices()).andReturn(buildDeviceList(DeviceAllocationState.Available)… in testExceededSamples()
99 …ct(mMockDeviceManager.listAllDevices()).andReturn(buildDeviceList(DeviceAllocationState.Available)… in testExceededSamples()
121 DeviceAllocationState.Allocated)); in testMissingDevice()
145 private List<DeviceDescriptor> buildDeviceList(DeviceAllocationState... states) { in buildDeviceList()
157 private DeviceDescriptor createDeviceDesc(String serial, DeviceAllocationState state) { in createDeviceDesc()
DDeviceManagerTest.java287 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice()
304 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_match()
319 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_stubEmulator()
322 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_stubEmulator()
338 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator()
341 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testFreeDevice_emulator()
347 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator()
349 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testFreeDevice_emulator()
374 .andReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_nullDevice()
376 .andReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_nullDevice()
[all …]
DDeviceUtilStatsMonitorLoadTest.java68 … DeviceDescriptor device = createDeviceDesc("serial" + i, DeviceAllocationState.Allocated); in testManyRecords()
86 private DeviceDescriptor createDeviceDesc(String serial, DeviceAllocationState state) { in createDeviceDesc()
DMockDeviceManager.java205 DeviceAllocationState.Allocated, DeviceAllocationState.Available); in freeDevice()
260 mDvcMon.notifyDeviceStateChange(d.getSerialNumber(), DeviceAllocationState.Available, in allocateDevice()
261 DeviceAllocationState.Allocated); in allocateDevice()
DManagedDeviceListTest.java142 DeviceEventResponse der = new DeviceEventResponse(DeviceAllocationState.Unknown, true); in testUpdateFastbootState_gone()
DTestDeviceTest.java1942 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1945 assertEquals(DeviceAllocationState.Checking_Availability, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1948 assertEquals(DeviceAllocationState.Available, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1951 assertEquals(DeviceAllocationState.Allocated, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1954 assertEquals(DeviceAllocationState.Available, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1957 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1960 assertEquals(DeviceAllocationState.Allocated, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
1963 assertEquals(DeviceAllocationState.Unknown, mTestDevice.getAllocationState()); in testHandleAllocationEvent()
/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/
DDeviceDescriptor.java21 import com.android.tradefed.device.DeviceAllocationState;
31 private final DeviceAllocationState mState;
43 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor()
50 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor()
75 DeviceAllocationState state, in DeviceDescriptor()
114 public DeviceAllocationState getState() { in getState()
/tools/tradefederation/core/src/com/android/tradefed/device/
DIManagedTestDevice.java31 final DeviceAllocationState allocationState;
35 DeviceEventResponse(DeviceAllocationState s, boolean b) { in DeviceEventResponse()
105 public DeviceAllocationState getAllocationState(); in getAllocationState()
DIDeviceMonitor.java58 public void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
59 DeviceAllocationState newState); in notifyDeviceStateChange()
DDeviceUtilStatsMonitor.java119 public void addSample(DeviceAllocationState state) { in addSample()
120 if (DeviceAllocationState.Allocated.equals(state)) { in addSample()
243 public synchronized void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
244 DeviceAllocationState newState) { in notifyDeviceStateChange()
249 if (DeviceAllocationState.Allocated.equals(newState)) { in notifyDeviceStateChange()
DDeviceMonitorMultiplexer.java56 public synchronized void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
57 DeviceAllocationState newState) { in notifyDeviceStateChange()
DManagedDeviceList.java59 return r.stateChanged && r.allocationState == DeviceAllocationState.Allocated; in matches()
224 if (d == null || DeviceAllocationState.Unavailable.equals(d.getAllocationState())) {
258 if (r != null && r.allocationState == DeviceAllocationState.Unknown) {
DDeviceDiagTest.java65 if (deviceDesc.getState() == DeviceAllocationState.Unavailable) { in getUnavailableDevices()
DDeviceManager.java389 if (r.stateChanged && r.allocationState == DeviceAllocationState.Available) { in checkAndAddAvailableDevice()
399 if (r.stateChanged && r.allocationState == DeviceAllocationState.Unavailable) { in checkAndAddAvailableDevice()
509 if (r.stateChanged && r.allocationState == DeviceAllocationState.Allocated) { in forceAllocateDevice()
988 desc.getState() != DeviceAllocationState.Allocated) { in addDevicesInfo()
1032 DeviceAllocationState.Checking_Availability) { in deviceChanged()
1074 == DeviceAllocationState.Checking_Availability) { in deviceConnected()
DNativeDevice.java200 private DeviceAllocationState mAllocationState = DeviceAllocationState.Unknown;
3427 public DeviceAllocationState getAllocationState() { in getAllocationState()
3443 DeviceAllocationState newState; in handleAllocationEvent()
3444 DeviceAllocationState oldState = mAllocationState; in handleAllocationEvent()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DInstrumentationPreparerTest.java22 import com.android.tradefed.device.DeviceAllocationState;
78 false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", "unknown", in testRun()
106 "SERIAL", false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", in testRun_testFailed()
DSdkAvdPreparerTest.java22 import com.android.tradefed.device.DeviceAllocationState;
155 false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", "unknown", in testSetUp_noAvdName()
184 false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", "unknown", in testSetUp_failedBoot()
210 false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", "unknown", in testSetUp_failedCreateAvd()
DDeviceFlashPreparerTest.java27 import com.android.tradefed.device.DeviceAllocationState;
185 new DeviceDescriptor("SERIAL", false, DeviceAllocationState.Available, "unknown", in testSetup_buildError()
DKernelFlashPreparerTest.java25 import com.android.tradefed.device.DeviceAllocationState;
207 false, DeviceAllocationState.Available, "unknown", "unknown", "unknown", "unknown", in testSetup_builderror()
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/
DRemoteManagerFuncTest.java21 import com.android.tradefed.device.DeviceAllocationState;
202 DeviceAllocationState.Available, in testListDevices()
213 DeviceAllocationState.Allocated, in testListDevices()
231 assertEquals(DeviceAllocationState.Available, returnedDevices.get(0).getState()); in testListDevices()
239 assertEquals(DeviceAllocationState.Allocated, returnedDevices.get(1).getState()); in testListDevices()
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DTestInvocationTest.java42 import com.android.tradefed.device.DeviceAllocationState;
205 mFakeDescriptor = new DeviceDescriptor(SERIAL, false, DeviceAllocationState.Available, in setUp()