Home
last modified time | relevance | path

Searched refs:UsbManager (Results 1 – 25 of 40) sorted by relevance

12

/frameworks/base/services/usb/java/com/android/server/usb/
DUsbDeviceManager.java33 import android.hardware.usb.UsbManager;
207 UsbPort port = intent.getParcelableExtra(UsbManager.EXTRA_PORT);
208 UsbPortStatus status = intent.getParcelableExtra(UsbManager.EXTRA_PORT_STATUS);
247 new IntentFilter(UsbManager.ACTION_USB_PORT_CHANGED)); in UsbDeviceManager()
323 functions = UsbManager.USB_FUNCTION_ACCESSORY + "," in startAccessoryMode()
324 + UsbManager.USB_FUNCTION_AUDIO_SOURCE; in startAccessoryMode()
326 functions = UsbManager.USB_FUNCTION_ACCESSORY; in startAccessoryMode()
328 functions = UsbManager.USB_FUNCTION_AUDIO_SOURCE; in startAccessoryMode()
390 UsbManager.USB_FUNCTION_NONE); in UsbHandler()
395 UsbManager.USB_FUNCTION_NONE); in UsbHandler()
[all …]
DUsbUserSettingsManager.java29 import android.hardware.usb.UsbManager;
173 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission()
174 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission()
184 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission()
193 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermission()
194 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission()
203 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermission()
DUsbSettingsManager.java26 import android.hardware.usb.UsbManager;
184 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_DETACHED); in usbDeviceRemoved()
186 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in usbDeviceRemoved()
207 Intent intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in usbAccessoryRemoved()
209 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in usbAccessoryRemoved()
DMtpNotificationManager.java31 import android.hardware.usb.UsbManager;
90 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in showNotification()
118 intent.getExtras().<UsbDevice>getParcelable(UsbManager.EXTRA_DEVICE); in onReceive()
/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/
DUsbHostManagementActivity.java30 import android.hardware.usb.UsbManager;
79 if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(intent.getAction())) { in onCreate()
80 mUsbDevice = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
82 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate()
92 filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED); in onCreate()
93 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); in onCreate()
154 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in startAoapActivity()
156 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_ATTACHED); in startAoapActivity()
157 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in startAoapActivity()
168 UsbManager usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in dumpUsbDevices()
[all …]
DUsbDeviceStateController.java24 import android.hardware.usb.UsbManager;
49 private final UsbManager mUsbManager;
61 UsbManager usbManager) { in UsbDeviceStateController()
74 filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED); in init()
75 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); in init()
296 if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(intent.getAction())) { in onReceive()
297 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
299 } else if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(intent.getAction())) { in onReceive()
300 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
DUsbUtil.java24 import android.hardware.usb.UsbManager;
32 public static LinkedList<UsbDevice> findAllPossibleAndroidDevices(UsbManager usbManager) { in findAllPossibleAndroidDevices()
78 public static boolean isDeviceConnected(UsbManager usbManager, UsbDevice device) { in isDeviceConnected()
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DUsbDisconnectedReceiver.java26 import android.hardware.usb.UsbManager;
39 IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_DEVICE_DETACHED); in UsbDisconnectedReceiver()
47 IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in UsbDisconnectedReceiver()
54 if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) { in onReceive()
55 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
59 } else if (UsbManager.ACTION_USB_ACCESSORY_DETACHED.equals(action)) { in onReceive()
61 (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onReceive()
DUsbDebuggingSecondaryUserActivity.java25 import android.hardware.usb.UsbManager;
63 if (UsbManager.ACTION_USB_STATE.equals(action)) { in onReceive()
64 boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false); in onReceive()
76 IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE); in onStart()
DUsbConfirmActivity.java29 import android.hardware.usb.UsbManager;
63 mDevice = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
64 mAccessory = (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
123 intent = new Intent(UsbManager.ACTION_USB_DEVICE_ATTACHED); in onClick()
124 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onClick()
136 intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_ATTACHED); in onClick()
137 intent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onClick()
DUsbPermissionActivity.java29 import android.hardware.usb.UsbManager;
66 mDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
67 mAccessory = (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
126 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onDestroy()
136 intent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onDestroy()
145 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, mPermissionGranted); in onDestroy()
DUsbResolverActivity.java25 import android.hardware.usb.UsbManager;
88 mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
92 mAccessory = (UsbAccessory)target.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
113 mOtherProfileIntent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onCreate()
117 mOtherProfileIntent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onCreate()
DUsbDebuggingActivity.java27 import android.hardware.usb.UsbManager;
93 if (!UsbManager.ACTION_USB_STATE.equals(action)) { in onReceive()
96 boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false); in onReceive()
106 IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE); in onStart()
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
DUsbAoapDeviceTestActivity.java25 import android.hardware.usb.UsbManager;
43 private UsbManager mUsbManager;
55 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate()
57 filter.addAction(UsbManager.ACTION_USB_ACCESSORY_ATTACHED); in onCreate()
58 filter.addAction(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in onCreate()
64 if (intent.getAction().equals(UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in onCreate()
66 (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
162 UsbAccessory accessory = intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onReceive()
165 if (action.equals(UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in onReceive()
167 } else if (action.equals(UsbManager.ACTION_USB_ACCESSORY_DETACHED)) { in onReceive()
[all …]
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DSourceActivity.java29 import android.hardware.usb.UsbManager;
46 private UsbManager mUsbManager;
62 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate()
74 filter.addAction(UsbManager.ACTION_USB_ACCESSORY_ATTACHED); in onCreate()
75 filter.addAction(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in onCreate()
81 if (intent.getAction().equals(UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in onCreate()
83 (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
217 UsbManager.EXTRA_ACCESSORY); in onReceive()
220 if (action.equals(UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in onReceive()
222 } else if (action.equals(UsbManager.ACTION_USB_ACCESSORY_DETACHED)) { in onReceive()
[all …]
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestHost/src/com/android/hardware/usb/aoaphosttest/
DUsbAoapHostTestActivity.java29 import android.hardware.usb.UsbManager;
43 private UsbManager mUsbManager;
55 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate()
57 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); in onCreate()
62 if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in onCreate()
63 mUsbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
157 if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(intent.getAction())) { in onReceive()
158 UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
/frameworks/base/packages/MtpDocumentsProvider/src/com/android/mtp/
DUsbIntentReceiver.java23 import android.hardware.usb.UsbManager;
31 final UsbDevice device = intent.getExtras().getParcelable(UsbManager.EXTRA_DEVICE); in onReceive()
33 case UsbManager.ACTION_USB_DEVICE_ATTACHED: in onReceive()
36 case UsbManager.ACTION_USB_DEVICE_DETACHED: in onReceive()
DReceiverActivity.java22 import android.hardware.usb.UsbManager;
40 if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(getIntent().getAction())) { in onCreate()
41 final UsbDevice device = getIntent().getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/
DMtpClient.java28 import android.hardware.usb.UsbManager;
54 private final UsbManager mUsbManager;
67 UsbDevice usbDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
73 if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(action)) {
82 } else if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) {
90 boolean permission = intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED,
155 mUsbManager = (UsbManager)context.getSystemService(Context.USB_SERVICE); in MtpClient()
158 filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED); in MtpClient()
159 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); in MtpClient()
DDeviceDisconnectedReceiver.java25 import android.hardware.usb.UsbManager;
39 IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_DEVICE_DETACHED); in DeviceDisconnectedReceiver()
45 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
/frameworks/base/libs/usb/src/com/android/future/usb/
DUsbManager.java36 public class UsbManager { class
69 private UsbManager(Context context, IUsbManager service) { in UsbManager() method in UsbManager
80 public static UsbManager getInstance(Context context) { in getInstance()
82 return new UsbManager(context, IUsbManager.Stub.asInterface(b)); in getInstance()
95 intent.getParcelableExtra(android.hardware.usb.UsbManager.EXTRA_ACCESSORY); in getAccessory()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DSinkActivity.java32 import android.hardware.usb.UsbManager;
67 private UsbManager mUsbManager;
94 mUsbManager = (UsbManager)getSystemService(Context.USB_SERVICE); in onCreate()
116 filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED); in onCreate()
117 filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED); in onCreate()
123 if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in onCreate()
124 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
490 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
493 if (action.equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in onReceive()
495 } else if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) { in onReceive()
[all …]
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
DAccessoryChat.java36 import android.hardware.usb.UsbManager;
56 private UsbManager mUsbManager;
67 … UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
68 if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
85 mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE); in onCreate()
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DTestUtil.java21 import android.hardware.usb.UsbManager;
51 UsbManager usbManager, in setupMtpDevice()
86 UsbManager usbManager, in findMtpDevice()
DMtpManagerTest.java21 import android.hardware.usb.UsbManager;
40 UsbManager mUsbManager;
46 mUsbManager = getContext().getSystemService(UsbManager.class); in setUp()

12