OSDN Git Service

Register for Service Changed notification after encryption
authorJakub Pawlowski <jpawlowski@google.com>
Wed, 4 Jul 2018 14:11:52 +0000 (07:11 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Tue, 10 Jul 2018 08:46:59 +0000 (08:46 +0000)
This fixes issue introduced in commit 645ee14ce2327fff61f54d208763eca1c143063e
Registration for Service Changed notifications was
disabled, because there was no good way back then to have
"opportunistic" app. Since opportunistic apps were introduced, and the
code in GATT_ConfigServiceChangeCCC is already marking connection as
opportunistic, reenable notification registration.

Test: manual verification, that Service Changed descriptor is set
Change-Id: Iefaec3914829fa4a4a60dc3c3790c3daa9f4f4d8

bta/dm/bta_dm_act.cc

index b90b6a8..3460ecc 100644 (file)
@@ -3849,6 +3849,8 @@ static uint8_t bta_dm_ble_smp_cback(tBTM_LE_EVT event, const RawAddress& bda,
         bta_dm_remove_sec_dev_entry(bda);
       } else {
         sec_event.auth_cmpl.success = true;
+        if (!p_data->complt.smp_over_br)
+          GATT_ConfigServiceChangeCCC(bda, true, BT_TRANSPORT_LE);
       }
 
       if (bta_dm_cb.p_sec_cback) {