diff options
author | Mariusz Skamra <mariusz.skamra@tieto.com> | 2015-02-20 11:26:26 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-20 16:25:10 +0100 |
commit | 3eb3d396a7265c3a6d579d5a51c836eabece22f7 (patch) | |
tree | 2bac54db34770aa8418cc5f44f675b20757ff388 /android/handsfree.c | |
parent | ca4364f488bbe0f4c739a5195541908f00ebe673 (diff) | |
download | bluez-3eb3d396a7265c3a6d579d5a51c836eabece22f7.tar.gz |
android/handsfree: Fix SCO disconnection while dialing
If we decide to hang up while dialing or alerting, SCO needs to be closed.
Fixes: TC_AG_TCA_BV_04_C
Diffstat (limited to 'android/handsfree.c')
-rw-r--r-- | android/handsfree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/handsfree.c b/android/handsfree.c index 89dceb947..f1ad5feb3 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -2403,6 +2403,10 @@ static void phone_state_idle(struct hf_device *dev, int num_active, num_held ? (num_active ? 1 : 2) : 0); update_indicator(dev, IND_CALLSETUP, 0); + + /* disconnect SCO if we hang up while dialing or alerting */ + if (num_active == 0 && num_held == 0) + disconnect_sco(dev); break; case HAL_HANDSFREE_CALL_STATE_IDLE: if (dev->call_hanging_up) { |