diff options
author | Priti Aghera <paghera@broadcom.com> | 2012-05-04 14:15:43 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:19 -0700 |
commit | 14d27c61fc40537f70fd6a4999db46d1864971ef (patch) | |
tree | d7ecad88a26a52b9fd1ba0c5b39905534e50b827 /btif | |
parent | 4ac0a4a6cec2456b52626adcdd255cbfbe82eea8 (diff) | |
download | external_bluetooth_bluedroid-14d27c61fc40537f70fd6a4999db46d1864971ef.zip external_bluetooth_bluedroid-14d27c61fc40537f70fd6a4999db46d1864971ef.tar.gz external_bluetooth_bluedroid-14d27c61fc40537f70fd6a4999db46d1864971ef.tar.bz2 |
Fix for Apple Magic mouse: Changed the product id to bind to a correct driver
Change-Id: I1dbe7352f7af4f816e4330f37d1d24b65474e8f1
Diffstat (limited to 'btif')
-rwxr-xr-x | btif/src/btif_hh.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c index 39203ac..788e4c6 100755 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -96,6 +96,9 @@ #define KEYSTATE_MASK_CAPSLOCK 0x02 #define KEYSTATE_MASK_SCROLLLOCK 0x04 +//For Apple Magic Mouse +#define MAGICMOUSE_VENDOR_ID 0x05ac +#define MAGICMOUSE_PRODUCT_ID 0x030d extern const int BT_UID; extern const int BT_GID; @@ -694,6 +697,14 @@ static void btif_hh_upstreams_evt(UINT16 event, char* p_param) BTIF_TRACE_WARNING2("%s: name = %s", __FUNCTION__, cached_name); + //Fix for Apple Magic Mouse + //For Apple Magic Mouse change the product id and version in order to bind to generic-bluetooth driver + if((p_data->dscp_info.vendor_id == MAGICMOUSE_VENDOR_ID) && (p_data->dscp_info.product_id == MAGICMOUSE_PRODUCT_ID)) + { + p_data->dscp_info.product_id = 0x30c; /* Product id for Mighty mouse*/ + p_data->dscp_info.version = 0x0200; /* Version for Mighty mouse*/ + } + bta_hh_co_send_hid_info(p_dev, cached_name, p_data->dscp_info.vendor_id, p_data->dscp_info.product_id, p_data->dscp_info.version, p_data->dscp_info.ctry_code, |