/frameworks/base/libs/usb/src/com/android/future/usb/ |
D | UsbManager.java | 94 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 …]
|
D | UsbAccessory.java | 31 /* 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/ |
D | SourceActivity.java | 82 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/ |
D | UsbAoapDeviceTestActivity.java | 65 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/ |
D | AccessoryFilter.java | 53 public AccessoryFilter(UsbAccessory accessory) { in AccessoryFilter() argument 54 mManufacturer = accessory.getManufacturer(); in AccessoryFilter() 55 mModel = accessory.getModel(); in AccessoryFilter() 56 mVersion = accessory.getVersion(); in AccessoryFilter() 108 public boolean contains(AccessoryFilter accessory) { in contains() argument 109 if (mManufacturer != null && !Objects.equals(accessory.mManufacturer, mManufacturer)) { in contains() 112 if (mModel != null && !Objects.equals(accessory.mModel, mModel)) return false; in contains() 113 return !(mVersion != null && !Objects.equals(accessory.mVersion, mVersion)); in contains() 129 UsbAccessory accessory = (UsbAccessory)obj; in equals() local 130 return (mManufacturer.equals(accessory.getManufacturer()) && in equals() [all …]
|
D | UsbAccessory.java | 189 UsbAccessory accessory = (UsbAccessory)obj; in equals() local 190 return (compare(mManufacturer, accessory.getManufacturer()) && in equals() 191 compare(mModel, accessory.getModel()) && in equals() 192 compare(mDescription, accessory.getDescription()) && in equals() 193 compare(mVersion, accessory.getVersion()) && in equals() 194 compare(mUri, accessory.getUri()) && in equals() 195 compare(getSerial(), accessory.getSerial())); in equals()
|
D | IUsbManager.aidl | 45 ParcelFileDescriptor openAccessory(in UsbAccessory accessory); in openAccessory() argument 55 void setAccessoryPackage(in UsbAccessory accessory, String packageName, int userId); in setAccessoryPackage() argument 61 boolean hasAccessoryPermission(in UsbAccessory accessory); in hasAccessoryPermission() argument 73 void requestAccessoryPermission(in UsbAccessory accessory, String packageName, in requestAccessoryPermission() argument 80 void grantAccessoryPermission(in UsbAccessory accessory, int uid); in grantAccessoryPermission() argument
|
D | UsbManager.java | 499 UsbAccessory accessory = mService.getCurrentAccessory(); in getAccessoryList() local 500 if (accessory == null) { in getAccessoryList() 503 return new UsbAccessory[] { accessory }; in getAccessoryList() 521 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { in openAccessory() argument 523 return mService.openAccessory(accessory); in openAccessory() 582 public boolean hasPermission(UsbAccessory accessory) { in hasPermission() argument 587 return mService.hasAccessoryPermission(accessory); in hasPermission() 643 public void requestPermission(UsbAccessory accessory, PendingIntent pi) { in requestPermission() argument 645 mService.requestAccessoryPermission(accessory, mContext.getPackageName(), pi); in requestPermission()
|
/frameworks/base/libs/usb/tests/AccessoryChat/src/com/android/accessorychat/ |
D | 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]); 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/services/usb/java/com/android/server/usb/ |
D | UsbPermissionManager.java | 75 void removeAccessoryPermissions(@NonNull UsbAccessory accessory) { in removeAccessoryPermissions() argument 77 mAccessoryPermissionMap.remove(accessory); in removeAccessoryPermissions() 116 void grantAccessoryPermission(@NonNull UsbAccessory accessory, int uid) { in grantAccessoryPermission() argument 118 SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory); in grantAccessoryPermission() 121 mAccessoryPermissionMap.put(accessory, uidList); in grantAccessoryPermission() 154 boolean hasPermission(@NonNull UsbAccessory accessory, int uid) { in hasPermission() argument 159 SparseBooleanArray uidList = mAccessoryPermissionMap.get(accessory); in hasPermission() 181 @Nullable UsbAccessory accessory, in requestPermissionDialog() argument 192 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in requestPermissionDialog() 228 for (UsbAccessory accessory : mAccessoryPermissionMap.keySet()) { in dump() [all …]
|
D | UsbUserSettingsManager.java | 99 void removeAccessoryPermissions(@NonNull UsbAccessory accessory) { in removeAccessoryPermissions() argument 100 mUsbPermissionManager.removeAccessoryPermissions(accessory); in removeAccessoryPermissions() 172 public boolean hasPermission(UsbAccessory accessory, int uid) { in hasPermission() argument 173 return mUsbPermissionManager.hasPermission(accessory, uid); in hasPermission() 183 public void checkPermission(UsbAccessory accessory, int uid) { in checkPermission() argument 184 if (!hasPermission(accessory, uid)) { in checkPermission() 186 + accessory); in checkPermission() 191 @Nullable UsbAccessory accessory, in requestPermissionDialog() argument 208 accessory, canBeDefault, packageName, uid, mUserContext, pi); in requestPermissionDialog() 243 public void requestPermission(UsbAccessory accessory, String packageName, PendingIntent pi, in requestPermission() argument [all …]
|
D | UsbHandlerManager.java | 56 void showUsbAccessoryUriActivity(@NonNull UsbAccessory accessory, in showUsbAccessoryUriActivity() argument 58 String uri = accessory.getUri(); in showUsbAccessoryUriActivity() 64 dialogIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in showUsbAccessoryUriActivity() 84 @Nullable UsbAccessory accessory) { in confirmUsbHandler() argument 96 resolverIntent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in confirmUsbHandler()
|
D | UsbProfileGroupSettingsManager.java | 543 UsbAccessory accessory) { in packageMatchesLocked() argument 560 if (accessory != null) { in packageMatchesLocked() 566 if (accessoryFilters.get(i).matches(accessory)) { in packageMatchesLocked() 726 UsbAccessory accessory, Intent intent) { in getAccessoryMatchesLocked() argument 732 if (packageMatchesLocked(resolveInfo, null, accessory)) { in getAccessoryMatchesLocked() 807 public void accessoryAttached(UsbAccessory accessory) { in accessoryAttached() argument 809 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in accessoryAttached() 817 matches = getAccessoryMatchesLocked(accessory, intent); in accessoryAttached() 819 matches, mAccessoryPreferenceMap.get(new AccessoryFilter(accessory))); in accessoryAttached() 822 resolveActivity(intent, matches, defaultActivity, null, accessory); in accessoryAttached() [all …]
|
D | UsbService.java | 287 public ParcelFileDescriptor openAccessory(UsbAccessory accessory) { in openAccessory() argument 296 return mDeviceManager.openAccessory(accessory, getSettingsForUser(user), in openAccessory() 299 Slog.w(TAG, "Cannot open " + accessory + " for user " + user in openAccessory() 335 public void setAccessoryPackage(UsbAccessory accessory, String packageName, int userId) { in setAccessoryPackage() argument 336 accessory = Preconditions.checkNotNull(accessory); in setAccessoryPackage() 344 mSettingsManager.getSettingsForProfileGroup(user).setAccessoryPackage(accessory, in setAccessoryPackage() 366 public boolean hasAccessoryPermission(UsbAccessory accessory) { in hasAccessoryPermission() argument 372 return getSettingsForUser(userId).hasPermission(accessory, uid); in hasAccessoryPermission() 394 UsbAccessory accessory, String packageName, PendingIntent pi) { in requestAccessoryPermission() argument 400 getSettingsForUser(userId).requestPermission(accessory, packageName, pi, uid); in requestAccessoryPermission() [all …]
|
D | UsbSettingsManager.java | 196 void usbAccessoryRemoved(@NonNull UsbAccessory accessory) { in usbAccessoryRemoved() argument 200 mSettingsByUser.valueAt(i).removeAccessoryPermissions(accessory); in usbAccessoryRemoved() 206 intent.putExtra(UsbManager.EXTRA_ACCESSORY, accessory); in usbAccessoryRemoved()
|
D | UsbDeviceManager.java | 220 String accessory = event.get("ACCESSORY"); in onUEvent() local 223 } else if ("START".equals(accessory)) { in onUEvent() 1969 public ParcelFileDescriptor openAccessory(UsbAccessory accessory, in openAccessory() argument 1975 if (!currentAccessory.equals(accessory)) { in openAccessory() 1976 String error = accessory.toString() in openAccessory() 1981 settings.checkPermission(accessory, uid); in openAccessory()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/ |
D | UsbDisconnectedReceiver.java | 43 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/core/java/com/android/internal/usb/ |
D | DumpUtils.java | 51 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/ |
D | README.txt | 1 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/ |
D | Android.bp | 5 "accessory.c",
|
/frameworks/base/libs/usb/ |
D | Android.bp | 18 name: "com.android.future.usb.accessory",
|
/frameworks/av/services/audiopolicy/engineconfigurable/parameter-framework/examples/Phone/Settings/ |
D | device_for_product_strategy_accessibility.pfw | 375 # 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
|
D | device_for_product_strategy_dtmf.pfw | 341 # 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/tests/AccessoryDisplay/ |
D | README | 12 to be connected using the USB accessory protocol. Think of it as
|
/frameworks/base/core/proto/android/service/ |
D | usb.proto | 82 // firmware of the device. If an Android phone is configured as accessory, the 83 // app that sets up the accessory side of the connection set this. Either way,
|