Loading system/bta/gatt/bta_gattc_act.cc +5 −2 Original line number Diff line number Diff line Loading @@ -542,9 +542,12 @@ void bta_gattc_conn(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) { p_clcb->p_srcb->state != BTA_GATTC_SERV_IDLE) { if (p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE) { p_clcb->p_srcb->state = BTA_GATTC_SERV_LOAD; // For bonded devices, read cache directly, and back to connected state. // Consider the case that if GATT Server is changed, but no service // changed indication is received, the database might be out of date. So // if robust caching is enabled, any time when connection is established, // always check the db hash first, not just load the stored database. gatt::Database db = bta_gattc_cache_load(p_clcb->p_srcb->server_bda); if (!db.IsEmpty() && btm_sec_is_a_bonded_dev(p_clcb->p_srcb->server_bda)) { if (!bta_gattc_is_robust_caching_enabled() && !db.IsEmpty()) { p_clcb->p_srcb->gatt_database = db; p_clcb->p_srcb->state = BTA_GATTC_SERV_IDLE; bta_gattc_reset_discover_st(p_clcb->p_srcb, GATT_SUCCESS); Loading Loading
system/bta/gatt/bta_gattc_act.cc +5 −2 Original line number Diff line number Diff line Loading @@ -542,9 +542,12 @@ void bta_gattc_conn(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) { p_clcb->p_srcb->state != BTA_GATTC_SERV_IDLE) { if (p_clcb->p_srcb->state == BTA_GATTC_SERV_IDLE) { p_clcb->p_srcb->state = BTA_GATTC_SERV_LOAD; // For bonded devices, read cache directly, and back to connected state. // Consider the case that if GATT Server is changed, but no service // changed indication is received, the database might be out of date. So // if robust caching is enabled, any time when connection is established, // always check the db hash first, not just load the stored database. gatt::Database db = bta_gattc_cache_load(p_clcb->p_srcb->server_bda); if (!db.IsEmpty() && btm_sec_is_a_bonded_dev(p_clcb->p_srcb->server_bda)) { if (!bta_gattc_is_robust_caching_enabled() && !db.IsEmpty()) { p_clcb->p_srcb->gatt_database = db; p_clcb->p_srcb->state = BTA_GATTC_SERV_IDLE; bta_gattc_reset_discover_st(p_clcb->p_srcb, GATT_SUCCESS); Loading