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

Commit a936f13a authored by weichinweng's avatar weichinweng Committed by Automerger Merge Worker
Browse files

Into the BG connection when the HA disconnects from remote side am: 3b91d5ce

Change-Id: Ifc4096e20f78405129188783e4d1bc136415fc5a
parents dd73b095 3b91d5ce
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -921,9 +921,6 @@ class HearingAidImpl : public HearingAid {
    }

    if (hearingDevice->first_connection) {
      /* add device into BG connection to accept remote initiated connection */
      BTA_GATTC_Open(gatt_if, address, false, GATT_TRANSPORT_LE, false);

      btif_storage_add_hearing_aid(*hearingDevice);

      hearingDevice->first_connection = false;
@@ -1507,7 +1504,10 @@ class HearingAidImpl : public HearingAid {

    DoDisconnectCleanUp(hearingDevice);

    // Keep this hearing aid in the list, and allow to reconnect back.
    // This is needed just for the first connection. After stack is restarted,
    // code that loads device will add them to whitelist.
    BTA_GATTC_Open(gatt_if, hearingDevice->address, false, GATT_TRANSPORT_LE,
                   false);

    callbacks->OnConnectionState(ConnectionState::DISCONNECTED, remote_bda);