Skip to content
Snippets Groups Projects
Commit 9798f308 authored by Nitin Shivpure's avatar Nitin Shivpure Committed by Jakub Pawlowski
Browse files

HOGP: Update status to OK, if link is already encrypted

Usecase:
1) Connect to HOGP device. (Because of some condition encryption fails with Connection
   Timeout, remote device turned off when connection was initiated)
2) Try to connect again to HoGP device

Expected Result:
Connection should be successful

Observed Result:
UI stuck in connecting state and connection never succeeds.

Root cause:
When encryption fails in previous iteration, encryption happens before HoGP Server starts
security procedure, leading to Encryption Complete event being received with wrong status.

Fix:
Update the status to success when sending encryption complete event if link is already
encrypted

Test: Issue is not seen after above steps

Fixes: 76133015
Change-Id: Ib404cf157289170ea300eae40f51393606c35105
(cherry picked from commit 17d692578102d73bcf30b00442cdd456e92a7912)
parent 5400a4a2
No related branches found
No related tags found
No related merge requests found
......@@ -1098,6 +1098,7 @@ void bta_hh_start_security(tBTA_HH_DEV_CB* p_cb,
/* if link has been encrypted */
if (sec_flag & BTM_SEC_FLAG_ENCRYPTED) {
p_cb->status = BTA_HH_OK;
bta_hh_sm_execute(p_cb, BTA_HH_ENC_CMPL_EVT, NULL);
}
/* if bonded and link not encrypted */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment