summaryrefslogtreecommitdiffstats
path: root/bta
diff options
context:
space:
mode:
authorSatish kumar sugasi <ssugas@codeaurora.org>2014-10-09 19:31:16 -0700
committerSatish kumar sugasi <ssugas@codeaurora.org>2015-11-02 14:45:26 -0800
commitb5246fd86c3fdbb09b9b67a289926949a14b6297 (patch)
treea86d94a81e63205746b3155fdb6a7534184ff394 /bta
parenta897f16f2fb3f156acd2b12bfafc855211ddde39 (diff)
downloadandroid_system_bt-b5246fd86c3fdbb09b9b67a289926949a14b6297.tar.gz
android_system_bt-b5246fd86c3fdbb09b9b67a289926949a14b6297.tar.bz2
android_system_bt-b5246fd86c3fdbb09b9b67a289926949a14b6297.zip
Bluetooth: Enable scan refresh notificatons for ScPP profile
This change adds support for enable notification of scan refresh value if remote device supports scan parameter services .this also writes scan parameters to remote device whenever scan service client receives notification of scan refresh. CRs-Fixed: 736989 Change-Id: I3e41976cdb1f7fa952e53e33f90d52320d5808f4
Diffstat (limited to 'bta')
-rw-r--r--bta/hh/bta_hh_le.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bta/hh/bta_hh_le.c b/bta/hh/bta_hh_le.c
index 5b5096418..2cb85c114 100644
--- a/bta/hh/bta_hh_le.c
+++ b/bta/hh/bta_hh_le.c
@@ -2905,7 +2905,7 @@ void bta_hh_le_update_scpp(tBTA_HH_DEV_CB *p_dev_cb, tBTA_HH_DATA *p_buf)
BTA_GATTC_WriteCharValue(p_dev_cb->conn_id,
&char_id,
BTA_GATTC_TYPE_WRITE_NO_RSP,
- 2,
+ 4,
value,
BTA_GATT_AUTH_REQ_NONE);
@@ -2984,7 +2984,14 @@ static void bta_hh_gattc_callback(tBTA_GATTC_EVT event, tBTA_GATTC *p_data)
case BTA_GATTC_NOTIF_EVT: /* 10 */
- bta_hh_le_input_rpt_notify(&p_data->notify);
+ p_dev_cb = bta_hh_le_find_dev_cb_by_conn_id(p_data->notify.conn_id);
+ if (p_dev_cb) {
+ if( p_data->notify.char_id.char_id.uuid.uu.uuid16 == GATT_UUID_SCAN_REFRESH ) {
+ BTA_HhUpdateLeScanParam(p_dev_cb->hid_handle,BTM_BLE_SCAN_SLOW_INT_1,BTM_BLE_SCAN_SLOW_WIN_1);
+ }
+ else
+ bta_hh_le_input_rpt_notify(&p_data->notify);
+ }
break;
case BTA_GATTC_ENC_CMPL_CB_EVT: /* 17 */