Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50816873 authored by weichinweng's avatar weichinweng
Browse files

Reset GATT cache file if connection state is unpairing

Reset GATT cache for the device if connection state is unpairing, avoid
remaining useless gatt cache file.

Bug: 137697556
Test: Pair/Forget device, and check whether the gatt cache is exist.
Change-Id: I617289b7802a4f03e2910defc419a0bbb0a2aa06
parent a0a6b44f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2767,6 +2767,9 @@ static void bta_dm_acl_change(bool is_new, const RawAddress& bd_addr,
                bta_dm_cb.device_list.peer_device[i].peer_bdaddr))
          issue_unpair_cb = true;

        /* remove all cached GATT information */
        BTA_GATTC_Refresh(bd_addr);

        APPL_TRACE_DEBUG("%s: Unpairing: issue unpair CB = %d ", __func__,
                         issue_unpair_cb);
      }