summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java
diff options
context:
space:
mode:
authorHansong Zhang <hsz@google.com>2017-11-16 18:50:16 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-11-16 18:50:16 +0000
commita9b2b0496ca86e28010ba541bb01431804541dd3 (patch)
treecbdaad26179bd43cce5d86278d4f880ee75725b6 /framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java
parentbe6fdbe69e12d1bcad2fb7c505810885aa486ddd (diff)
parent57e570ee2ea0f9d8da921579ecfeb3a50133c5f8 (diff)
Merge "Bluetooth HID Device API docs and helper"
am: a89f6150dc Change-Id: I4b91cd3e528f480ea216e9ffb0414910d4762d3b
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHidDeviceAppSdpSettings.java20
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;
}