/frameworks/base/tests/UsbTests/src/com/android/server/usb/ |
D | UsbHandlerTest.java | 30 import android.hardware.usb.UsbManager; 155 UsbManager.FUNCTION_MTP)); in setFunctionsMtp() 156 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_MTP, 0); in setFunctionsMtp() 163 UsbManager.FUNCTION_PTP)); in setFunctionsPtp() 164 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_PTP, 0); in setFunctionsPtp() 171 UsbManager.FUNCTION_MIDI)); in setFunctionsMidi() 172 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_MIDI, 0); in setFunctionsMidi() 179 UsbManager.FUNCTION_RNDIS)); in setFunctionsRndis() 180 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_RNDIS, 0); in setFunctionsRndis() 190 assertEquals(mUsbHandler.getEnabledFunctions(), UsbManager.FUNCTION_NONE); in enableAdb() [all …]
|
/frameworks/base/tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/src/com/android/hardware/usb/externalmanagementtest/ |
D | UsbHostManagementActivity.java | 30 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 …]
|
D | UsbDeviceStateController.java | 24 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() 299 if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(intent.getAction())) { in onReceive() 300 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive() 302 } else if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(intent.getAction())) { in onReceive() 303 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE); in onReceive()
|
D | UsbUtil.java | 24 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/services/usb/java/com/android/server/usb/ |
D | UsbDeviceManager.java | 44 import android.hardware.usb.UsbManager; 276 FileDescriptor mtpFd = nativeOpenControl(UsbManager.USB_FUNCTION_MTP); in UsbDeviceManager() 280 mControlFds.put(UsbManager.FUNCTION_MTP, mtpFd); in UsbDeviceManager() 281 FileDescriptor ptpFd = nativeOpenControl(UsbManager.USB_FUNCTION_PTP); in UsbDeviceManager() 285 mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd); in UsbDeviceManager() 315 UsbPort port = intent.getParcelableExtra(UsbManager.EXTRA_PORT); in UsbDeviceManager() 316 UsbPortStatus status = intent.getParcelableExtra(UsbManager.EXTRA_PORT_STATUS); in UsbDeviceManager() 333 Iterator devices = ((UsbManager) context.getSystemService(Context.USB_SERVICE)) in UsbDeviceManager() 335 if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in UsbDeviceManager() 351 new IntentFilter(UsbManager.ACTION_USB_PORT_CHANGED)); in UsbDeviceManager() [all …]
|
D | UsbUserSettingsManager.java | 31 import android.hardware.usb.UsbManager; 239 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission() 240 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission() 250 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission() 251 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false); in requestPermission() 262 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission() 271 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermission() 272 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission() 281 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermission()
|
D | UsbSettingsManager.java | 26 import android.hardware.usb.UsbManager; 174 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_DETACHED); in usbDeviceRemoved() 176 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in usbDeviceRemoved() 197 Intent intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in usbAccessoryRemoved() 199 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in usbAccessoryRemoved()
|
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/ |
D | UsbAoapDeviceTestActivity.java | 25 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/packages/SystemUI/src/com/android/systemui/usb/ |
D | UsbDisconnectedReceiver.java | 26 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()
|
D | UsbConfirmActivity.java | 29 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() 126 intent = new Intent(UsbManager.ACTION_USB_DEVICE_ATTACHED); in onClick() 127 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onClick() 139 intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_ATTACHED); in onClick() 140 intent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onClick()
|
D | UsbDebuggingSecondaryUserActivity.java | 25 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()
|
D | UsbPermissionActivity.java | 33 import android.hardware.usb.UsbManager; 75 mDevice = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate() 76 mAccessory = (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate() 157 UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in canBeDefault() 200 UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in canBeDefault() 234 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onDestroy() 244 intent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onDestroy() 253 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, mPermissionGranted); in onDestroy()
|
D | UsbResolverActivity.java | 25 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()
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/ |
D | SourceActivity.java | 29 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/core/java/android/hardware/usb/ |
D | UsbManager.java | 57 public class UsbManager { class 351 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_MTP, FUNCTION_MTP); in FUNCTION_NAME_TO_CODE.put() 352 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_PTP, FUNCTION_PTP); in FUNCTION_NAME_TO_CODE.put() 353 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_RNDIS, FUNCTION_RNDIS); in FUNCTION_NAME_TO_CODE.put() 354 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_MIDI, FUNCTION_MIDI); in FUNCTION_NAME_TO_CODE.put() 355 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_ACCESSORY, FUNCTION_ACCESSORY); in FUNCTION_NAME_TO_CODE.put() 356 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_AUDIO_SOURCE, FUNCTION_AUDIO_SOURCE); in FUNCTION_NAME_TO_CODE.put() 357 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_ADB, FUNCTION_ADB); in FUNCTION_NAME_TO_CODE.put() 366 public UsbManager(Context context, IUsbManager service) { in UsbManager() method in UsbManager 880 joiner.add(UsbManager.USB_FUNCTION_MTP); in usbFunctionsToString() [all …]
|
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestHost/src/com/android/hardware/usb/aoaphosttest/ |
D | UsbAoapHostTestActivity.java | 29 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/ |
D | UsbIntentReceiver.java | 23 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()
|
D | ReceiverActivity.java | 22 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/cmds/svc/src/com/android/commands/svc/ |
D | UsbCommand.java | 21 import android.hardware.usb.UsbManager; 56 usbMgr.setCurrentFunctions(UsbManager.usbFunctionsFromString( in run() 65 UsbManager.usbFunctionsToString(usbMgr.getCurrentFunctions())); in run() 72 usbMgr.setScreenUnlockedFunctions(UsbManager.usbFunctionsFromString( in run()
|
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/ |
D | MtpClient.java | 28 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()
|
D | DeviceDisconnectedReceiver.java | 25 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/ |
D | UsbManager.java | 36 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/ |
D | SinkActivity.java | 32 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/ |
D | AccessoryChat.java | 36 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/ |
D | TestUtil.java | 21 import android.hardware.usb.UsbManager; 51 UsbManager usbManager, in setupMtpDevice() 86 UsbManager usbManager, in findMtpDevice()
|