Home
last modified time | relevance | path

Searched refs:UsbDevice (Results 1 – 25 of 68) sorted by relevance

123

/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/
DUsbUtil.java22 import android.hardware.usb.UsbDevice;
32 public static LinkedList<UsbDevice> findAllPossibleAndroidDevices(UsbManager usbManager) { in findAllPossibleAndroidDevices()
33 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in findAllPossibleAndroidDevices()
34 LinkedList<UsbDevice> androidDevices = null; in findAllPossibleAndroidDevices()
35 for (UsbDevice device : devices.values()) { in findAllPossibleAndroidDevices()
46 public static boolean possiblyAndroid(UsbDevice device) { in possiblyAndroid()
61 public static boolean isTheSameDevice(UsbDevice l, UsbDevice r) { in isTheSameDevice()
70 public static boolean isDevicesMatching(UsbDevice l, UsbDevice r) { in isDevicesMatching()
78 public static boolean isDeviceConnected(UsbManager usbManager, UsbDevice device) { in isDeviceConnected()
79 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in isDeviceConnected()
[all …]
DUsbDeviceStateController.java22 import android.hardware.usb.UsbDevice;
38 void onDeviceResetComplete(UsbDevice device); in onDeviceResetComplete()
39 void onAoapStartComplete(UsbDevice devie); in onAoapStartComplete()
56 private final LinkedList<UsbDevice> mDevicesRemoved = new LinkedList<>();
57 private final LinkedList<UsbDevice> mDevicesAdded = new LinkedList<>();
102 public void startDeviceReset(UsbDevice device) { in startDeviceReset()
110 private void doHandleDeviceReset(UsbDevice device) { in doHandleDeviceReset()
112 UsbDevice completedDevice = null; in doHandleDeviceReset()
135 UsbDevice device = request.device; in doHandleAoapStart()
167 private UsbDevice resetUsbDeviceAndConfirmModeChange(UsbDevice device) { in resetUsbDeviceAndConfirmModeChange()
[all …]
DUsbHostManagementActivity.java27 import android.hardware.usb.UsbDevice;
61 private UsbDevice mUsbDevice = null;
80 mUsbDevice = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
84 LinkedList<UsbDevice> devices = UsbUtil.findAllPossibleAndroidDevices(usbManager); in onCreate()
135 private void startAoap(UsbDevice device) { in startAoap()
141 private void startAoapActivity(UsbDevice device) { in startAoapActivity()
162 private void resetDevice(UsbDevice device) { in resetDevice()
169 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in dumpUsbDevices()
172 for (UsbDevice device : devices.values()) { in dumpUsbDevices()
186 private void handleUsbDeviceAttached(UsbDevice device) { in handleUsbDeviceAttached()
[all …]
DAoapInterface.java19 import android.hardware.usb.UsbDevice;
128 public static boolean isDeviceInAoapMode(UsbDevice device) { in isDeviceInAoapMode()
/frameworks/base/core/java/android/hardware/usb/
DIUsbManager.aidl24 import android.hardware.usb.UsbDevice;
53 void setDevicePackage(in UsbDevice device, String packageName, int userId); in setDevicePackage()
61 …void addDevicePackagesToPreferenceDenied(in UsbDevice device, in String[] packageNames, in UserHan… in addDevicePackagesToPreferenceDenied()
67 …void removeDevicePackagesFromPreferenceDenied(in UsbDevice device, in String[] packageNames, in Us… in removeDevicePackagesFromPreferenceDenied()
74 …void setDevicePersistentPermission(in UsbDevice device, int uid, in UserHandle user, boolean shoul… in setDevicePersistentPermission()
81 boolean hasDevicePermission(in UsbDevice device, String packageName); in hasDevicePermission()
87 boolean hasDevicePermissionWithIdentity(in UsbDevice device, String packageName, in hasDevicePermissionWithIdentity()
103 void requestDevicePermission(in UsbDevice device, String packageName, in PendingIntent pi); in requestDevicePermission()
114 void grantDevicePermission(in UsbDevice device, int uid); in grantDevicePermission()
DUsbDevice.java49 public class UsbDevice implements Parcelable { class
80 private UsbDevice(@NonNull String name, int vendorId, int productId, int Class, int subClass, in UsbDevice() method in UsbDevice
312 if (o instanceof UsbDevice) { in equals()
313 return ((UsbDevice)o).mName.equals(mName); in equals()
347 public static final @android.annotation.NonNull Parcelable.Creator<UsbDevice> CREATOR =
348 new Parcelable.Creator<UsbDevice>() {
349 public UsbDevice createFromParcel(Parcel in) {
369 UsbDevice device = new UsbDevice(name, vendorId, productId, clasz, subClass, protocol,
377 public UsbDevice[] newArray(int size) {
378 return new UsbDevice[size];
[all …]
DDeviceFilter.java78 public DeviceFilter(UsbDevice device) { in DeviceFilter()
206 public boolean matches(UsbDevice device) { in matches()
306 if (obj instanceof UsbDevice) { in equals()
307 UsbDevice device = (UsbDevice)obj; in equals()
DUsbDevice.aidl19 parcelable UsbDevice;
/frameworks/base/core/tests/coretests/src/android/accessibilityservice/
DBrailleDisplayControllerImplTest.java27 import android.hardware.usb.UsbDevice;
95 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in connect_withUsbDevice_callsConnectUsbBrailleDisplay()
105 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in connect_serviceNotConnected_throwsIllegalStateException()
115 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in connect_HidrawNotSupported_callsOnConnectionFailed()
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DUsbDisconnectedReceiver.java25 import android.hardware.usb.UsbDevice;
32 private UsbDevice mDevice;
35 public UsbDisconnectedReceiver(Activity activity, UsbDevice device) { in UsbDisconnectedReceiver()
55 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
DUsbResolverActivity.java27 import android.hardware.usb.UsbDevice;
52 private UsbDevice mDevice;
94 mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
/frameworks/base/services/usb/java/com/android/server/usb/
DMtpNotificationManager.java29 import android.hardware.usb.UsbDevice;
76 void showNotification(UsbDevice device) { in showNotification()
119 final UsbDevice device = in onReceive()
120 …intent.getExtras().<UsbDevice>getParcelable(UsbManager.EXTRA_DEVICE, android.hardware.usb.UsbDevic… in onReceive()
132 static boolean shouldShowNotification(PackageManager packageManager, UsbDevice device) { in shouldShowNotification()
138 private static boolean isMtpDevice(UsbDevice device) { in isMtpDevice()
157 void onOpenInApp(UsbDevice device); in onOpenInApp()
DUsbSerialReader.java26 import android.hardware.usb.UsbDevice;
96 if (mDevice instanceof UsbDevice) { in getSerial()
98 .checkPermission((UsbDevice) mDevice, packageName, pid, uid); in getSerial()
DUsbUserPermissionManager.java33 import android.hardware.usb.UsbDevice;
150 void removeDevicePermissions(@NonNull UsbDevice device) { in removeDevicePermissions()
162 void grantDevicePermission(@NonNull UsbDevice device, int uid) { in grantDevicePermission()
199 boolean hasPermission(@NonNull UsbDevice device, @NonNull String packageName, int pid, in hasPermission()
275 void setDevicePersistentPermission(@NonNull UsbDevice device, int uid, boolean isGranted) { in setDevicePersistentPermission()
524 void requestPermissionDialog(@Nullable UsbDevice device, in requestPermissionDialog()
675 public void checkPermission(UsbDevice device, String packageName, int pid, int uid) { in checkPermission()
689 private void requestPermissionDialog(@Nullable UsbDevice device, in requestPermissionDialog()
716 public void requestPermission(UsbDevice device, String packageName, PendingIntent pi, int pid, in requestPermission()
DUsbHandlerManager.java27 import android.hardware.usb.UsbDevice;
85 void confirmUsbHandler(@NonNull ResolveInfo rInfo, @Nullable UsbDevice device, in confirmUsbHandler()
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestHost/src/com/android/hardware/usb/aoaphosttest/
DUsbAoapHostTestActivity.java25 import android.hardware.usb.UsbDevice;
45 private UsbDevice mUsbDevice;
91 private static boolean isDevicesMatching(UsbDevice l, UsbDevice r) { in isDevicesMatching()
101 private final UsbDevice mDevice;
107 private ReaderThread(UsbDevice device, UsbDeviceConnection conn) { in ReaderThread()
158 UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
/frameworks/base/tests/UsbManagerTests/src/android/hardware/usb/
DDeviceFilterTest.java96 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in testConstructorFromUsbDevice_interfaceNameIsNull()
178 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in testMatch_interfaceNameMatches_returnTrue()
196 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in testMatch_interfaceNameMismatch_returnFalse()
215 UsbDevice usbDevice = Mockito.mock(UsbDevice.class); in testMatch_interfaceNameMismatchFlagDisabled_returnTrue()
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/
DDeviceDisconnectedReceiver.java24 import android.hardware.usb.UsbDevice;
45 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
DMtpClient.java25 import android.hardware.usb.UsbDevice;
67 UsbDevice usbDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
135 static public boolean isCamera(UsbDevice device) { in isCamera()
171 private MtpDevice openDeviceLocked(UsbDevice usbDevice) { in openDeviceLocked()
243 return mDevices.get(UsbDevice.getDeviceName(id)); in getDevice()
256 for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) { in getDeviceList()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DSinkActivity.java28 import android.hardware.usb.UsbDevice;
76 private UsbDevice mDevice;
124 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
129 Map<String, UsbDevice> devices = mUsbManager.getDeviceList(); in onCreate()
131 for (UsbDevice device : devices.values()) { in onCreate()
145 private void onDeviceAttached(UsbDevice device) { in onDeviceAttached()
152 private void onDeviceDetached(UsbDevice device) { in onDeviceDetached()
159 private void connect(UsbDevice device) { in connect()
464 private static boolean isAccessory(UsbDevice device) { in isAccessory()
490 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
/frameworks/base/core/java/android/accessibilityservice/
DBrailleDisplayController.java27 import android.hardware.usb.UsbDevice;
203 void connect(@NonNull UsbDevice usbDevice, in connect()
228 void connect(@NonNull UsbDevice usbDevice, in connect()
DBrailleDisplayControllerImpl.java24 import android.hardware.usb.UsbDevice;
104 public void connect(@NonNull UsbDevice usbDevice, in connect()
110 public void connect(@NonNull UsbDevice usbDevice, in connect()
/frameworks/base/services/usb/java/com/android/server/usb/descriptors/
DUsbDeviceDescriptor.java19 import android.hardware.usb.UsbDevice;
137 public UsbDevice.Builder toAndroid(UsbDescriptorParser parser) { in toAndroid()
160 return new UsbDevice.Builder(parser.getDeviceAddr(), mVendorID, in toAndroid()
/frameworks/base/media/java/android/mtp/
DMtpDevice.java22 import android.hardware.usb.UsbDevice;
44 private final UsbDevice mDevice;
65 public MtpDevice(@NonNull UsbDevice device) { in MtpDevice()
/frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Settings/
Ddevice_for_input_source.pfw294 conf: UsbDevice
295 AvailableInputDevices Includes UsbDevice
479 conf: UsbDevice
480 AvailableInputDevices Includes UsbDevice
596 conf: UsbDevice
598 AvailableInputDevices Includes UsbDevice

123