Home
last modified time | relevance | path

Searched refs:mUsbManager (Results 1 – 15 of 15) sorted by relevance

/packages/apps/Settings/src/com/android/settings/connecteddevice/usb/
DUsbBackend.java55 private UsbManager mUsbManager; field in UsbBackend
68 mUsbManager = context.getSystemService(UsbManager.class); in UsbBackend()
84 return mUsbManager.getCurrentFunctions(); in getCurrentFunctions()
88 mUsbManager.setCurrentFunctions(functions); in setCurrentFunctions()
92 return mUsbManager.getScreenUnlockedFunctions(); in getDefaultUsbFunctions()
96 mUsbManager.setScreenUnlockedFunctions(functions); in setDefaultUsbFunctions()
220 List<UsbPort> ports = mUsbManager.getPorts(); in updatePorts()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/managedomainurls/
DClearDefaultsPreferenceController.java46 private final IUsbManager mUsbManager; field in ClearDefaultsPreferenceController
53 mUsbManager = IUsbManager.Stub.asInterface(b); in ClearDefaultsPreferenceController()
66 || hasUsbDefaults(mUsbManager, getPackageName()); in updateState()
80 if (mUsbManager != null) { in handlePreferenceClicked()
87 mUsbManager.clearDefaults(getPackageName(), userId); in handlePreferenceClicked()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/data/
DMtpClient.java52 private final UsbManager mUsbManager; field in MtpClient
166 mUsbManager = (UsbManager) context.getSystemService(Context.USB_SERVICE); in MtpClient()
190 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()
191 mUsbManager.requestPermission(usbDevice, mPermissionIntent); in openDeviceLocked()
194 UsbDeviceConnection connection = mUsbManager.openDevice(usbDevice); in openDeviceLocked()
255 for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) { in getDeviceList()
/packages/services/Car/tests/usb/AoapPhoneCompanionApp/src/com/google/android/car/usb/aoap/companion/
DAoapPhoneCompanionActivity.java47 private UsbManager mUsbManager; field in AoapPhoneCompanionActivity
66 mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); in onCreate()
122 if (!mUsbManager.hasPermission(accessory)) { in onAccessoryAttached()
128 mUsbManager.requestPermission(accessory, pendingIntent); in onAccessoryAttached()
131 mFd = mUsbManager.openAccessory(accessory); in onAccessoryAttached()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DMtpClient.java55 private final UsbManager mUsbManager; field in MtpClient
169 mUsbManager = (UsbManager)context.getSystemService(Context.USB_SERVICE); in MtpClient()
192 if (!mUsbManager.hasPermission(usbDevice)) { in openDeviceLocked()
193 mUsbManager.requestPermission(usbDevice, mPermissionIntent); in openDeviceLocked()
196 UsbDeviceConnection connection = mUsbManager.openDevice(usbDevice); in openDeviceLocked()
282 for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) { in getDeviceList()
/packages/apps/Settings/src/com/android/settings/applications/
DClearDefaultsPreference.java55 private IUsbManager mUsbManager; field in ClearDefaultsPreference
71 mUsbManager = IUsbManager.Stub.asInterface(b); in ClearDefaultsPreference()
117 if (mUsbManager != null) { in onBindViewHolder()
124 mUsbManager.clearDefaults(mPackageName, userId); in onBindViewHolder()
145 || AppUtils.hasUsbDefaults(mUsbManager, mPackageName); in updateUI()
DAppInfoBase.java76 protected IUsbManager mUsbManager; field in AppInfoBase
100 mUsbManager = IUsbManager.Stub.asInterface(b); in onCreate()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTetheringTest.java248 @Mock private UsbManager mUsbManager; field in TetheringTest
319 if (Context.USB_SERVICE.equals(name)) return mUsbManager; in getSystemService()
835 verify(mUsbManager, times(1)).setCurrentFunctions(UsbManager.FUNCTION_NCM); in prepareNcmTethering()
848 verify(mUsbManager).setCurrentFunctions(UsbManager.FUNCTION_NCM); in prepareUsbTethering()
851 verify(mUsbManager).setCurrentFunctions(UsbManager.FUNCTION_RNDIS); in prepareUsbTethering()
1667 verify(mUsbManager, times(1)).setCurrentFunctions(UsbManager.FUNCTION_NONE); in testUntetherUsbWhenRestrictionIsOn()
1894 reset(mUsbManager, mIPv6TetheringCoordinator); in testReportFailCallbackIfOffloadNotSupported()
1902 reset(mUsbManager, mIPv6TetheringCoordinator); in testReportFailCallbackIfOffloadNotSupported()
1917 verify(mUsbManager).setCurrentFunctions(UsbManager.FUNCTION_NONE); in runStopUSBTethering()
2097 verify(mUsbManager, times(1)).setCurrentFunctions(UsbManager.FUNCTION_NONE); in testDataSaverChanged()
[all …]
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbDeviceHandlerResolver.java70 private final UsbManager mUsbManager; field in UsbDeviceHandlerResolver
80 mUsbManager = manager; in UsbDeviceHandlerResolver()
168 mUsbManager.grantPermission(device, activityInfo.applicationInfo.uid); in dispatch()
203 UsbDeviceConnection devConnection = UsbUtil.openConnection(mUsbManager, device); in doHandleResolveHandlers()
223 UsbDeviceConnection connection = UsbUtil.openConnection(mUsbManager, device); in requestAoapSwitch()
DUsbHostController.java68 private final UsbManager mUsbManager; field in UsbHostController
93 mUsbManager = (UsbManager) context.getSystemService(Context.USB_SERVICE); in UsbHostController()
94 mUsbResolver = new UsbDeviceHandlerResolver(mUsbManager, mContext, this); in UsbHostController()
326 Iterator<UsbDevice> deviceIterator = mUsbManager.getDeviceList().values().iterator(); in onFailure()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/
DClearDefaultsPreference.java39 private final IUsbManager mUsbManager; field in ClearDefaultsPreference
46 mUsbManager = IUsbManager.Stub.asInterface(usbBinder); in ClearDefaultsPreference()
56 mEntry, mUsbManager, mPackageManager, getContext())); in refresh()
/packages/services/Car/tests/usb/AoapHostApp/src/com/google/android/car/usb/aoap/host/
DUsbAoapHostActivity.java45 private UsbManager mUsbManager; field in UsbAoapHostActivity
60 mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); in onCreate()
69 mUsbConnection = mUsbManager.openDevice(mUsbDevice); in onCreate()
/packages/services/Mtp/tests/src/com/android/mtp/
DMtpManagerTest.java40 UsbManager mUsbManager; field in MtpManagerTest
46 mUsbManager = getContext().getSystemService(UsbManager.class); in setUp()
48 mUsbDevice = TestUtil.setupMtpDevice(getInstrumentation(), mUsbManager, mManager); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/usb/
DUsbBackendTest.java56 private UsbManager mUsbManager; field in UsbBackendTest
71 when((Object) mContext.getSystemService(UsbManager.class)).thenReturn(mUsbManager); in setUp()
74 when(mUsbManager.getPorts()).thenReturn(Collections.singletonList(mUsbPort)); in setUp()
/packages/apps/Settings/src/com/android/settings/applications/intentpicker/
DAppLaunchSettings.java381 || AppUtils.hasUsbDefaults(mUsbManager, mPackageName); in isClearDefaultsEnabled()