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

Skip to content
Commit e5c8ca00 authored by Sravan Kumar V's avatar Sravan Kumar V Committed by Linux Build Service Account
Browse files

Pbap: Avoid recursive calling during turn off BT

Use case:
1. Turn ON BT
2. Start inquiry
3. Turn OFF BT
4. Repeat steps 1 to 3 for 1000 iterations

Failure:
"Unfortunately, Bluetooth share has stopped" error comes.

Root cause:
Handler is made null by call to closeService() called via
BT_TURNING_OFF -> closeService() -> onDestroye() ->
mSessionStatusHandler made NULL -> closeService()
going to recursive call.

Fix:
Before initiate shutdown msg check closeService API
was called or not using flag which helps to avoid recursive
calling to fix a relevant NPE.
Set PBAP Profile state to disconnected if not already set.

CRs-Fixed: 1045017
Change-Id: I362678772138257510727c6fa2cdb9582aa6e536
parent 9179d70b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment