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

Commit f914684a authored by weichinweng's avatar weichinweng
Browse files

Hearing Aid: Removes all registrations for connection when disconnect HA

* On the current design, when the disconnect Hearing Aid is triggered
from UI. It will Cancel autoconnect by gatt_if first. It will cause the
fixed_chnl_idle_tout isn't set. On the condition, it will cause the
disconnect isn't finished.
* The fix is change the behavior. Directly remove all registrations for
connection when disconnect HA.

Bug: 122264537
Bug: 123214035
Test: make, BT off/on when connected HA,
Toggle disconnect/connect HA from Bluetooth UI,
Turn off/onn HA after Connected HA.

Change-Id: If011c1ab632e1fcb51a68b3c122743534b5f6c63
parent ad862c5b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1251,8 +1251,8 @@ class HearingAidImpl : public HearingAid {
      BTA_GATTC_CancelOpen(gatt_if, address, true);
    }

    // cancel autoconnect
    BTA_GATTC_CancelOpen(gatt_if, address, false);
    // Removes all registrations for connection.
    BTA_GATTC_CancelOpen(0, address, false);

    // Inform the other side (if any) of this disconnection
    std::vector<uint8_t> inform_disconn_state(