/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/ |
D | AccessoryChat.java | 56 private UsbManager mUsbManager; field in AccessoryChat 85 mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); in onCreate() 104 UsbAccessory[] accessories = mUsbManager.getAccessoryList(); in onResume() 107 if (mUsbManager.hasPermission(accessory)) { in onResume() 112 mUsbManager.requestPermission(accessory, mPermissionIntent); in onResume() 143 mFileDescriptor = mUsbManager.openAccessory(accessory); in openAccessory()
|
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/ |
D | UsbAoapDeviceTestActivity.java | 43 private UsbManager mUsbManager; field in UsbAoapDeviceTestActivity 55 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate() 97 if (!mUsbManager.hasPermission(accessory)) { in onAccessoryAttached() 103 mUsbManager.requestPermission(accessory, pendingIntent); in onAccessoryAttached() 106 mFd = mUsbManager.openAccessory(accessory); in onAccessoryAttached()
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/ |
D | SourceActivity.java | 46 private UsbManager mUsbManager; field in SourceActivity 62 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate() 88 UsbAccessory[] accessories = mUsbManager.getAccessoryList(); in onCreate() 142 if (!mUsbManager.hasPermission(accessory)) { in connect() 148 mUsbManager.requestPermission(accessory, pendingIntent); in connect() 153 ParcelFileDescriptor fd = mUsbManager.openAccessory(accessory); in connect()
|
/frameworks/base/tests/UsbManagerTests/src/android/hardware/usb/ |
D | UsbPortTest.java | 52 private UsbManager mUsbManager; field in UsbPortTest 57 mUsbManager = new UsbManager(InstrumentationRegistry.getContext(), mMockUsbService); in setUp() 67 mUsbManager, in testIsModeSupported()
|
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/ |
D | MtpClient.java | 54 private final UsbManager mUsbManager; field in MtpClient 155 mUsbManager = (UsbManager)context.getSystemService(Context.USB_SERVICE); in MtpClient() 173 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked() 174 mUsbManager.requestPermission(usbDevice, mPermissionIntent); in openDeviceLocked() 176 UsbDeviceConnection connection = mUsbManager.openDevice(usbDevice); in openDeviceLocked() 256 for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) { in getDeviceList()
|
/frameworks/base/core/java/android/hardware/usb/ |
D | UsbPort.java | 100 private final UsbManager mUsbManager; field in UsbPort 302 mUsbManager = usbManager; in UsbPort() 377 return mUsbManager.getPortStatus(this); in getStatus() 390 return mUsbManager.isModeChangeSupported(this); in isModeChangeSupported() 453 mUsbManager.setPortRoles(this, powerRole, dataRole); in setRoles() 481 mUsbManager.resetUsbPort(this, operationId, opCallback); in resetUsbPort() 506 if (mUsbManager.enableUsbData(this, enable, operationId, opCallback) == true) { in enableUsbData() 554 mUsbManager.enableUsbDataWhileDocked(this, operationId, opCallback); in enableUsbDataWhileDocked() 595 mUsbManager.enableLimitPowerTransfer(this, enable, operationId, opCallback); in enableLimitPowerTransfer() 616 mUsbManager.enableContaminantDetection(this, enable); in enableContaminantDetection()
|
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestHost/src/com/android/hardware/usb/aoaphosttest/ |
D | UsbAoapHostTestActivity.java | 43 private UsbManager mUsbManager; field in UsbAoapHostTestActivity 55 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate() 64 mUsbConnection = mUsbManager.openDevice(mUsbDevice); in onCreate()
|
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/ |
D | SinkActivity.java | 67 private UsbManager mUsbManager; field in SinkActivity 94 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate() 129 Map<String, UsbDevice> devices = mUsbManager.getDeviceList(); in onCreate() 165 if (!mUsbManager.hasPermission(device)) { in connect() 171 mUsbManager.requestPermission(device, pendingIntent); in connect() 176 UsbDeviceConnection conn = mUsbManager.openDevice(device); in connect()
|
/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/ |
D | UsbDeviceStateController.java | 49 private final UsbManager mUsbManager; field in UsbDeviceStateController 64 mUsbManager = usbManager; in UsbDeviceStateController() 247 mUsbManager.grantPermission(device); in openConnection() 248 return mUsbManager.openDevice(device); in openConnection()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BatteryControllerTest.java | 77 @Mock private UsbManager mUsbManager; field in BatteryControllerTest 272 mContext.addMockSystemService(UsbManager.class, mUsbManager); in complianceChanged_complianceIncompatible_outputsTrue() 283 mContext.addMockSystemService(UsbManager.class, mUsbManager); in complianceChanged_emptyComplianceWarnings_outputsFalse() 314 when(mUsbManager.getPorts()).thenReturn(usbPorts); in setupIncompatibleCharging()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | UtilsTest.java | 82 @Mock private UsbManager mUsbManager; field in UtilsTest 92 when(mContext.getSystemService(UsbManager.class)).thenReturn(mUsbManager); in setUp() 444 when(mUsbManager.getPorts()).thenReturn(null); in containsIncompatibleChargers_nullPorts_returnFalse() 450 when(mUsbManager.getPorts()).thenReturn(new ArrayList<>()); in containsIncompatibleChargers_emptyPorts_returnFalse() 458 when(mUsbManager.getPorts()).thenReturn(usbPorts); in containsIncompatibleChargers_nullPortStatus_returnFalse() 551 when(mUsbManager.getPorts()).thenReturn(usbPorts); in setupIncompatibleCharging()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/ |
D | KeyguardUpdateMonitorTest.java | 269 private UsbManager mUsbManager; field in KeyguardUpdateMonitorTest 2380 when(mUsbManager.getPorts()).thenReturn(usbPorts); in setupIncompatibleCharging() 2389 mContext.addMockSystemService(UsbManager.class, mUsbManager); in getSpyContext()
|