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

Commit d60b3b00 authored by Satish Kodishala's avatar Satish Kodishala Committed by Pavlin Radoslavov
Browse files

Disable HSP profile during BT turn off

Usecase:
1. Enable HSP profile only.
2. Do Network reset.
3. Connect to headset supporting HSP profile.

Failure:
Not able to connect to headset after network reset.

Rootcause:
During BT turn off, HFP profile is disabled instead of
HSP profile. This led to the HSP profile registration
from apps failed during turn on after network reset.

Fix:
Add a check to see if HFP or HSP profile is enabled
during BT turn off.

Test: code compilation
Change-Id: Ie7bd7b546c377f4a060bc89916640035a047d086
parent 3f03ae48
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1480,7 +1480,11 @@ static void cleanup(void) {
  BTIF_TRACE_EVENT("%s", __func__);

  if (bt_hf_callbacks) {
#if (defined(BTIF_HF_SERVICES) && (BTIF_HF_SERVICES & BTA_HFP_SERVICE_MASK))
    btif_disable_service(BTA_HFP_SERVICE_ID);
#else
    btif_disable_service(BTA_HSP_SERVICE_ID);
#endif
    bt_hf_callbacks = NULL;
  }
}