diff --git a/src/org/thoughtcrime/securesms/ApplicationContext.java b/src/org/thoughtcrime/securesms/ApplicationContext.java index 9cad753657..607b638364 100644 --- a/src/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/org/thoughtcrime/securesms/ApplicationContext.java @@ -159,27 +159,31 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc } private void initializeWebRtc() { - Set HARDWARE_AEC_BLACKLIST = new HashSet() {{ - add("Pixel"); - add("Pixel XL"); - add("Moto G5"); - }}; + try { + Set HARDWARE_AEC_BLACKLIST = new HashSet() {{ + add("Pixel"); + add("Pixel XL"); + add("Moto G5"); + }}; - Set OPEN_SL_ES_WHITELIST = new HashSet() {{ - add("Pixel"); - add("Pixel XL"); - }}; + Set OPEN_SL_ES_WHITELIST = new HashSet() {{ + add("Pixel"); + add("Pixel XL"); + }}; - if (Build.VERSION.SDK_INT >= 11) { - if (HARDWARE_AEC_BLACKLIST.contains(Build.MODEL)) { - WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true); + if (Build.VERSION.SDK_INT >= 11) { + if (HARDWARE_AEC_BLACKLIST.contains(Build.MODEL)) { + WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true); + } + + if (!OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) { + WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true); + } + + PeerConnectionFactory.initializeAndroidGlobals(this, true, true, true); } - - if (!OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) { - WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true); - } - - PeerConnectionFactory.initializeAndroidGlobals(this, true, true, true); + } catch (UnsatisfiedLinkError e) { + Log.w(TAG, e); } }