webrtc/sdk/android/native_api
Magnus Jedvert 66f1e9eb34 Android: Add AudioDeviceModule interface and clean up implementation code
This CL introduces sdk/android/api/org/webrtc/audio/AudioDeviceModule.java,
which is the new interface for audio device modules on Android.

This CL also refactors the main AudioDeviceModule implementation, which
is sdk/android/api/org/webrtc/audio/JavaAudioDeviceModule.java and makes
it conform to the new interface. The old code used global static methods
to configure the audio device code. This CL gets rid of all that and uses
a builder pattern in JavaAudioDeviceModule instead. The only two dynamic
methods left in the interface are setSpeakerMute() and setMicrophoneMute().
Removing the global static methods allowed a significant cleanup, and e.g.
the file sdk/android/src/jni/audio_device/audio_manager.cc has been
completely removed.

The PeerConnectionFactory interface is also updated to allow passing in
an external AudioDeviceModule. The current built-in ADM is encapsulated
under LegacyAudioDeviceModule.java, which is the default for now to
ensure backwards compatibility.

Bug: webrtc:7452
Change-Id: I64d5f4dba9a004da001f1acb2bd0c1b1f2b64f21
Reviewed-on: https://webrtc-review.googlesource.com/65360
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Paulina Hensman <phensman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22765}
2018-04-06 10:13:02 +00:00
..
audio_device_module Android: Add AudioDeviceModule interface and clean up implementation code 2018-04-06 10:13:02 +00:00
base Deprecate ContextUtils.getApplicationContext. 2018-02-28 15:04:03 +00:00
codecs Create an experimental Android NDK. 2018-01-30 09:33:42 +00:00
jni Add an example app for Android native API. 2018-03-12 14:22:59 +00:00
peerconnection Add support for creating java PCF from native one. 2018-03-22 13:37:24 +00:00
video Fix memory leak in NativeToJavaVideoFrame. 2018-02-15 14:26:45 +00:00
DEPS Move android audio device code into sdk/android 2018-03-20 16:04:33 +00:00