Avoids crash in ADM for Android
Tbr: henrik.lundin Bug: webrtc:11270 Change-Id: I1b3ad0afe3f5072ea4529e89729b087a4bd29fec Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165396 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30197}
This commit is contained in:
@ -426,6 +426,9 @@ class WebRtcAudioRecord {
|
||||
Logging.w(TAG, "AudioManager#getActiveRecordingConfigurations() requires N or higher");
|
||||
return 0;
|
||||
}
|
||||
if (audioRecord == null) {
|
||||
return 0;
|
||||
}
|
||||
// Get a list of the currently active audio recording configurations of the device (can be more
|
||||
// than one). An empty list indicates there is no recording active when queried.
|
||||
List<AudioRecordingConfiguration> configs = audioManager.getActiveRecordingConfigurations();
|
||||
|
||||
Reference in New Issue
Block a user