diff options
author | Hansong Zhang <hsz@google.com> | 2017-11-16 18:59:36 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-11-16 18:59:36 +0000 |
commit | 2364431ec81e88ca139498efa1e277567fd3888c (patch) | |
tree | 1980183231b8e604a57107ed838c69dcedd9d605 /framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java | |
parent | 359a4a8441b4aa1c6e93a2ce6b6779cf444fc656 (diff) | |
parent | a9b2b0496ca86e28010ba541bb01431804541dd3 (diff) |
Merge "Bluetooth HID Device API docs and helper" am: a89f6150dc
am: a9b2b0496c
Change-Id: Ic95f83d9884aea8d75ca33fed1ddf69d6c0e33e3
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; } |