mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-24 14:09:44 +01:00
remove hardcoded devices for webrtc audio setup
android-talk-webrtc in version 121.6167.0 doesn't allow access to WebRtcAudioManager WebRtcAudioUtils anymore. These classes were used for HARDWARE_AEC_EXCLUDE_SET and OPEN_SL_ES_INCLUDE_SET lists, which were not updated for years. For these reasons the checks for HARDWARE_AEC_EXCLUDE_SET and OPEN_SL_ES_INCLUDE_SET are removed. If people are complaining about different behaviour of audio performance/echoes, it's worth to have a closer look at the changes again. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
8c47b89ce5
commit
dd6991e39e
@ -26,7 +26,6 @@
|
||||
package com.nextcloud.talk.application
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Build.VERSION.SDK_INT
|
||||
import android.os.Build.VERSION_CODES.P
|
||||
import android.util.Log
|
||||
@ -69,7 +68,6 @@ import com.nextcloud.talk.utils.NotificationUtils
|
||||
import com.nextcloud.talk.utils.database.arbitrarystorage.ArbitraryStorageModule
|
||||
import com.nextcloud.talk.utils.database.user.UserModule
|
||||
import com.nextcloud.talk.utils.preferences.AppPreferences
|
||||
import com.nextcloud.talk.webrtc.MagicWebRTCUtils
|
||||
import com.vanniktech.emoji.EmojiManager
|
||||
import com.vanniktech.emoji.google.GoogleEmojiProvider
|
||||
import de.cotech.hw.SecurityKeyManager
|
||||
@ -79,8 +77,6 @@ import net.sqlcipher.database.SQLiteDatabaseHook
|
||||
import okhttp3.OkHttpClient
|
||||
import org.conscrypt.Conscrypt
|
||||
import org.webrtc.PeerConnectionFactory
|
||||
import org.webrtc.voiceengine.WebRtcAudioManager
|
||||
import org.webrtc.voiceengine.WebRtcAudioUtils
|
||||
import java.security.Security
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
@ -132,14 +128,6 @@ class NextcloudTalkApplication : MultiDexApplication(), LifecycleObserver {
|
||||
//region private methods
|
||||
private fun initializeWebRtc() {
|
||||
try {
|
||||
if (MagicWebRTCUtils.HARDWARE_AEC_EXCLUDE_SET.contains(Build.MODEL)) {
|
||||
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true)
|
||||
}
|
||||
|
||||
if (!MagicWebRTCUtils.OPEN_SL_ES_INCLUDE_SET.contains(Build.MODEL)) {
|
||||
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true)
|
||||
}
|
||||
|
||||
PeerConnectionFactory.initialize(
|
||||
PeerConnectionFactory.InitializationOptions.builder(this)
|
||||
.createInitializationOptions()
|
||||
|
@ -41,39 +41,6 @@ import java.util.regex.Pattern;
|
||||
public class MagicWebRTCUtils {
|
||||
private static final String TAG = "MagicWebRTCUtils";
|
||||
|
||||
/* AEC blacklist and SL_ES_WHITELIST are borrowed from Signal
|
||||
https://github.com/WhisperSystems/Signal-Android/blob/551470123d006b76a68d705d131bb12513a5e683/src/org/thoughtcrime/securesms/ApplicationContext.java
|
||||
*/
|
||||
public static Set<String> HARDWARE_AEC_EXCLUDE_SET = new HashSet<String>() {{
|
||||
add("D6503"); // Sony Xperia Z2 D6503
|
||||
add("ONE A2005"); // OnePlus 2
|
||||
add("MotoG3"); // Moto G (3rd Generation)
|
||||
add("Nexus 6P"); // Nexus 6p
|
||||
add("Pixel"); // Pixel
|
||||
add("Pixel XL"); // Pixel XL
|
||||
add("MI 4LTE"); // Xiami Mi4
|
||||
add("Redmi Note 3"); // Redmi Note 3
|
||||
add("Redmi Note 4"); // Redmi Note 4
|
||||
add("SM-G900F"); // Samsung Galaxy S5
|
||||
add("g3_kt_kr"); // LG G3
|
||||
add("GT-I9195"); // Samsung Galaxy S4 Mini 4G LTE
|
||||
add("SM-G930F"); // Samsung Galaxy S7
|
||||
add("Xperia SP"); // Sony Xperia SP
|
||||
add("Nexus 6"); // Nexus 6
|
||||
add("ONE E1003"); // OnePlus X
|
||||
add("One"); // OnePlus One
|
||||
add("Moto G5");
|
||||
add("Moto G (5S) Plus");
|
||||
add("Moto G4");
|
||||
add("TA-1053");
|
||||
add("E5823"); // Sony Z5 Compact
|
||||
}};
|
||||
|
||||
public static Set<String> OPEN_SL_ES_INCLUDE_SET = new HashSet<String>() {{
|
||||
add("Pixel");
|
||||
add("Pixel XL");
|
||||
}};
|
||||
|
||||
private static final Set<String> HARDWARE_ACCELERATION_DEVICE_EXCLUDE_SET = new HashSet<String>() {{
|
||||
add("GT-I9100"); // Samsung Galaxy S2
|
||||
add("GT-N8013"); // Samsung Galaxy Note 10.1
|
||||
|
Loading…
Reference in New Issue
Block a user