summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-10-03 13:25:01 -0700
committerJakub Pawlowski <jpawlowski@google.com>2016-10-03 14:25:29 -0700
commitf87953f1be45c8f3e6f28610e1ac4dd29be007f1 (patch)
tree964ed4cd98cb8ab330b4fd3596c290ab6602c3fe
parent013c32bf98b8d511dc29fcd7de7578a421a52590 (diff)
downloadandroid-system-bt-f87953f1be45c8f3e6f28610e1ac4dd29be007f1.tar.gz
android-system-bt-f87953f1be45c8f3e6f28610e1ac4dd29be007f1.tar.xz
Fix bad GATT client state machine state after successfull cache load
If the GATT service cache was successfully loaded from a file, the state must be reset to idle. Bug: 31175159 Change-Id: I92ebf1bec9d2e7467d7412b41923614ec5a13b6d
-rw-r--r--bta/gatt/bta_gattc_act.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bta/gatt/bta_gattc_act.c b/bta/gatt/bta_gattc_act.c
index 01b06b8..3390b94 100644
--- a/bta/gatt/bta_gattc_act.c
+++ b/bta/gatt/bta_gattc_act.c
@@ -715,6 +715,7 @@ void bta_gattc_conn(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
{
p_clcb->p_srcb->state = BTA_GATTC_SERV_LOAD;
if (bta_gattc_cache_load(p_clcb)) {
+ p_clcb->p_srcb->state = BTA_GATTC_SERV_IDLE;
bta_gattc_reset_discover_st(p_clcb->p_srcb, BTA_GATT_OK);
} else {
p_clcb->p_srcb->state = BTA_GATTC_SERV_DISC;