WhisperSystems/RedPhone — pull request #77 by emblem (2013-01-28 07:37:25+00:00)
Title: Speakerphone and Mute Buttons

Adds speakerphone and mute buttons to the in-call screen, cleans up the management of speakerphone and audio mode state.

Note - using the AudioManager's setMicrophoneMute() method might seem like a better idea than plumbing a message all the way from the UI to the MicrophoneReader and then zeroing out audio arrays, but it turns out that on some devices setMicrophoneMute doesn't work consistently (see several related StackOverflow discussions for detail).

Support for bluetooth audio in the UI is included in the code but disabled.

This change has the potential to cause regressions in audio routing behavior on some devices, since I took out the 'black magic' initialization code we were using in favor of something simple that works on my test devices. Hopefully the API has matured enough that this will work for most or all devices we don't test on.