From a2b2b540e8126c8170cc4a4f7da39262dda81989 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 3 Mar 2026 17:20:11 +0100 Subject: [PATCH] Removed 'disable video' setting --- .../settings/viewmodel/SettingsViewModel.kt | 14 +-------- .../settings_advanced_calls_fragment.xml | 5 +-- app/src/main/res/layout/settings_calls.xml | 31 +------------------ app/src/main/res/layout/settings_network.xml | 2 +- 4 files changed, 4 insertions(+), 48 deletions(-) diff --git a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt index affdf6298..08f498ba2 100644 --- a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt +++ b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt @@ -84,7 +84,6 @@ class SettingsViewModel val adaptiveRateControlEnabled = MutableLiveData() - val videoEnabled = MutableLiveData() val videoFecEnabled = MutableLiveData() val isVibrationAvailable = MutableLiveData() @@ -329,8 +328,7 @@ class SettingsViewModel } adaptiveRateControlEnabled.postValue(core.isAdaptiveRateControlEnabled) - - videoEnabled.postValue(core.isVideoEnabled) + videoFecEnabled.postValue(core.isFecEnabled) vibrateDuringIncomingCall.postValue(core.isVibrationOnIncomingCallEnabled) autoRecordCalls.postValue(corePreferences.automaticallyStartCallRecording) @@ -474,16 +472,6 @@ class SettingsViewModel } } - @UiThread - fun toggleEnableVideo() { - val newValue = videoEnabled.value == false - coreContext.postOnCoreThread { core -> - core.isVideoCaptureEnabled = newValue - core.isVideoDisplayEnabled = newValue - videoEnabled.postValue(newValue) - } - } - @UiThread fun toggleEnableVideoFec() { val newValue = videoFecEnabled.value == false diff --git a/app/src/main/res/layout/settings_advanced_calls_fragment.xml b/app/src/main/res/layout/settings_advanced_calls_fragment.xml index ff118f73a..0a59850e2 100644 --- a/app/src/main/res/layout/settings_advanced_calls_fragment.xml +++ b/app/src/main/res/layout/settings_advanced_calls_fragment.xml @@ -83,7 +83,6 @@ android:maxLines="2" android:ellipsize="end" android:labelFor="@id/enable_fec_switch" - android:visibility="@{viewModel.videoEnabled ? View.VISIBLE : View.GONE}" app:layout_constraintTop_toTopOf="@id/enable_fec_switch" app:layout_constraintBottom_toBottomOf="@id/enable_fec_switch" app:layout_constraintStart_toStartOf="parent" @@ -97,9 +96,7 @@ android:layout_height="wrap_content" android:layout_marginTop="20dp" android:layout_marginEnd="16dp" - android:visibility="@{viewModel.videoEnabled ? View.VISIBLE : View.GONE}" - android:enabled="@{viewModel.videoEnabled}" - android:checked="@{viewModel.videoEnabled && viewModel.videoFecEnabled}" + android:checked="@{viewModel.videoFecEnabled}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/settings_calls.xml b/app/src/main/res/layout/settings_calls.xml index 81dfde71d..64d33cd49 100644 --- a/app/src/main/res/layout/settings_calls.xml +++ b/app/src/main/res/layout/settings_calls.xml @@ -124,35 +124,6 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/calibrate_echo_canceller" /> - - - - + app:layout_constraintTop_toBottomOf="@id/adaptive_rate_control_switch" />