Lines Matching refs:device

95         final MtpDevice device = new MtpDevice(rawDevice);  in openDevice()  local
101 if (!device.open(connection)) { in openDevice()
108 device.getStorageIds(), in openDevice()
111 mDevices.put(deviceId, device); in openDevice()
125 for (UsbDevice device : mManager.getDeviceList().values()) { in getDevices()
126 if (!isMtpDevice(device)) { in getDevices()
129 devices.add(createDeviceRecord(device)); in getDevices()
135 final MtpDevice device = getDevice(deviceId); in getObjectInfo() local
136 synchronized (device) { in getObjectInfo()
138 device.getObjectInfo(objectHandle), in getObjectInfo()
145 final MtpDevice device = getDevice(deviceId); in getObjectHandles() local
146 synchronized (device) { in getObjectHandles()
148 device.getObjectHandles(storageId, 0 /* all format */, parentObjectHandle), in getObjectHandles()
155 final MtpDevice device = getDevice(deviceId); in getObject() local
156 synchronized (device) { in getObject()
158 device.getObject(objectHandle, expectedSize), in getObject()
165 final MtpDevice device = getDevice(deviceId); in getPartialObject() local
166 synchronized (device) { in getPartialObject()
167 return device.getPartialObject(objectHandle, offset, size, buffer); in getPartialObject()
173 final MtpDevice device = getDevice(deviceId); in getPartialObject64() local
174 synchronized (device) { in getPartialObject64()
175 return device.getPartialObject64(objectHandle, offset, size, buffer); in getPartialObject64()
180 final MtpDevice device = getDevice(deviceId); in getThumbnail() local
181 synchronized (device) { in getThumbnail()
183 device.getThumbnail(objectHandle), in getThumbnail()
189 final MtpDevice device = getDevice(deviceId); in deleteDocument() local
190 synchronized (device) { in deleteDocument()
191 if (!device.deleteObject(objectHandle)) { in deleteDocument()
199 final MtpDevice device = getDevice(deviceId); in createDocument() local
200 synchronized (device) { in createDocument()
201 final MtpObjectInfo sendObjectInfoResult = device.sendObjectInfo(objectInfo); in createDocument()
206 if (!device.sendObject(sendObjectInfoResult.getObjectHandle(), in createDocument()
216 final MtpDevice device = getDevice(deviceId); in getParent() local
217 synchronized (device) { in getParent()
218 final int result = (int) device.getParent(objectHandle); in getParent()
228 final MtpDevice device = getDevice(deviceId); in importFile() local
229 synchronized (device) { in importFile()
230 if (!device.importFile(objectHandle, target)) { in importFile()
238 final MtpDevice device = getDevice(deviceId); in readEvent() local
239 return device.readEvent(signal); in readEvent()
243 final MtpDevice device = getDevice(deviceId); in getObjectSizeLong() local
244 return device.getObjectSizeLong(objectHandle, format); in getObjectSizeLong()
254 final MtpDevice device = getDevice(deviceId); in getRoots() local
255 synchronized (device) { in getRoots()
257 ensureNotNull(device.getStorageIds(), "Failed to obtain storage IDs."); in getRoots()
260 final MtpStorageInfo info = device.getStorageInfo(storageIds[i]); in getRoots()
264 roots.add(new MtpRoot(device.getDeviceId(), info)); in getRoots()
270 private void setInitVersion(UsbDevice device) { in setInitVersion() argument
271 final MtpDevice mtpDevice = mDevices.get(device.getDeviceId()); in setInitVersion()
273 final String name = device.getProductName(); in setInitVersion()
292 private MtpDeviceRecord createDeviceRecord(UsbDevice device) { in createDeviceRecord() argument
293 final MtpDevice mtpDevice = mDevices.get(device.getDeviceId()); in createDeviceRecord()
295 final String name = device.getProductName(); in createDeviceRecord()
303 roots = getRoots(device.getDeviceId()); in createDeviceRecord()
320 device.getDeviceId(), name, device.getSerialNumber(), opened, roots, in createDeviceRecord()
324 static boolean isMtpDevice(UsbDevice device) { in isMtpDevice() argument
325 for (int i = 0; i < device.getInterfaceCount(); i++) { in isMtpDevice()
326 final UsbInterface usbInterface = device.getInterface(i); in isMtpDevice()