/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/ |
D | UsbHostManagementActivity.java | 82 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate() local 84 LinkedList<UsbDevice> devices = UsbUtil.findAllPossibleAndroidDevices(usbManager); in onCreate() 130 mUsbDeviceStateController = new UsbDeviceStateController(this, this, usbManager); in onCreate() 154 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in startAoapActivity() local 155 usbManager.grantPermission(device, uid); in startAoapActivity() 168 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in dumpUsbDevices() local 169 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in dumpUsbDevices() 191 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in handleUsbDeviceAttached() local 192 if (!UsbUtil.isDeviceConnected(usbManager, mUsbDevice)) { in handleUsbDeviceAttached()
|
D | UsbUtil.java | 32 public static LinkedList<UsbDevice> findAllPossibleAndroidDevices(UsbManager usbManager) { in findAllPossibleAndroidDevices() argument 33 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in findAllPossibleAndroidDevices() 78 public static boolean isDeviceConnected(UsbManager usbManager, UsbDevice device) { in isDeviceConnected() argument 79 HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in isDeviceConnected()
|
D | UsbDeviceStateController.java | 61 UsbManager usbManager) { in UsbDeviceStateController() argument 64 mUsbManager = usbManager; in UsbDeviceStateController()
|
/frameworks/base/services/core/java/com/android/server/display/notifications/ |
D | ConnectedDisplayUsbErrorsDetector.java | 93 final var usbManager = mInjector.getUsbManager(); in registerListener() local 94 if (usbManager == null) { in registerListener() 102 usbManager.registerDisplayPortAltModeInfoListener(mContext.getMainExecutor(), this); in registerListener()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
D | AccessibilityServiceConnectionTest.java | 382 UsbManager usbManager = Mockito.mock(UsbManager.class); in connectUsbBrailleDisplay() local 383 when(mMockContext.getSystemService(Context.USB_SERVICE)).thenReturn(usbManager); in connectUsbBrailleDisplay() 384 when(usbManager.hasPermission(eq(usbDevice), eq(COMPONENT_NAME.getPackageName()), in connectUsbBrailleDisplay() 399 UsbManager usbManager = Mockito.mock(UsbManager.class); in connectUsbBrailleDisplay_throwsForMissingUsbPermission() local 400 when(mMockContext.getSystemService(Context.USB_SERVICE)).thenReturn(usbManager); in connectUsbBrailleDisplay_throwsForMissingUsbPermission() 401 when(usbManager.hasPermission(notNull(), eq(COMPONENT_NAME.getPackageName()), in connectUsbBrailleDisplay_throwsForMissingUsbPermission() 420 UsbManager usbManager = Mockito.mock(UsbManager.class); in connectUsbBrailleDisplay_callsOnConnectionFailedForEmptySerialNumber() local 421 when(mMockContext.getSystemService(Context.USB_SERVICE)).thenReturn(usbManager); in connectUsbBrailleDisplay_callsOnConnectionFailedForEmptySerialNumber() 422 when(usbManager.hasPermission(notNull(), eq(COMPONENT_NAME.getPackageName()), in connectUsbBrailleDisplay_callsOnConnectionFailedForEmptySerialNumber()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/ |
D | AppUtils.java | 68 IUsbManager usbManager, PackageManager pm, Context context) { in getLaunchByDefaultSummary() argument 71 || hasUsbDefaults(usbManager, packageName); in getLaunchByDefaultSummary() 81 public static boolean hasUsbDefaults(IUsbManager usbManager, String packageName) { in hasUsbDefaults() argument 83 if (usbManager != null) { in hasUsbDefaults() 84 return usbManager.hasDefaults(packageName, UserHandle.myUserId()); in hasUsbDefaults()
|
/frameworks/base/core/java/android/hardware/usb/ |
D | ParcelableUsbPort.java | 81 public @NonNull UsbPort getUsbPort(@NonNull UsbManager usbManager) { in getUsbPort() argument 82 return new UsbPort(usbManager, mId, mSupportedModes, mSupportedContaminantProtectionModes, in getUsbPort()
|
D | UsbPort.java | 281 public UsbPort(@NonNull UsbManager usbManager, @NonNull String id, int supportedModes, in UsbPort() argument 285 this(usbManager, id, supportedModes, supportedContaminantProtectionModes, in UsbPort() 292 public UsbPort(@NonNull UsbManager usbManager, @NonNull String id, int supportedModes, in UsbPort() argument 302 mUsbManager = usbManager; in UsbPort()
|
/frameworks/base/cmds/svc/src/com/android/commands/svc/ |
D | UsbCommand.java | 88 UsbManager usbManager = context.getSystemService(UsbManager.class); in run() local 173 List<UsbPort> ports = usbManager.getPorts(); in run()
|
/frameworks/base/core/java/android/app/ |
D | ForegroundServiceTypePolicy.java | 1269 final UsbManager usbManager = context.getSystemService(UsbManager.class); in checkPermission() local 1270 final HashMap<String, UsbDevice> devices = usbManager.getDeviceList(); in checkPermission() 1273 if (usbManager.hasPermission(device, packageName, callerPid, callerUid)) { in checkPermission() 1295 final UsbManager usbManager = context.getSystemService(UsbManager.class); in checkPermission() local 1296 final UsbAccessory[] accessories = usbManager.getAccessoryList(); in checkPermission() 1299 if (usbManager.hasPermission(accessory, callerPid, callerUid)) { in checkPermission()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/ |
D | AccessibilityServiceConnection.java | 749 final UsbManager usbManager = (UsbManager) mContext.getSystemService(Context.USB_SERVICE); in connectUsbBrailleDisplay() local 755 if (usbManager == null || !usbManager.hasPermission( in connectUsbBrailleDisplay()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
D | Utils.java | 768 final UsbManager usbManager = context.getSystemService(UsbManager.class); in containsIncompatibleChargers() local 769 if (usbManager == null) { in containsIncompatibleChargers() 772 final List<UsbPort> usbPortList = usbManager.getPorts(); in containsIncompatibleChargers()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | MockSystemServices.java | 140 public final UsbManager usbManager; field in MockSystemServices 198 usbManager = mock(UsbManager.class); in MockSystemServices()
|
D | DpmMockContext.java | 255 return mMockSystemServices.usbManager; in getSystemService()
|
D | DevicePolicyManagerTest.java | 8134 when(getServices().usbManager.enableUsbDataSignal(false)).thenReturn(true); in testSetUsbDataSignalingEnabled_asDeviceOwner() 8135 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_3); in testSetUsbDataSignalingEnabled_asDeviceOwner() 8146 when(getServices().usbManager.enableUsbDataSignal(false)).thenReturn(true); in testIsUsbDataSignalingEnabledForUser() 8147 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_3); in testIsUsbDataSignalingEnabledForUser() 8161 when(getServices().usbManager.enableUsbDataSignal(false)).thenReturn(true); in testSetUsbDataSignalingEnabled_asPoOfOrgOwnedDevice() 8162 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_3); in testSetUsbDataSignalingEnabled_asPoOfOrgOwnedDevice() 8173 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_3); in testCanUsbDataSignalingBeDisabled_canBeDisabled() 8181 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_2); in testCanUsbDataSignalingBeDisabled_cannotBeDisabled() 8192 when(getServices().usbManager.getUsbHalVersion()).thenReturn(UsbManager.USB_HAL_V1_3); in testSetUsbDataSignalingEnabled_noChangeToActiveAdmin()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbPortManager.java | 1473 PortInfo(@NonNull UsbManager usbManager, @NonNull String portId, int supportedModes, in PortInfo() argument 1479 mUsbPort = new UsbPort(usbManager, portId, supportedModes, in PortInfo()
|