summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-02-22 01:37:19 -0800
committerEric Laurent <elaurent@google.com>2010-02-22 01:37:19 -0800
commitf5fe3949f5db69b19ce3fac7abce2088106f2e2b (patch)
tree4a7412c83ba329e9ce081e16b44d861dae6812e8
parentee3bbefd34fd5330ebbc59175a328197ab7526af (diff)
downloadbase-f5fe3949f5db69b19ce3fac7abce2088106f2e2b.tar.gz
Fix issue 2459650.
This change fixes a problem where an unwanted tone is generated by audio policy manager when a MT call is answered. This is because of a policy that replaces high visibility system sounds (ringtones, alarms...) by a beep when in call. There is a transitory phase while the call is being answered where the phone state is changed to IN_CALL but the ringtone is still playing. The audio policy manager then mutes the end of the ringtone and starts playing a beep in replacement because the ringtone is categorized as high visibility. The fix consists in changing the ringtone stream type from high visibility to low visibility. This is not a problem as the only actual use case where a ringtone would be generated while in call is if another call is received. But in this case, the phone system does not generate a ringtone but a call waiting tone instead. It is therefore not required to handle a ringtone as a high visibiltiy tone that must be somehow signaled to the user while in call.
-rw-r--r--media/libmedia/AudioSystem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 5352234f7984..1787e1fefda1 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -694,7 +694,9 @@ bool AudioSystem::isBluetoothScoDevice(audio_devices device)
bool AudioSystem::isLowVisibility(stream_type stream)
{
- if (stream == AudioSystem::SYSTEM || stream == AudioSystem::NOTIFICATION) {
+ if (stream == AudioSystem::SYSTEM ||
+ stream == AudioSystem::NOTIFICATION ||
+ stream == AudioSystem::RING) {
return true;
} else {
return false;