Home
last modified time | relevance | path

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

123

/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/
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 …]
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 …]
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.aidl22 import android.hardware.usb.UsbDevice;
51 void setDevicePackage(in UsbDevice device, String packageName, int userId); in setDevicePackage()
59 …void addDevicePackagesToPreferenceDenied(in UsbDevice device, in String[] packageNames, in UserHan… in addDevicePackagesToPreferenceDenied()
65 …void removeDevicePackagesFromPreferenceDenied(in UsbDevice device, in String[] packageNames, in Us… in removeDevicePackagesFromPreferenceDenied()
72 …void setDevicePersistentPermission(in UsbDevice device, int uid, in UserHandle user, boolean shoul… in setDevicePersistentPermission()
79 boolean hasDevicePermission(in UsbDevice device, String packageName); in hasDevicePermission()
88 void requestDevicePermission(in UsbDevice device, String packageName, in PendingIntent pi); in requestDevicePermission()
98 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 …]
DUsbManager.java444 public HashMap<String,UsbDevice> getDeviceList() { in getDeviceList()
445 HashMap<String,UsbDevice> result = new HashMap<String,UsbDevice>(); in getDeviceList()
453 result.put(name, (UsbDevice)bundle.get(name)); in getDeviceList()
469 public UsbDeviceConnection openDevice(UsbDevice device) { in openDevice()
561 public boolean hasPermission(UsbDevice device) { in hasPermission()
616 public void requestPermission(UsbDevice device, PendingIntent pi) { in requestPermission()
658 public void grantPermission(UsbDevice device) { in grantPermission()
670 public void grantPermission(UsbDevice device, int uid) { in grantPermission()
688 public void grantPermission(UsbDevice device, String packageName) { in grantPermission()
DDeviceFilter.java72 public DeviceFilter(UsbDevice device) { in DeviceFilter()
184 public boolean matches(UsbDevice device) { in matches()
284 if (obj instanceof UsbDevice) { in equals()
285 UsbDevice device = (UsbDevice)obj; in equals()
DUsbDevice.aidl19 parcelable UsbDevice;
/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.java26 import android.hardware.usb.UsbDevice;
50 private UsbDevice mDevice;
89 mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
DUsbConfirmActivity.java29 import android.hardware.usb.UsbDevice;
53 private UsbDevice mDevice;
64 mDevice = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
DUsbPermissionActivity.java29 import android.hardware.usb.UsbDevice;
54 private UsbDevice mDevice;
67 mDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
/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/services/usb/java/com/android/server/usb/
DMtpNotificationManager.java29 import android.hardware.usb.UsbDevice;
75 void showNotification(UsbDevice device) { in showNotification()
117 final UsbDevice device = in onReceive()
118 intent.getExtras().<UsbDevice>getParcelable(UsbManager.EXTRA_DEVICE); in onReceive()
130 static boolean shouldShowNotification(PackageManager packageManager, UsbDevice device) { in shouldShowNotification()
136 private static boolean isMtpDevice(UsbDevice device) { in isMtpDevice()
155 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.java32 import android.hardware.usb.UsbDevice;
145 void removeDevicePermissions(@NonNull UsbDevice device) { in removeDevicePermissions()
157 void grantDevicePermission(@NonNull UsbDevice device, int uid) { in grantDevicePermission()
194 boolean hasPermission(@NonNull UsbDevice device, @NonNull String packageName, int pid, in hasPermission()
250 void setDevicePersistentPermission(@NonNull UsbDevice device, int uid, boolean isGranted) { in setDevicePersistentPermission()
501 void requestPermissionDialog(@Nullable UsbDevice device, in requestPermissionDialog()
651 public void checkPermission(UsbDevice device, String packageName, int pid, int uid) { in checkPermission()
665 private void requestPermissionDialog(@Nullable UsbDevice device, in requestPermissionDialog()
685 public void requestPermission(UsbDevice device, String packageName, PendingIntent pi, int pid, in requestPermission()
744 private boolean isCameraDevicePresent(UsbDevice device) { in isCameraDevicePresent()
DUsbHandlerManager.java27 import android.hardware.usb.UsbDevice;
85 void confirmUsbHandler(@NonNull ResolveInfo rInfo, @Nullable UsbDevice device, in confirmUsbHandler()
DUsbHostManager.java27 import android.hardware.usb.UsbDevice;
73 private final HashMap<String, UsbDevice> mDevices = new HashMap<>();
389 UsbDevice.Builder newDeviceBuilder = parser.toAndroidUsbDeviceBuilder(); in usbDeviceAdded()
398 UsbDevice newDevice = newDeviceBuilder.build(serialNumberReader); in usbDeviceAdded()
444 UsbDevice device = mDevices.remove(deviceAddress); in usbDeviceRemoved()
497 UsbDevice device = mDevices.get(deviceAddress); in openDevice()
/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/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/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