diff options
author | Hansong Zhang <hsz@google.com> | 2017-11-16 19:14:00 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-11-16 19:14:00 +0000 |
commit | 3950e2f4e42f1a8f16abe6cb499fedaacafa56e9 (patch) | |
tree | 424ba63b4e4bec5ae38e44e971611da8c434ea69 /framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java | |
parent | 375733410cdb3194dfac40f5489cc59ed32488f8 (diff) | |
parent | 2364431ec81e88ca139498efa1e277567fd3888c (diff) |
Merge "Bluetooth HID Device API docs and helper" am: a89f6150dc am: a9b2b0496c
am: 2364431ec8
Change-Id: Ic655da25a4722a49a982dad68621cf4e669af8fe
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java b/framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java index f01c493289..4669637043 100644 --- a/framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java +++ b/framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java @@ -19,6 +19,8 @@ package android.bluetooth; import android.os.Parcel; import android.os.Parcelable; +import java.util.Arrays; + /** * Represents the Service Discovery Protocol (SDP) settings for a Bluetooth * HID Device application. @@ -39,6 +41,18 @@ public final class BluetoothHidDeviceAppSdpSettings implements Parcelable { public final byte subclass; public final byte[] descriptors; + /** + * Create a BluetoothHidDeviceAppSdpSettings object for the Bluetooth SDP record. + * @param name Name of this Bluetooth HID device. Maximum length is 50 bytes. + * @param description Description for this Bluetooth HID device. Maximum length is 50 bytes. + * @param provider Provider of this Bluetooth HID device. Maximum length is 50 bytes. + * @param subclass Subclass of this Bluetooth HID device. + * See <a href="www.usb.org/developers/hidpage/HID1_11.pdf"> + * www.usb.org/developers/hidpage/HID1_11.pdf Section 4.2</a> + * @param descriptors Descriptors of this Bluetooth HID device. + * See <a href="www.usb.org/developers/hidpage/HID1_11.pdf"> + * www.usb.org/developers/hidpage/HID1_11.pdf Chapter 6</a> Maximum length is 2048 bytes. + */ public BluetoothHidDeviceAppSdpSettings(String name, String description, String provider, byte subclass, byte[] descriptors) { this.name = name; @@ -52,7 +66,11 @@ public final class BluetoothHidDeviceAppSdpSettings implements Parcelable { public boolean equals(Object o) { if (o instanceof BluetoothHidDeviceAppSdpSettings) { BluetoothHidDeviceAppSdpSettings sdp = (BluetoothHidDeviceAppSdpSettings) o; - return false; + return this.name.equals(sdp.name) + && this.description.equals(sdp.description) + && this.provider.equals(sdp.provider) + && this.subclass == sdp.subclass + && Arrays.equals(this.descriptors, sdp.descriptors); } return false; } |