Lines Matching refs:device

44  * and notifies the application when the MTP device list changes.
58 // so we can inform when the device has been detached.
66 // unable to open the device.
128 * Called when a new device has been added
130 * @param device the new device that was added
132 public void deviceAdded(MtpDevice device);
135 * Called when a new device has been removed
137 * @param device the device that was removed
139 public void deviceRemoved(MtpDevice device);
146 * @param device the device to test
147 * @return true if the device is a PTP device.
149 static public boolean isCamera(UsbDevice device) {
150 int count = device.getInterfaceCount();
152 UsbInterface intf = device.getInterface(i);
180 * device and return an {@link android.mtp.MtpDevice} for it.
182 * @param usbDevice the device to open
183 * @return an MtpDevice for the device.
248 * Retrieves an {@link android.mtp.MtpDevice} object for the USB device
251 * @param deviceName the name of the USB device
261 * Retrieves an {@link android.mtp.MtpDevice} object for the USB device
264 * @param id the ID of the USB device
294 * for the MTP or PTP device with the given USB device name
296 * @param deviceName the name of the USB device
300 MtpDevice device = getDevice(deviceName);
301 if (device == null) {
304 int[] storageIds = device.getStorageIds();
312 MtpStorageInfo info = device.getStorageInfo(storageIds[i]);
324 * the MTP or PTP device with the given USB device name with the given
327 * @param deviceName the name of the USB device
332 MtpDevice device = getDevice(deviceName);
333 if (device == null) {
336 return device.getObjectInfo(objectHandle);
340 * Deletes an object on the MTP or PTP device with the given USB device name.
342 * @param deviceName the name of the USB device
347 MtpDevice device = getDevice(deviceName);
348 if (device == null) {
351 return device.deleteObject(objectHandle);
356 * on the MTP or PTP device with the given USB device name and given storage ID
362 * @param deviceName the name of the USB device
368 MtpDevice device = getDevice(deviceName);
369 if (device == null) {
376 int[] handles = device.getObjectHandles(storageId, 0, objectHandle);
384 MtpObjectInfo info = device.getObjectInfo(handles[i]);
397 * @param deviceName the name of the USB device containing the object
404 MtpDevice device = getDevice(deviceName);
405 if (device == null) {
408 return device.getObject(objectHandle, objectSize);
414 * @param deviceName the name of the USB device containing the object
419 MtpDevice device = getDevice(deviceName);
420 if (device == null) {
423 return device.getThumbnail(objectHandle);
429 * @param deviceName the name of the USB device containing the object
437 MtpDevice device = getDevice(deviceName);
438 if (device == null) {
441 return device.importFile(objectHandle, destPath);