I couldn't find any related post here (but other small posts on the internet), so here it is:
AudioManager.setMicrophoneMute(boolean) doesn't do anything on some particular devices that I tested with: Google Nexus S, Samsung Galaxy S and Motorola Milestone.
On any other device it works well.
It even maintains its "state" and returns a boolean as if it got mutedunmuted, but it doesn't mute - microphone continues to record - both in GSM call and in AudioRecord programmatic recording.
There is no indicative log message.
I also messed with permissions (android.permission.MODIFY_AUDIO_SETTINGS, android.permission.RECORD_AUDIO), nothing new here.
Did anyone else encounter that? Does anyone have a workaround or a magic solution?
If I use AudioRecord I just implement my own "mute" for these devices - I don't pass on the recorded buffers. But it can't help me with muting the mic in a GSM call, which I need.
Thanks
---------------- Update ----------------
See below.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…