Home
last modified time | relevance | path

Searched refs:usbDevice (Results 1 – 9 of 9) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/stylus/
DUsbStylusBroadcastReceiverTest.java61 final UsbDevice usbDevice = mock(UsbDevice.class); in onReceive_usbDeviceAttachedStylus_invokeCallback() local
64 intent.putExtra(UsbManager.EXTRA_DEVICE, usbDevice); in onReceive_usbDeviceAttachedStylus_invokeCallback()
68 verify(mListener).onUsbStylusConnectionChanged(usbDevice, true); in onReceive_usbDeviceAttachedStylus_invokeCallback()
75 final UsbDevice usbDevice = mock(UsbDevice.class); in onReceive_usbDeviceDetachedStylus_invokeCallback() local
78 intent.putExtra(UsbManager.EXTRA_DEVICE, usbDevice); in onReceive_usbDeviceDetachedStylus_invokeCallback()
82 verify(mListener).onUsbStylusConnectionChanged(usbDevice, false); in onReceive_usbDeviceDetachedStylus_invokeCallback()
89 final UsbDevice usbDevice = mock(UsbDevice.class); in onReceive_usbDeviceAttachedNotStylus_doesNotInvokeCallback() local
92 intent.putExtra(UsbManager.EXTRA_DEVICE, usbDevice); in onReceive_usbDeviceAttachedNotStylus_doesNotInvokeCallback()
103 final UsbDevice usbDevice = mock(UsbDevice.class); in onReceive_usbDeviceStateStylus_invokeCallback() local
106 intent.putExtra(UsbManager.EXTRA_DEVICE, usbDevice); in onReceive_usbDeviceStateStylus_invokeCallback()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DMtpClient.java72 UsbDevice usbDevice = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
73 String deviceName = usbDevice.getDeviceName();
80 mtpDevice = openDeviceLocked(usbDevice);
103 mtpDevice = openDeviceLocked(usbDevice);
183 private MtpDevice openDeviceLocked(UsbDevice usbDevice) { in openDeviceLocked() argument
184 String deviceName = usbDevice.getDeviceName(); in openDeviceLocked()
188 if (isCamera(usbDevice) && !mIgnoredDevices.contains(deviceName) in openDeviceLocked()
190 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()
191 mUsbManager.requestPermission(usbDevice, mPermissionIntent); in openDeviceLocked()
194 UsbDeviceConnection connection = mUsbManager.openDevice(usbDevice); in openDeviceLocked()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DMtpClient.java75 UsbDevice usbDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
76 String deviceName = usbDevice.getDeviceName();
83 mtpDevice = openDeviceLocked(usbDevice);
106 mtpDevice = openDeviceLocked(usbDevice);
185 private MtpDevice openDeviceLocked(UsbDevice usbDevice) { in openDeviceLocked() argument
186 String deviceName = usbDevice.getDeviceName(); in openDeviceLocked()
190 if (isCamera(usbDevice) && !mIgnoredDevices.contains(deviceName) in openDeviceLocked()
192 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()
193 mUsbManager.requestPermission(usbDevice, mPermissionIntent); in openDeviceLocked()
196 UsbDeviceConnection connection = mUsbManager.openDevice(usbDevice); in openDeviceLocked()
[all …]
/packages/apps/Settings/src/com/android/settings/connecteddevice/stylus/
DStylusUsbFirmwareController.java127 UsbDevice usbDevice = devices.get(0); in getStylusUsbDevice() local
128 if (hasUsbStylusFirmwareUpdateFeature(usbDevice)) { in getStylusUsbDevice()
129 return usbDevice; in getStylusUsbDevice()
134 static boolean hasUsbStylusFirmwareUpdateFeature(UsbDevice usbDevice) { in hasUsbStylusFirmwareUpdateFeature() argument
135 if (usbDevice == null) return false; in hasUsbStylusFirmwareUpdateFeature()
140 return featureProvider.isUsbFirmwareUpdateEnabled(usbDevice); in hasUsbStylusFirmwareUpdateFeature()
DUsbStylusBroadcastReceiver.java63 UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE, UsbDevice.class); in onReceive() local
64 if (StylusUsbFirmwareController.hasUsbStylusFirmwareUpdateFeature(usbDevice)) { in onReceive()
65 mUsbConnectionListener.onUsbStylusConnectionChanged(usbDevice, in onReceive()
DStylusFeatureProvider.java36 boolean isUsbFirmwareUpdateEnabled(UsbDevice usbDevice); in isUsbFirmwareUpdateEnabled() argument
47 List<Preference> getUsbFirmwareUpdatePreferences(Context context, UsbDevice usbDevice); in getUsbFirmwareUpdatePreferences() argument
DStylusFeatureProviderImpl.java30 public boolean isUsbFirmwareUpdateEnabled(UsbDevice usbDevice) { in isUsbFirmwareUpdateEnabled() argument
35 public List<Preference> getUsbFirmwareUpdatePreferences(Context context, UsbDevice usbDevice) { in getUsbFirmwareUpdatePreferences() argument
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbHostController.java159 private static String generateTitle(Context context, UsbDevice usbDevice) { in generateTitle() argument
160 String manufacturer = usbDevice.getManufacturerName(); in generateTitle()
161 String product = usbDevice.getProductName(); in generateTitle()
303 UsbDevice usbDevice, UsbDeviceSettings usbDeviceSettings, in UsbHostControllerHandlerDispatchData() argument
305 mUsbDevice = usbDevice; in UsbHostControllerHandlerDispatchData()
/packages/modules/adb/client/
Dusb_osx.cpp147 io_service_t usbDevice; in AndroidInterfaceAdded() local
199 kr = (*iface)->GetDevice(iface, &usbDevice); in AndroidInterfaceAdded()
200 if (kIOReturnSuccess != kr || !usbDevice) { in AndroidInterfaceAdded()
209 kr = IOCreatePlugInInterfaceForService(usbDevice, in AndroidInterfaceAdded()
214 (void)IOObjectRelease(usbDevice); in AndroidInterfaceAdded()