diff options
| -rw-r--r-- | services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java index e61542824083..6a3469c5fa24 100644 --- a/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java +++ b/services/usb/java/com/android/server/usb/descriptors/UsbDescriptorParser.java @@ -177,11 +177,15 @@ public final class UsbDescriptorParser { * Audio Class Specific */ case UsbDescriptor.DESCRIPTORTYPE_AUDIO_INTERFACE: - descriptor = UsbACInterface.allocDescriptor(this, stream, length, type); + if (mDeviceDescriptor.getDevClass() == UsbDescriptor.CLASSID_AUDIO) { + descriptor = UsbACInterface.allocDescriptor(this, stream, length, type); + } break; case UsbDescriptor.DESCRIPTORTYPE_AUDIO_ENDPOINT: - descriptor = UsbACEndpoint.allocDescriptor(this, length, type); + if (mDeviceDescriptor.getDevClass() == UsbDescriptor.CLASSID_AUDIO) { + descriptor = UsbACEndpoint.allocDescriptor(this, length, type); + } break; default: |