From 3dfe38ac24f84a574d195d9c428b8a692f4a938c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 15 Sep 2009 08:22:39 -0700 Subject: [PATCH] Fix issue 2118500: Ringer volume control broken after a call is terminated while a ring tone is playing and a BT headset is connected. There was a problem in the special management of notifications while incall when using a duplicated output (with A2DP headset connected). When in call, the notifications are not played on both A2DP + speaker outputs but replaced by a tone in the device used for in call audio. When the call ends while a notification or ring tone is playing, the notification was not moved back to duplicated output (A2DP+speaker). We must also make sure that the code that unmutes notification playback and stops the tone is called before the notification stream is moved back to duplicated output as it handles the volume and routing on hardware output only. Also fixed a potential problem in active tracks counting when moving DTMF stream from A2DP output to hardware output when changing cal l state.