@ -23,7 +23,6 @@ import android.app.Application;
import android.content.Context ;
import android.content.Intent ;
import android.os.AsyncTask ;
import android.os.Build ;
import android.os.Handler ;
import android.os.HandlerThread ;
@ -91,8 +90,6 @@ import org.thoughtcrime.securesms.util.dynamiclanguage.LocaleParseHelper;
import org.thoughtcrime.securesms.webrtc.CallMessageProcessor ;
import org.webrtc.PeerConnectionFactory ;
import org.webrtc.PeerConnectionFactory.InitializationOptions ;
import org.webrtc.voiceengine.WebRtcAudioManager ;
import org.webrtc.voiceengine.WebRtcAudioUtils ;
import java.io.ByteArrayOutputStream ;
import java.io.IOException ;
@ -100,9 +97,7 @@ import java.io.InputStream;
import java.security.Security ;
import java.util.Arrays ;
import java.util.Date ;
import java.util.HashSet ;
import java.util.List ;
import java.util.Set ;
import java.util.Timer ;
import java.util.concurrent.Executors ;
@ -394,33 +389,6 @@ public class ApplicationContext extends Application implements DefaultLifecycleO
private void initializeWebRtc ( ) {
try {
Set < String > HARDWARE_AEC_BLACKLIST = new HashSet < String > ( ) { {
add ( "Pixel" ) ;
add ( "Pixel XL" ) ;
add ( "Moto G5" ) ;
add ( "Moto G (5S) Plus" ) ;
add ( "Moto G4" ) ;
add ( "TA-1053" ) ;
add ( "Mi A1" ) ;
add ( "E5823" ) ; // Sony z5 compact
add ( "Redmi Note 5" ) ;
add ( "FP2" ) ; // Fairphone FP2
add ( "MI 5" ) ;
} } ;
Set < String > OPEN_SL_ES_WHITELIST = new HashSet < String > ( ) { {
add ( "Pixel" ) ;
add ( "Pixel XL" ) ;
} } ;
if ( HARDWARE_AEC_BLACKLIST . contains ( Build . MODEL ) ) {
WebRtcAudioUtils . setWebRtcBasedAcousticEchoCanceler ( true ) ;
}
if ( ! OPEN_SL_ES_WHITELIST . contains ( Build . MODEL ) ) {
WebRtcAudioManager . setBlacklistDeviceForOpenSLESUsage ( true ) ;
}
PeerConnectionFactory . initialize ( InitializationOptions . builder ( this ) . createInitializationOptions ( ) ) ;
} catch ( UnsatisfiedLinkError e ) {
Log . w ( TAG , e ) ;