HomeSort by relevance Sort by last modified time
    Searched refs:accessory (Results 1 - 25 of 57) sorted by null

1 2 3

  /frameworks/base/libs/usb/src/com/android/future/usb/
UsbManager.java 40 * Broadcast Action: A broadcast for USB accessory attached event.
42 * This intent is sent when a USB accessory is attached.
44 * {@link com.google.android.usb.UsbAccessory} for the attached accessory.
50 * Broadcast Action: A broadcast for USB accessory detached event.
52 * This intent is sent when a USB accessory is detached.
54 * {@link com.google.android.usb.UsbAccessory} for the attached accessory that was detached.
88 * broadcast Intent. This can also be used to retrieve the accessory from the result
94 android.hardware.usb.UsbAccessory accessory = local
96 if (accessory == null) {
99 return new UsbAccessory(accessory);
111 android.hardware.usb.UsbAccessory accessory = mService.getCurrentAccessory(); local
    [all...]
UsbAccessory.java 20 * A class representing a USB accessory.
31 /* package */ UsbAccessory(android.hardware.usb.UsbAccessory accessory) {
32 mManufacturer = accessory.getManufacturer();
33 mModel = accessory.getModel();
34 mDescription = accessory.getDescription();
35 mVersion = accessory.getVersion();
36 mUri = accessory.getUri();
37 mSerial = accessory.getSerial();
41 * Returns the manufacturer of the accessory.
43 * @return the accessory manufacture
106 UsbAccessory accessory = (UsbAccessory)obj; local
    [all...]
  /frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
UsbAoapDeviceTestActivity.java 65 UsbAccessory accessory = local
67 if (accessory != null) {
68 onAccessoryAttached(accessory);
70 throw new RuntimeException("USB accessory is null.");
94 private void onAccessoryAttached(UsbAccessory accessory) {
95 Log.i(TAG, "Starting AOAP discovery protocol, accessory attached: " + accessory);
96 // Check whether we have permission to access the accessory.
97 if (!mUsbManager.hasPermission(accessory)) {
98 Log.i(TAG, "Prompting the user for access to the accessory.")
162 UsbAccessory accessory = intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); local
    [all...]
  /frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
SourceActivity.java 44 private static final String MODEL = "Accessory Display";
71 mLogger.log("Waiting for accessory display sink to be attached to USB...");
82 UsbAccessory accessory = local
84 if (accessory != null) {
85 onAccessoryAttached(accessory);
90 for (UsbAccessory accessory : accessories) {
91 onAccessoryAttached(accessory);
116 private void onAccessoryAttached(UsbAccessory accessory) {
117 mLogger.log("USB accessory attached: " + accessory);
216 UsbAccessory accessory = intent.<UsbAccessory>getParcelableExtra( local
    [all...]
  /frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
UsbDisconnectedReceiver.java 29 // if their device/accessory is disconnected while the dialog is still open
43 public UsbDisconnectedReceiver(Activity activity, UsbAccessory accessory) {
45 mAccessory = accessory;
60 UsbAccessory accessory = local
62 if (accessory != null && accessory.equals(mAccessory)) {
  /packages/services/Car/tests/usb/AoapPhoneCompanionApp/src/com/google/android/car/usb/aoap/companion/
AoapPhoneCompanionActivity.java 73 UsbAccessory accessory = local
75 if (accessory != null) {
76 onAccessoryAttached(accessory);
78 throw new RuntimeException("USB accessory is null.");
119 private void onAccessoryAttached(UsbAccessory accessory) {
120 Log.i(TAG, "Starting AOAP discovery protocol, accessory attached: " + accessory);
121 // Check whether we have permission to access the accessory.
122 if (!mUsbManager.hasPermission(accessory)) {
123 Log.i(TAG, "Prompting the user for access to the accessory.")
212 UsbAccessory accessory = intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY); local
    [all...]
  /cts/apps/CtsVerifierUSBCompanion/src/com/android/cts/verifierusbcompanion/
AccessoryAttachmentHandler.java 29 * Utility to receive callbacks when an USB accessory is attached.
35 * Register an observer to be called when an USB accessory connects.
37 * @param observer The observer that should be called when an USB accessory connects.
60 UsbAccessory accessory = getIntent().getParcelableExtra(UsbManager.EXTRA_ACCESSORY); local
67 observer.onAttached(accessory);
75 * Callback when an accessory is attached
78 void onAttached(UsbAccessory accessory);
DeviceTestCompanion.java 144 * figure out how the accessory driver is implemented on this side.
157 UsbAccessory accessory; local
175 accessory = accessoryReceiver[0];
178 updateStatus("Connecting to " + accessory.getDescription());
180 ParcelFileDescriptor fd = usbManager.openAccessory(accessory);
  /frameworks/base/core/java/android/hardware/usb/
AccessoryFilter.java 32 * This class is used to describe a USB accessory.
40 // USB accessory manufacturer (or null for unspecified)
42 // USB accessory model (or null for unspecified)
44 // USB accessory version (or null for unspecified)
53 public AccessoryFilter(UsbAccessory accessory) {
54 mManufacturer = accessory.getManufacturer();
55 mModel = accessory.getModel();
56 mVersion = accessory.getVersion();
82 serializer.startTag(null, "usb-accessory");
92 serializer.endTag(null, "usb-accessory");
129 UsbAccessory accessory = (UsbAccessory)obj; local
    [all...]
IUsbManager.aidl 39 /* Returns the currently attached USB accessory */
42 /* Returns a file descriptor for communicating with the USB accessory.
45 ParcelFileDescriptor openAccessory(in UsbAccessory accessory);
52 /* Sets the default package for a USB accessory
55 void setAccessoryPackage(in UsbAccessory accessory, String packageName, int userId);
60 /* Returns true if the caller has permission to access the accessory. */
61 boolean hasAccessoryPermission(in UsbAccessory accessory);
69 /* Requests permission for the given package to access the accessory.
73 void requestAccessoryPermission(in UsbAccessory accessory, String packageName,
79 /* Grants permission for the given UID to access the accessory */
    [all...]
UsbAccessory.java 26 * A class representing a USB accessory, which is an external hardware component
28 * The accessory is the USB host and android the device side of the USB connection.
30 * <p>When the accessory connects, it reports its manufacturer and model names,
31 * the version of the accessory, and a user visible description of the accessory to the device.
33 * an appropriate application for the accessory.
34 * The accessory may optionally provide a unique serial number
35 * and a URL to for the accessory's website to the device as well.
40 * for reading and writing data to and from the accessory.
97 * Returns the manufacturer name of the accessory
162 UsbAccessory accessory = (UsbAccessory)obj; local
    [all...]
UsbManager.java 79 * accessory function is enabled
136 * Activity intent sent when user attaches a USB accessory.
140 * for the attached accessory
148 * Broadcast Action: A broadcast for USB accessory detached event.
150 * This intent is sent when a USB accessory is detached.
153 * for the attached accessory that was detached
251 * Name of the Accessory USB function.
256 public static final String USB_FUNCTION_ACCESSORY = "accessory";
285 * containing the {@link UsbAccessory} object for the accessory.
287 public static final String EXTRA_ACCESSORY = "accessory";
435 UsbAccessory accessory = mService.getCurrentAccessory(); local
    [all...]
  /cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/accessory/
AccessoryAttachmentHandler.java 17 package com.android.cts.verifier.usb.accessory;
29 * Utility to receive callbacks when an USB accessory is attached.
35 * Register an observer to be called when an USB accessory connects.
37 * @param observer The observer that should be called when an USB accessory connects.
60 UsbAccessory accessory = getIntent().getParcelableExtra(UsbManager.EXTRA_ACCESSORY); local
67 observer.onAttached(accessory);
75 * Callback when an accessory is attached
78 void onAttached(UsbAccessory accessory);
UsbAccessoryTestActivity.java 17 package com.android.cts.verifier.usb.accessory;
54 * Guide the user to run test for the USB accessory interface.
83 public void onAttached(UsbAccessory accessory) {
95 assertEquals("Android CTS", accessory.getManufacturer());
96 assertEquals("Android CTS test companion device", accessory.getModel());
97 assertEquals("Android device running CTS verifier", accessory.getDescription());
98 assertEquals("2", accessory.getVersion());
100 accessory.getUri());
101 assertEquals("0", accessory.getSerial());
103 assertTrue(Arrays.asList(usbManager.getAccessoryList()).contains(accessory));
    [all...]
  /device/google/accessory/demokit/app/
Android.mk 26 LOCAL_JAVA_LIBRARIES := com.android.future.usb.accessory
  /frameworks/base/libs/usb/
Android.mk 25 LOCAL_MODULE:= com.android.future.usb.accessory
  /frameworks/base/services/usb/java/com/android/server/usb/
UsbUserSettingsManager.java 58 // Temporary mapping UsbAccessory to list of UIDs with permissions for the accessory
93 * Remove all access permission for a accessory.
95 * @param accessory The accessory the permissions are for
97 void removeAccessoryPermissions(@NonNull UsbAccessory accessory) {
99 mAccessoryPermissionMap.remove(accessory);
178 public boolean hasPermission(UsbAccessory accessory) {
184 SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory);
198 public void checkPermission(UsbAccessory accessory) {
199 if (!hasPermission(accessory)) {
    [all...]
UsbProfileGroupSettingsManager.java 304 } else if ("usb-accessory".equals(parser.getName())) {
448 // Checks to see if a package matches a device or accessory.
449 // Only one of device and accessory should be non-null.
451 UsbDevice device, UsbAccessory accessory) {
475 else if (accessory != null && "usb-accessory".equals(tagName)) {
477 if (filter.matches(accessory)) {
641 UsbAccessory accessory, Intent intent) {
647 if (packageMatchesLocked(resolveInfo, intent.getAction(), null, accessory)) {
722 public void accessoryAttached(UsbAccessory accessory) {
    [all...]
UsbSettingsManager.java 185 * Remove temporary access permission and broadcast that a accessory was removed.
187 * @param accessory The accessory that is removed
189 void usbAccessoryRemoved(@NonNull UsbAccessory accessory) {
192 // clear temporary permissions for the accessory
193 mSettingsByUser.valueAt(i).removeAccessoryPermissions(accessory);
199 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory);
UsbService.java 276 /* returns the currently attached USB accessory (device mode) */
286 /* opens the currently attached USB accessory (device mode) */
288 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) {
296 return mDeviceManager.openAccessory(accessory, getSettingsForUser(userIdInt));
298 Slog.w(TAG, "Cannot open " + accessory + " for user " + userIdInt +
326 public void setAccessoryPackage(UsbAccessory accessory, String packageName, int userId) {
327 accessory = Preconditions.checkNotNull(accessory);
332 mSettingsManager.getSettingsForProfileGroup(user).setAccessoryPackage(accessory,
344 public boolean hasAccessoryPermission(UsbAccessory accessory) {
    [all...]
  /frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
AccessoryChat.java 67 UsbAccessory accessory = (UsbAccessory) intent.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
69 if (accessory != null) {
70 openAccessory(accessory);
73 Log.d(TAG, "permission denied for accessory " + accessory);
103 UsbAccessory accessory = (accessories == null ? null : accessories[0]); local
104 if (accessory != null) {
105 if (mUsbManager.hasPermission(accessory)) {
106 openAccessory(accessory);
110 mUsbManager.requestPermission(accessory, mPermissionIntent)
    [all...]
  /device/google/accessory/demokit/app/src/com/google/android/DemoKit/
DemoKitActivity.java 128 UsbAccessory accessory = UsbManager.getAccessory(intent);
131 openAccessory(accessory);
133 Log.d(TAG, "permission denied for accessory "
134 + accessory);
139 UsbAccessory accessory = UsbManager.getAccessory(intent);
140 if (accessory != null && accessory.equals(mAccessory)) {
188 UsbAccessory accessory = (accessories == null ? null : accessories[0]); local
189 if (accessory != null) {
190 if (mUsbManager.hasPermission(accessory)) {
    [all...]
  /frameworks/base/core/java/com/android/internal/usb/
DumpUtils.java 51 long id, @NonNull UsbAccessory accessory) {
54 dump.write("manufacturer", UsbAccessoryProto.MANUFACTURER, accessory.getManufacturer());
55 dump.write("model", UsbAccessoryProto.MODEL, accessory.getModel());
57 accessory.getManufacturer());
58 dump.write("version", UsbAccessoryProto.VERSION, accessory.getVersion());
59 writeStringIfNotNull(dump, "uri", UsbAccessoryProto.URI, accessory.getUri());
60 dump.write("serial", UsbAccessoryProto.SERIAL, accessory.getSerial());
  /device/google/cuttlefish/shared/config/
init.hardware.usb.rc 28 mkdir /config/usb_gadget/g1/functions/accessory.gs2
88 on property:sys.usb.config=accessory && property:sys.usb.configfs=1
91 on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
100 on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
103 on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
  /device/generic/armv7-a-neon/
mini_common.mk 42 com.android.future.usb.accessory \
71 frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \

Completed in 263 milliseconds

1 2 3