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

Commit 4b4fe801 authored by weichinweng's avatar weichinweng
Browse files

HearingAid: Fix the data channel open fail case during connecting

* If the data channel open fail when the connection is come from
  background connection, will cause the profile doesn't correctly
  disconnect since the connecting_actively is false. Using
  accepting_audio instead of connecting_actively makes sure
  whether the data channel is opened.

Tag: #feature
Test: gd/cert/run
Bug: 220970000
Change-Id: I9c18331b0d462d5beeff82ddbb59c360a36e411b
parent 8dfee78f
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1332,9 +1332,8 @@ class HearingAidImpl : public HearingAid {
        LOG(INFO) << __func__
                  << ": GAP_EVT_CONN_CLOSED: " << hearingDevice->address
                  << ", playback_started=" << hearingDevice->playback_started
                  << ", connecting_actively="
                  << hearingDevice->connecting_actively;
        if (hearingDevice->connecting_actively) {
                  << ", accepting_audio=" << hearingDevice->accepting_audio;
        if (!hearingDevice->accepting_audio) {
          /* Disconnect connection when data channel is not available */
          BTA_GATTC_Close(hearingDevice->conn_id);
        } else {