From 5312b467f3634f9e7b1e24e89c69328eb60664d3 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Fri, 25 Sep 2009 10:30:51 -0700 Subject: [PATCH] Fix bug 2146274. Modify the Audio Policy Manager to support dynamic rerouting of STREAM_VOICE_CALL streams when using AudioManager.setSpeakerphoneOn(bool) even when not in call. The setSpeakerphoneOn() method is mapped in the AudioPolicyManager to a call to setForceUse for the AudioSystem::FOR_COMMUNICATION usage. This was only updating the output device when the current mode was MODE_IN_CALL. The change consists in changing the routing also when there is an active stream of type AudioSystem::VOICE_CALL as we allow that stream type to be used not just for telephony streams, but for communications in general.