Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1f96c61 authored by Dorin Drimus's avatar Dorin Drimus Committed by Cherrypicker Worker
Browse files

Fix HOGP issue when encryption failed

Problem:
When encryption fails with status=0x000e, reason=0x0012, this will do cancel open and memset for the control block of HOGP. "bta_hh_gattc_cback" will not be called when reconnected again and this will make the key invalid after reconnection.

Solution:
Don't call "bta_hh_le_api_disc_act" when this reason happened

Ignore-AOSP-First: backport cherry-pick from aosp Ie3f9b58288670eee6280838ea533aea619a5d7df

Change-Id: Ie3f9b58288670eee6280838ea533aea619a5d7df
Merged-In: Ie3f9b58288670eee6280838ea533aea619a5d7df

Test: Funai TV remote control reconnect OK
Bug: 211528896
Change-Id: Id39d3f96c8bea69ffa205f2c7ed1175cd3d624c8
(cherry picked from commit 9bb868b391f10cdffaa814cac7f571fd44beb946)
Merged-In: Id39d3f96c8bea69ffa205f2c7ed1175cd3d624c8
parent 34dd8d7d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1015,7 +1015,8 @@ void bta_hh_security_cmpl(tBTA_HH_DEV_CB* p_cb,
              bta_hh_status_text(p_cb->status).c_str(),
              btm_status_text(p_cb->btm_status).c_str());
    if (!(p_cb->status == BTA_HH_ERR_SEC &&
          p_cb->btm_status == BTM_ERR_PROCESSING))
          (p_cb->btm_status == BTM_ERR_PROCESSING ||
           p_cb->btm_status == BTM_FAILED_ON_SECURITY)))
      bta_hh_le_api_disc_act(p_cb);
    }
}