Home
last modified time | relevance | path

Searched refs:accessory (Results 1 – 25 of 33) sorted by relevance

12

/frameworks/base/libs/usb/src/com/android/future/usb/
DUsbManager.java94 android.hardware.usb.UsbAccessory accessory = in getAccessory() local
96 if (accessory == null) { in getAccessory()
99 return new UsbAccessory(accessory); in getAccessory()
111 android.hardware.usb.UsbAccessory accessory = mService.getCurrentAccessory(); in getAccessoryList() local
112 if (accessory == null) { in getAccessoryList()
115 return new UsbAccessory[] { new UsbAccessory(accessory) }; in getAccessoryList()
129 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { in openAccessory() argument
132 accessory.getManufacturer(),accessory.getModel(), in openAccessory()
133 accessory.getDescription(), accessory.getVersion(), in openAccessory()
134 accessory.getUri(), accessory.getSerial())); in openAccessory()
[all …]
DUsbAccessory.java31 /* package */ UsbAccessory(android.hardware.usb.UsbAccessory accessory) { in UsbAccessory() argument
32 mManufacturer = accessory.getManufacturer(); in UsbAccessory()
33 mModel = accessory.getModel(); in UsbAccessory()
34 mDescription = accessory.getDescription(); in UsbAccessory()
35 mVersion = accessory.getVersion(); in UsbAccessory()
36 mUri = accessory.getUri(); in UsbAccessory()
37 mSerial = accessory.getSerial(); in UsbAccessory()
106 UsbAccessory accessory = (UsbAccessory)obj; in equals() local
107 return (compare(mManufacturer, accessory.getManufacturer()) && in equals()
108 compare(mModel, accessory.getModel()) && in equals()
[all …]
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DSourceActivity.java82 UsbAccessory accessory = in onCreate() local
84 if (accessory != null) { in onCreate()
85 onAccessoryAttached(accessory); in onCreate()
90 for (UsbAccessory accessory : accessories) { in onCreate()
91 onAccessoryAttached(accessory); in onCreate()
116 private void onAccessoryAttached(UsbAccessory accessory) { in onAccessoryAttached() argument
117 mLogger.log("USB accessory attached: " + accessory); in onAccessoryAttached()
119 connect(accessory); in onAccessoryAttached()
123 private void onAccessoryDetached(UsbAccessory accessory) { in onAccessoryDetached() argument
124 mLogger.log("USB accessory detached: " + accessory); in onAccessoryDetached()
[all …]
/frameworks/base/tests/UsbHostExternalManagmentTest/AoapTestDevice/src/com/android/hardware/usb/aoapdevicetest/
DUsbAoapDeviceTestActivity.java65 UsbAccessory accessory = in onCreate() local
67 if (accessory != null) { in onCreate()
68 onAccessoryAttached(accessory); in onCreate()
94 private void onAccessoryAttached(UsbAccessory accessory) { in onAccessoryAttached() argument
95 Log.i(TAG, "Starting AOAP discovery protocol, accessory attached: " + accessory); in onAccessoryAttached()
97 if (!mUsbManager.hasPermission(accessory)) { in onAccessoryAttached()
103 mUsbManager.requestPermission(accessory, pendingIntent); in onAccessoryAttached()
106 mFd = mUsbManager.openAccessory(accessory); in onAccessoryAttached()
112 mAccessory = accessory; in onAccessoryAttached()
117 private void onAccessoryDetached(UsbAccessory accessory) { in onAccessoryDetached() argument
[all …]
/frameworks/base/core/java/android/hardware/usb/
DAccessoryFilter.java54 public AccessoryFilter(UsbAccessory accessory) { in AccessoryFilter() argument
55 mManufacturer = accessory.getManufacturer(); in AccessoryFilter()
56 mModel = accessory.getModel(); in AccessoryFilter()
57 mVersion = accessory.getVersion(); in AccessoryFilter()
115 public boolean contains(AccessoryFilter accessory) { in contains() argument
116 if (mManufacturer != null && !Objects.equals(accessory.mManufacturer, mManufacturer)) { in contains()
119 if (mModel != null && !Objects.equals(accessory.mModel, mModel)) return false; in contains()
120 return !(mVersion != null && !Objects.equals(accessory.mVersion, mVersion)); in contains()
136 UsbAccessory accessory = (UsbAccessory)obj; in equals() local
137 return (mManufacturer.equals(accessory.getManufacturer()) && in equals()
[all …]
DIUsbManager.aidl47 ParcelFileDescriptor openAccessory(in UsbAccessory accessory); in openAccessory() argument
57 void setAccessoryPackage(in UsbAccessory accessory, String packageName, int userId); in setAccessoryPackage() argument
63 …void addAccessoryPackagesToPreferenceDenied(in UsbAccessory accessory, in String[] packageNames, i… in addAccessoryPackagesToPreferenceDenied() argument
77 …void setAccessoryPersistentPermission(in UsbAccessory accessory, int uid, in UserHandle user, bool… in setAccessoryPersistentPermission() argument
83 boolean hasAccessoryPermission(in UsbAccessory accessory); in hasAccessoryPermission() argument
95 void requestAccessoryPermission(in UsbAccessory accessory, String packageName, in requestAccessoryPermission() argument
102 void grantAccessoryPermission(in UsbAccessory accessory, int uid); in grantAccessoryPermission() argument
DUsbAccessory.java191 UsbAccessory accessory = (UsbAccessory)obj; in equals() local
192 return (compare(mManufacturer, accessory.getManufacturer()) && in equals()
193 compare(mModel, accessory.getModel()) && in equals()
194 compare(mDescription, accessory.getDescription()) && in equals()
195 compare(mVersion, accessory.getVersion()) && in equals()
196 compare(mUri, accessory.getUri()) && in equals()
197 compare(getSerial(), accessory.getSerial())); in equals()
DUsbManager.java767 UsbAccessory accessory = mService.getCurrentAccessory(); in getAccessoryList() local
768 if (accessory == null) { in getAccessoryList()
771 return new UsbAccessory[] { accessory }; in getAccessoryList()
789 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { in openAccessory() argument
791 return mService.openAccessory(accessory); in openAccessory()
850 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() argument
855 return mService.hasAccessoryPermission(accessory); in hasPermission()
911 public void requestPermission(UsbAccessory accessory, PendingIntent pi) { in requestPermission() argument
913 mService.requestAccessoryPermission(accessory, mContext.getPackageName(), pi); in requestPermission()
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/
DAccessoryChat.java67 … 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]); in onResume() local
104 if (accessory != null) { in onResume()
105 if (mUsbManager.hasPermission(accessory)) { in onResume()
106 openAccessory(accessory); in onResume()
110 mUsbManager.requestPermission(accessory, mPermissionIntent); in onResume()
139 private void openAccessory(UsbAccessory accessory) { in openAccessory() argument
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
DUsbDisconnectedReceiver.java43 public UsbDisconnectedReceiver(Activity activity, UsbAccessory accessory) { in UsbDisconnectedReceiver() argument
45 mAccessory = accessory; in UsbDisconnectedReceiver()
60 UsbAccessory accessory = in onReceive() local
62 if (accessory != null && accessory.equals(mAccessory)) { in onReceive()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbUserPermissionManager.java139 void removeAccessoryPermissions(@NonNull UsbAccessory accessory) { in removeAccessoryPermissions() argument
141 mAccessoryPermissionMap.remove(accessory); in removeAccessoryPermissions()
180 void grantAccessoryPermission(@NonNull UsbAccessory accessory, int uid) { in grantAccessoryPermission() argument
182 SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory); in grantAccessoryPermission()
185 mAccessoryPermissionMap.put(accessory, uidList); in grantAccessoryPermission()
249 boolean hasPermission(@NonNull UsbAccessory accessory, int pid, int uid) { in hasPermission() argument
258 AccessoryFilter filter = new AccessoryFilter(accessory); in hasPermission()
267 SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory); in hasPermission()
300 void setAccessoryPersistentPermission(@NonNull UsbAccessory accessory, int uid, in setAccessoryPersistentPermission() argument
304 AccessoryFilter filter = new AccessoryFilter(accessory); in setAccessoryPersistentPermission()
[all …]
DUsbHandlerManager.java57 void showUsbAccessoryUriActivity(@NonNull UsbAccessory accessory, in showUsbAccessoryUriActivity() argument
59 String uri = accessory.getUri(); in showUsbAccessoryUriActivity()
66 dialogIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in showUsbAccessoryUriActivity()
86 @Nullable UsbAccessory accessory) { in confirmUsbHandler() argument
99 resolverIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in confirmUsbHandler()
DUsbProfileGroupSettingsManager.java694 UsbAccessory accessory) { in packageMatchesLocked() argument
711 if (accessory != null) { in packageMatchesLocked()
717 if (accessoryFilters.get(i).matches(accessory)) { in packageMatchesLocked()
877 UsbAccessory accessory, Intent intent) { in getAccessoryMatchesLocked() argument
883 if (packageMatchesLocked(resolveInfo, null, accessory)) { in getAccessoryMatchesLocked()
958 public void accessoryAttached(UsbAccessory accessory) { in accessoryAttached() argument
960 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in accessoryAttached()
968 matches = getAccessoryMatchesLocked(accessory, intent); in accessoryAttached()
970 matches, mAccessoryPreferenceMap.get(new AccessoryFilter(accessory))); in accessoryAttached()
974 resolveActivity(intent, matches, defaultActivity, null, accessory); in accessoryAttached()
[all …]
DUsbService.java321 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { in openAccessory() argument
331 return mDeviceManager.openAccessory(accessory, getPermissionsForUser(user), in openAccessory()
334 Slog.w(TAG, "Cannot open " + accessory + " for user " + user in openAccessory()
370 public void setAccessoryPackage(UsbAccessory accessory, String packageName, int userId) { in setAccessoryPackage() argument
371 Objects.requireNonNull(accessory); in setAccessoryPackage()
379 mSettingsManager.getSettingsForProfileGroup(user).setAccessoryPackage(accessory, in setAccessoryPackage()
405 public void addAccessoryPackagesToPreferenceDenied(UsbAccessory accessory, in addAccessoryPackagesToPreferenceDenied() argument
407 Objects.requireNonNull(accessory); in addAccessoryPackagesToPreferenceDenied()
416 .addAccessoryPackagesToDenied(accessory, packageNames, user); in addAccessoryPackagesToPreferenceDenied()
441 public void removeAccessoryPackagesFromPreferenceDenied(UsbAccessory accessory, in removeAccessoryPackagesFromPreferenceDenied() argument
[all …]
DUsbPermissionManager.java107 void usbAccessoryRemoved(@NonNull UsbAccessory accessory) { in usbAccessoryRemoved() argument
111 mPermissionsByUser.valueAt(i).removeAccessoryPermissions(accessory); in usbAccessoryRemoved()
117 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in usbAccessoryRemoved()
DUsbUserSettingsManager.java140 boolean canBeDefault(@NonNull UsbAccessory accessory, String packageName) { in canBeDefault() argument
157 if (filter.matches(accessory)) { in canBeDefault()
/frameworks/base/core/java/com/android/internal/usb/
DDumpUtils.java51 long id, @NonNull UsbAccessory accessory) { in writeAccessory() argument
54 dump.write("manufacturer", UsbAccessoryProto.MANUFACTURER, accessory.getManufacturer()); in writeAccessory()
55 dump.write("model", UsbAccessoryProto.MODEL, accessory.getModel()); in writeAccessory()
57 accessory.getManufacturer()); in writeAccessory()
58 dump.write("version", UsbAccessoryProto.VERSION, accessory.getVersion()); in writeAccessory()
59 writeStringIfNotNull(dump, "uri", UsbAccessoryProto.URI, accessory.getUri()); in writeAccessory()
60 dump.write("serial", UsbAccessoryProto.SERIAL, accessory.getSerial()); in writeAccessory()
/frameworks/base/libs/usb/tests/AccessoryChat/
DREADME.txt1 This is a test app for the USB accessory APIs. It consists of two parts:
7 This program behaves as if it were a USB accessory.
/frameworks/base/libs/usb/tests/accessorytest/
DAndroid.bp15 "accessory.c",
/frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Settings/
Ddevice_for_product_strategy_accessibility.pfw375 # Media strategy inverts the priority of USB device vs accessory
406 # but USB accessory not reachable in call
409 # Media strategy inverts the priority of USB device vs accessory
500 # Media strategy inverts the priority of USB device vs accessory
Ddevice_for_product_strategy_dtmf.pfw341 # Media strategy inverts the priority of USB device vs accessory
372 # but USB accessory not reachable in call
375 # Media strategy inverts the priority of USB device vs accessory
466 # Media strategy inverts the priority of USB device vs accessory
/frameworks/base/libs/usb/
DAndroid.bp28 name: "com.android.future.usb.accessory",
/frameworks/native/data/etc/
DAndroid.bp170 name: "android.hardware.usb.accessory.prebuilt.xml",
171 src: "android.hardware.usb.accessory.xml",
/frameworks/base/tests/AccessoryDisplay/
DREADME12 to be connected using the USB accessory protocol. Think of it as
/frameworks/base/core/proto/android/service/
Dusb.proto84 // firmware of the device. If an Android phone is configured as accessory, the
85 // app that sets up the accessory side of the connection set this. Either way,
409 // Description of accessory set by manufacturer

12