diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-06-14 13:39:57 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:23 -0700 |
commit | 548ae5f7abd366a6d85b485875dee401d2411f67 (patch) | |
tree | ea3929bed4493428d37b23b0806c356ab0cfbc4a /btif | |
parent | 757a3d1d2ccd0b14a7b14b9883ce7a9a254b7dc8 (diff) | |
download | external_bluetooth_bluedroid-548ae5f7abd366a6d85b485875dee401d2411f67.zip external_bluetooth_bluedroid-548ae5f7abd366a6d85b485875dee401d2411f67.tar.gz external_bluetooth_bluedroid-548ae5f7abd366a6d85b485875dee401d2411f67.tar.bz2 |
Notify bond state change prior to UuidsChanged
UuidsChanged event will force the Settings app to fetch the bonded
devices list. Thus, bond state change event needs to be sent prior
to sending SDP data (uuids)
Change-Id: I15c420f477c89780022c28b47a3f7c1cd1b20aeb
Diffstat (limited to 'btif')
-rwxr-xr-x | btif/src/btif_dm.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index a655364..818085f 100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -1000,13 +1000,10 @@ static void btif_dm_search_services_evt(UINT16 event, char *p_param) BTIF_TRACE_ERROR2("Index: %d uuid:%s", i, temp); } } - /* Also write this to the NVRAM */ - ret = btif_storage_set_remote_device_property(&bd_addr, &prop); - ASSERTC(ret == BT_STATUS_SUCCESS, "storing remote services failed", ret); - /* Send the event to the BTIF */ - HAL_CBACK(bt_hal_cbacks, remote_device_properties_cb, - BT_STATUS_SUCCESS, &bd_addr, 1, &prop); + /* onUuidChanged requires getBondedDevices to be populated. + ** bond_state_changed needs to be sent prior to remote_device_property + */ if ((pairing_cb.state == BT_BOND_STATE_BONDING) && bdcmp(p_data->disc_res.bd_addr, pairing_cb.bd_addr) == 0) { @@ -1014,6 +1011,13 @@ static void btif_dm_search_services_evt(UINT16 event, char *p_param) __FUNCTION__); bond_state_changed(BT_STATUS_SUCCESS, &bd_addr, BT_BOND_STATE_BONDED); } + + /* Also write this to the NVRAM */ + ret = btif_storage_set_remote_device_property(&bd_addr, &prop); + ASSERTC(ret == BT_STATUS_SUCCESS, "storing remote services failed", ret); + /* Send the event to the BTIF */ + HAL_CBACK(bt_hal_cbacks, remote_device_properties_cb, + BT_STATUS_SUCCESS, &bd_addr, 1, &prop); } break; |