/frameworks/base/tests/UsbTests/src/com/android/server/usb/ |
D | UsbHandlerTest.java | 30 import android.hardware.usb.UsbManager; 152 UsbManager.FUNCTION_MTP)); in setFunctionsMtp() 153 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_MTP, 0); in setFunctionsMtp() 160 UsbManager.FUNCTION_PTP)); in setFunctionsPtp() 161 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_PTP, 0); in setFunctionsPtp() 168 UsbManager.FUNCTION_MIDI)); in setFunctionsMidi() 169 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_MIDI, 0); in setFunctionsMidi() 176 UsbManager.FUNCTION_RNDIS)); in setFunctionsRndis() 177 assertNotEquals(mUsbHandler.getEnabledFunctions() & UsbManager.FUNCTION_RNDIS, 0); in setFunctionsRndis() 187 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()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbDeviceManager.java | 51 import android.hardware.usb.UsbManager; 271 FileDescriptor mtpFd = nativeOpenControl(UsbManager.USB_FUNCTION_MTP); in UsbDeviceManager() 275 mControlFds.put(UsbManager.FUNCTION_MTP, mtpFd); in UsbDeviceManager() 276 FileDescriptor ptpFd = nativeOpenControl(UsbManager.USB_FUNCTION_PTP); in UsbDeviceManager() 280 mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd); in UsbDeviceManager() 304 ParcelableUsbPort port = intent.getParcelableExtra(UsbManager.EXTRA_PORT); in UsbDeviceManager() 305 UsbPortStatus status = intent.getParcelableExtra(UsbManager.EXTRA_PORT_STATUS); in UsbDeviceManager() 307 port.getUsbPort(context.getSystemService(UsbManager.class)), status); in UsbDeviceManager() 323 Iterator devices = ((UsbManager) context.getSystemService(Context.USB_SERVICE)) in UsbDeviceManager() 325 if (intent.getAction().equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in UsbDeviceManager() [all …]
|
D | UsbUserSettingsManager.java | 42 import android.hardware.usb.UsbManager; 214 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission() 215 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission() 225 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermission() 226 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false); in requestPermission() 245 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermission() 246 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, true); in requestPermission() 296 UsbManager.ACTION_USB_DEVICE_ATTACHED)) { in canBeDefault() 338 UsbManager.ACTION_USB_ACCESSORY_ATTACHED)) { in canBeDefault() 383 new Intent(UsbManager.ACTION_USB_DEVICE_ATTACHED)); in dump() [all …]
|
D | UsbHandlerManager.java | 27 import android.hardware.usb.UsbManager; 64 dialogIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in showUsbAccessoryUriActivity() 94 resolverIntent.putExtra(UsbManager.EXTRA_DEVICE, device); in confirmUsbHandler() 96 resolverIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in confirmUsbHandler()
|
D | UsbSettingsManager.java | 26 import android.hardware.usb.UsbManager; 181 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_DETACHED); in usbDeviceRemoved() 183 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in usbDeviceRemoved() 204 Intent intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_DETACHED); in usbAccessoryRemoved() 206 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in usbAccessoryRemoved()
|
D | UsbPermissionManager.java | 27 import android.hardware.usb.UsbManager; 190 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in requestPermissionDialog() 192 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermissionDialog() 196 intent.putExtra(UsbManager.EXTRA_CAN_BE_DEFAULT, canBeDefault); in requestPermissionDialog() 197 intent.putExtra(UsbManager.EXTRA_PACKAGE, packageName); in requestPermissionDialog()
|
/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 | UsbPermissionActivity.java | 29 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() 70 mPackageName = intent.getStringExtra(UsbManager.EXTRA_PACKAGE); in onCreate() 71 boolean canBeDefault = intent.getBooleanExtra(UsbManager.EXTRA_CAN_BE_DEFAULT, false); in onCreate() 132 intent.putExtra(UsbManager.EXTRA_DEVICE, mDevice); in onDestroy() 142 intent.putExtra(UsbManager.EXTRA_ACCESSORY, mAccessory); in onDestroy() 151 intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, mPermissionGranted); in onDestroy()
|
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 | UsbResolverActivity.java | 27 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/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/core/java/android/hardware/usb/ |
D | UsbManager.java | 61 public class UsbManager { class 372 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_MTP, FUNCTION_MTP); in FUNCTION_NAME_TO_CODE.put() 373 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_PTP, FUNCTION_PTP); in FUNCTION_NAME_TO_CODE.put() 374 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_RNDIS, FUNCTION_RNDIS); in FUNCTION_NAME_TO_CODE.put() 375 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_MIDI, FUNCTION_MIDI); in FUNCTION_NAME_TO_CODE.put() 376 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_ACCESSORY, FUNCTION_ACCESSORY); in FUNCTION_NAME_TO_CODE.put() 377 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_AUDIO_SOURCE, FUNCTION_AUDIO_SOURCE); in FUNCTION_NAME_TO_CODE.put() 378 FUNCTION_NAME_TO_CODE.put(UsbManager.USB_FUNCTION_ADB, FUNCTION_ADB); in FUNCTION_NAME_TO_CODE.put() 388 public UsbManager(Context context, IUsbManager service) { in UsbManager() method in UsbManager 913 joiner.add(UsbManager.USB_FUNCTION_MTP); in usbFunctionsToString() [all …]
|
/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()
|