OSDN Git Service

HOGP: Update status to OK, if link is already encrypted
authorNitin Shivpure <nshivpur@codeaurora.org>
Thu, 22 Mar 2018 10:46:32 +0000 (16:16 +0530)
committerJakub Pawlowski <jpawlowski@google.com>
Fri, 23 Mar 2018 22:50:05 +0000 (22:50 +0000)
commit17d692578102d73bcf30b00442cdd456e92a7912
tree248480a9dffb47e45f4b1d3c89a3895e76bdf3da
parent61dfe5ccf014aa17cbe800b1195afdb7e474a376
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
bta/hh/bta_hh_le.cc