Native WebRTC for Android contains no device handling what so ever and it is all up to the client to manage those parts.
The best example of how to: select audio mode, select device, deal with BT etc. can be found in
AppRTCMobile, where the things you
ask for are handled by the AppRTCAudioManager (which is not part of WebRTC, it is just an example) and not the WebRtcAudioManager.
Given the nature of WebRTC (it is a VoIP stack), it is required to use the MODE_IN_COMMUNICATION mode.
See
example here. If you don't do that, error logs will be produced and the underlying audio streams (which assumes COMM),
might not work as intended. Levels might be off, volume control will not work as intended and AEC might not behave well either.
If you want to change WebRTC into not using
MODE_IN_COMMUNICATION, you can try to match the mode of the audio streams
with your mode here. It is experimental and might lead to other issues but feel free to try it out. Similar support is not added for the input side.