mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
Small refactoring
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
6581d9b4d2
commit
bfb377ee9a
@ -1,6 +1,6 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Nextcloud Talk application @author Mario Danic Copyright (C) 2017 Mario Danic <mario@lovelyhq.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>." />
|
||||
<option name="notice" value="Nextcloud Talk application @author Mario Danic Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>." />
|
||||
<option name="myName" value="GPL3" />
|
||||
</copyright>
|
||||
</component>
|
@ -81,7 +81,7 @@ import com.nextcloud.talk.utils.database.user.UserUtils;
|
||||
import com.nextcloud.talk.webrtc.MagicAudioManager;
|
||||
import com.nextcloud.talk.webrtc.MagicPeerConnectionWrapper;
|
||||
import com.nextcloud.talk.webrtc.MagicWebRTCUtils;
|
||||
import com.nextcloud.talk.webrtc.MagicWebRtcLists;
|
||||
import com.nextcloud.talk.webrtc.MagicWebRTCLists;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -487,8 +487,8 @@ public class CallActivity extends AppCompatActivity {
|
||||
if (camera2EnumeratorIsSupported) {
|
||||
cameraEnumerator = new Camera2Enumerator(this);
|
||||
} else {
|
||||
cameraEnumerator = new Camera1Enumerator(!MagicWebRtcLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
|
||||
.MANUFACTURER.toLowerCase()) && !MagicWebRtcLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST.contains
|
||||
cameraEnumerator = new Camera1Enumerator(!MagicWebRTCLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
|
||||
.MANUFACTURER.toLowerCase()) && !MagicWebRTCLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST.contains
|
||||
(Build.MODEL));
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ import com.nextcloud.talk.jobs.AccountRemovalJob;
|
||||
import com.nextcloud.talk.jobs.PushRegistrationJob;
|
||||
import com.nextcloud.talk.jobs.creator.MagicJobCreator;
|
||||
import com.nextcloud.talk.utils.database.user.UserModule;
|
||||
import com.nextcloud.talk.webrtc.MagicWebRtcLists;
|
||||
import com.nextcloud.talk.webrtc.MagicWebRTCLists;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.squareup.leakcanary.RefWatcher;
|
||||
|
||||
@ -114,17 +114,17 @@ public class NextcloudTalkApplication extends MultiDexApplication {
|
||||
|
||||
private void initializeWebRtc() {
|
||||
try {
|
||||
if (MagicWebRtcLists.HARDWARE_AEC_BLACKLIST.contains(Build.MODEL)) {
|
||||
if (MagicWebRTCLists.HARDWARE_AEC_BLACKLIST.contains(Build.MODEL)) {
|
||||
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
|
||||
}
|
||||
|
||||
if (!MagicWebRtcLists.OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) {
|
||||
if (!MagicWebRTCLists.OPEN_SL_ES_WHITELIST.contains(Build.MODEL)) {
|
||||
WebRtcAudioManager.setBlacklistDeviceForOpenSLESUsage(true);
|
||||
}
|
||||
|
||||
PeerConnectionFactory.initialize(PeerConnectionFactory.InitializationOptions.builder(this)
|
||||
.setEnableVideoHwAcceleration(!MagicWebRtcLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
|
||||
.MANUFACTURER.toLowerCase()) && !MagicWebRtcLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST
|
||||
.setEnableVideoHwAcceleration(!MagicWebRTCLists.HARDWARE_ACCELERATION_VENDOR_BLACKLIST.contains(Build
|
||||
.MANUFACTURER.toLowerCase()) && !MagicWebRTCLists.HARDWARE_ACCELERATION_DEVICE_BLACKLIST
|
||||
.contains(Build.MODEL))
|
||||
.createInitializationOptions());
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
|
@ -27,6 +27,7 @@
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.nextcloud.talk.webrtc;
|
||||
|
@ -23,7 +23,7 @@ package com.nextcloud.talk.webrtc;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class MagicWebRtcLists {
|
||||
public class MagicWebRTCLists {
|
||||
/*
|
||||
AEC blacklist and SL_ES_WHITELIST are borrowed from Signal
|
||||
https://github.com/WhisperSystems/Signal-Android/blob/551470123d006b76a68d705d131bb12513a5e683/src/org/thoughtcrime/securesms/ApplicationContext.java
|
||||
|
Loading…
Reference in New Issue
Block a user