Home
last modified time | relevance | path

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

12

/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()
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()
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()
DUsbResolverActivity.java25 import android.hardware.usb.UsbManager;
73 mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE); in onCreate()
77 mAccessory = (UsbAccessory)target.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
DUsbAccessoryUriActivity.java24 import android.hardware.usb.UsbManager;
53 mAccessory = (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); in onCreate()
DUsbStorageActivity.java30 import android.hardware.usb.UsbManager;
84 if (intent.getAction().equals(UsbManager.ACTION_USB_STATE)) {
171 registerReceiver(mUsbStateReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE)); in onResume()
195 boolean connected = intent.getExtras().getBoolean(UsbManager.USB_CONNECTED); in handleUsbStateChanged()
/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/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/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/services/usb/java/com/android/server/usb/
DUsbDeviceManager.java32 import android.hardware.usb.UsbManager;
234 functions = UsbManager.USB_FUNCTION_ACCESSORY + "," in startAccessoryMode()
235 + UsbManager.USB_FUNCTION_AUDIO_SOURCE; in startAccessoryMode()
237 functions = UsbManager.USB_FUNCTION_ACCESSORY; in startAccessoryMode()
239 functions = UsbManager.USB_FUNCTION_AUDIO_SOURCE; in startAccessoryMode()
360 mAdbEnabled = containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_ADB); in UsbHandler()
483 functions = addFunction(functions, UsbManager.USB_FUNCTION_ADB); in setEnabledFunctions()
485 functions = removeFunction(functions, UsbManager.USB_FUNCTION_ADB); in setEnabledFunctions()
515 functions = addFunction(functions, UsbManager.USB_FUNCTION_ADB); in setEnabledFunctions()
517 functions = removeFunction(functions, UsbManager.USB_FUNCTION_ADB); in setEnabledFunctions()
[all …]
DUsbSettingsManager.java35 import android.hardware.usb.UsbManager;
727 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_ATTACHED); in deviceAttached()
728 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in deviceAttached()
751 Intent intent = new Intent(UsbManager.ACTION_USB_DEVICE_DETACHED); in deviceDetached()
752 intent.putExtra(UsbManager.EXTRA_DEVICE, device); in deviceDetached()
758 Intent intent = new Intent(UsbManager.ACTION_USB_ACCESSORY_ATTACHED); in accessoryAttached()
759 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in accessoryAttached()
779 UsbManager.ACTION_USB_ACCESSORY_DETACHED); in accessoryDetached()
780 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in accessoryDetached()
799 dialogIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in resolveActivity()
[all …]
/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/docs/html/guide/topics/connectivity/usb/
Daccessory.jd117 <td>{@link android.hardware.usb.UsbManager}</td>
136 android.hardware.usb.UsbManager} object in the following manner:</p>
138 UsbManager manager = UsbManager.getInstance(this);
142 android.hardware.usb.UsbManager} object in the following manner:</p>
144 UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
152 UsbAccessory accessory = UsbManager.getAccessory(intent);
158 UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
301 UsbAccessory accessory = UsbManager.getAccessory(intent);
306 UsbAccessory accessory = (UsbAccessory)intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
314 <p>Use the {@link android.hardware.usb.UsbManager#getAccessoryList() getAccessoryList()} method
[all …]
Dhost.jd57 <td>{@link android.hardware.usb.UsbManager}</td>
109 android.hardware.usb.UsbManager} to retrieve the desired {@link android.hardware.usb.UsbDevice}.
254 UsbDevice device = (UsbDevice) intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
261 android.hardware.usb.UsbManager#getDeviceList() getDeviceList()} method to get a hash map of all
265 UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
274 UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
301 android.hardware.usb.UsbManager#requestPermission requestPermission()}. The call to {@link
302 android.hardware.usb.UsbManager#requestPermission requestPermission()} displays a dialog to the
314 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
316 if (intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)) {
[all …]
/frameworks/base/docs/html/about/versions/
Dandroid-2.3.4.jd82 <li>Obtaining a {@link android.hardware.usb.UsbManager} object &mdash; To obtain
83 a {@link android.hardware.usb.UsbManager} object when using the add-on library,
88 <pre>UsbManager manager = UsbManager.getInstance(this);</pre></li>
97 <pre>UsbAccessory accessory = UsbManager.getAccessory(intent)</pre></li>
Dandroid-3.1.jd80 central class is {@link android.hardware.usb.UsbManager}, which provides
83 {@link android.hardware.usb.UsbManager} and then query for the list of attached
85 {@link android.hardware.usb.UsbManager} also declares intent actions that the
/frameworks/base/core/java/android/hardware/usb/
DUsbManager.java46 public class UsbManager { class
227 public UsbManager(Context context, IUsbManager service) { in UsbManager() method in UsbManager
/frameworks/base/services/core/java/com/android/server/connectivity/
DTethering.java29 import android.hardware.usb.UsbManager;
158 filter.addAction(UsbManager.ACTION_USB_STATE); in Tethering()
507 if (action.equals(UsbManager.ACTION_USB_STATE)) { in onReceive()
509 boolean usbConnected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false); in onReceive()
510 mRndisEnabled = intent.getBooleanExtra(UsbManager.USB_FUNCTION_RNDIS, false); in onReceive()
605 UsbManager usbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE); in setUsbTethering()
613 usbManager.setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, false); in setUsbTethering()
/frameworks/base/docs/html/tools/adk/
Dadk2.jd559 import com.android.future.usb.UsbManager;
561 mUSBManager = UsbManager.getInstance(this);
573 import android.hardware.usb.UsbManager
575 mUSBManager = (UsbManager) getSystemService(Context.USB_SERVICE);
577 intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
/frameworks/base/services/core/java/com/android/server/
DMountService.java37 import android.hardware.usb.UsbManager;
693 boolean available = (intent.getBooleanExtra(UsbManager.USB_CONNECTED, false) &&
694 intent.getBooleanExtra(UsbManager.USB_FUNCTION_MASS_STORAGE, false));
1504 mUsbReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE), null, mHandler); in MountService()
/frameworks/base/core/java/android/app/
DContextImpl.java72 import android.hardware.usb.UsbManager;
583 return new UsbManager(ctx, IUsbManager.Stub.asInterface(b)); in registerService()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyManagerService.java53 import android.hardware.usb.UsbManager;
4872 UsbManager manager = in setUserRestriction()
4873 (UsbManager) mContext.getSystemService(Context.USB_SERVICE); in setUserRestriction()

12