Avoid calling AudioEffect.queryEffects to avoid potential crash.

BUG=b/36713041
NOTRY=TRUE

Review-Url: https://codereview.webrtc.org/2785113002
Cr-Commit-Position: refs/heads/master@{#17461}
This commit is contained in:
henrika
2017-03-30 01:01:28 -07:00
committed by Commit bot
parent 0ffdcc51bc
commit 4b4d833c31

View File

@ -208,14 +208,17 @@ class WebRtcAudioEffects {
assertTrue(aec == null);
assertTrue(ns == null);
// Add logging of supported effects but filter out "VoIP effects", i.e.,
// AEC, AEC and NS.
for (Descriptor d : AudioEffect.queryEffects()) {
if (effectTypeIsVoIP(d.type) || DEBUG) {
Logging.d(TAG, "name: " + d.name + ", "
+ "mode: " + d.connectMode + ", "
+ "implementor: " + d.implementor + ", "
+ "UUID: " + d.uuid);
if (DEBUG) {
// Add logging of supported effects but filter out "VoIP effects", i.e.,
// AEC, AEC and NS. Avoid calling AudioEffect.queryEffects() unless the
// DEBUG flag is set since we have seen crashes in this API.
for (Descriptor d : AudioEffect.queryEffects()) {
if (effectTypeIsVoIP(d.type)) {
Logging.d(TAG, "name: " + d.name + ", "
+ "mode: " + d.connectMode + ", "
+ "implementor: " + d.implementor + ", "
+ "UUID: " + d.uuid);
}
}
}