OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8da3a9e
)
HF_Client: Send BTA_HF_CLIENT_RFC_CLOSE_EVT when client_cb == NULL
author
Song Gao
<quic_songg@quicinc.com>
Thu, 12 Dec 2019 18:32:27 +0000
(10:32 -0800)
committer
Hansong Zhang
<hsz@google.com>
Thu, 12 Dec 2019 22:46:39 +0000
(14:46 -0800)
Bug:
146086992
Test: manual
Change-Id: I685873b0c4c74ddb4e273e2a38307ec2af0bbd13
bta/hf_client/bta_hf_client_rfc.cc
patch
|
blob
|
history
diff --git
a/bta/hf_client/bta_hf_client_rfc.cc
b/bta/hf_client/bta_hf_client_rfc.cc
index
967632e
..
535371f
100644
(file)
--- a/
bta/hf_client/bta_hf_client_rfc.cc
+++ b/
bta/hf_client/bta_hf_client_rfc.cc
@@
-137,6
+137,10
@@
static void bta_hf_client_mgmt_cback(uint32_t code, uint16_t port_handle) {
RFCOMM_RemoveServer(port_handle);
p_buf->hdr.event = BTA_HF_CLIENT_RFC_CLOSE_EVT;
+ } else if (client_cb == NULL) {
+ // client_cb is already cleaned due to hfp client disabled.
+ // Assigned a valid event value to header and send this message anyway.
+ p_buf->hdr.event = BTA_HF_CLIENT_RFC_CLOSE_EVT;
}
p_buf->hdr.layer_specific = client_cb != NULL ? client_cb->handle : 0;