summaryrefslogtreecommitdiffstats
path: root/device/include/interop.h
diff options
context:
space:
mode:
authorHemant Gupta <hemantg@codeaurora.org>2015-04-26 10:32:57 +0530
committerLinux Build Service Account <lnxbuild@localhost>2015-10-06 03:21:28 -0600
commitda33b4613d9e9245cdcc1c3fc89dd4013a9bc2f3 (patch)
tree1ad0420b79c976e29bc1cb0b1e492f41353c2549 /device/include/interop.h
parent47e2f761f77ecf72aeb1d47fdcca9af04a569454 (diff)
downloadandroid_system_bt-da33b4613d9e9245cdcc1c3fc89dd4013a9bc2f3.tar.gz
android_system_bt-da33b4613d9e9245cdcc1c3fc89dd4013a9bc2f3.tar.bz2
android_system_bt-da33b4613d9e9245cdcc1c3fc89dd4013a9bc2f3.zip
HID: Enhance blacklist logic for restricting SDP.
This patch enhances existing blacklist logic for restricting SDP for hid devices, by adding BD address and name support in addition to manufacturer id. Also blacklist logic is added for HID devices not supporting authentication. - Targus mouse does not support authentication, so blacklist logic added to disable authentication for such hid devices. - Many hid mouse gives out of resource error for incoming connections when more than 1 sdp connection is made to them. Current implementaion in BD stack performs SDP from 2 layers HID BTA layer to determine hid desritors for hid device and btif layer for determining uuid's supported. Blacklist logic is enhanced for such devices to not perform sdp from btif layer after authentication and directly inform upper layers that sdp is complete by adding support for BD address and name based addition to blacklist. Change-Id: I4fe1e016549bb55ad176cd014bf1d5da85b38353 CRs-Fixed: 465421, 568114
Diffstat (limited to 'device/include/interop.h')
-rw-r--r--device/include/interop.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/device/include/interop.h b/device/include/interop.h
index e2ca682a3..69b62d752 100644
--- a/device/include/interop.h
+++ b/device/include/interop.h
@@ -32,11 +32,36 @@ typedef enum {
// requiring multiple retries to complete pairing. To avoid degrading the user
// experience for those devices, automatically re-try pairing if page
// timeouts are received during pairing.
- INTEROP_AUTO_RETRY_PAIRING
+ INTEROP_AUTO_RETRY_PAIRING,
+
+ // Some HID devices have proven problematic behaviour if SDP is initiated more
+ // while HID connection is in progress or if more than 1 SDP connection is created
+ // with those HID devices rsulting in issues of connection failure with such devices.
+ // To avoid degrading the user experience with those devices, sdp is not attempted
+ // as part of pairing process from btif layer.
+ INTEROP_DISABLE_SDP_AFTER_PAIRING,
+
+ // Some HID pointing devices have proven problematic behaviour if pairing is initiated with
+ // them, resulting in no response for authentication request and ultimately resulting
+ // in connection failure.
+ // To avoid degrading the user experience with those devices, authentication request
+ // is not requested explictly.
+ INTEROP_DISABLE_AUTH_FOR_HID_POINTING,
} interop_feature_t;
// Check if a given |addr| matches a known interoperability workaround as identified
// by the |interop_feature_t| enum. This API is used for simple address based lookups
// where more information is not available. No look-ups or random address resolution
// is performed on |addr|.
-bool interop_match(const interop_feature_t feature, const bt_bdaddr_t *addr);
+bool interop_addr_match(const interop_feature_t feature, const bt_bdaddr_t *addr);
+
+// Check if a given |name| matches a known interoperability workaround as identified
+// by the |interop_feature_t| enum. This API is used for simple name based lookups
+// where more information is not available.
+bool interop_name_match(const interop_feature_t feature, const char *addr);
+
+// Check if a given |manufacturer| matches a known interoperability workaround as identified
+// by the |interop_feature_t| enum. This API is used for simple name based lookups
+// where more information is not available.
+bool interop_manufacturer_match(const interop_feature_t feature, uint16_t manufacturer);
+