mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-17 21:38:29 +00:00
Removed 'disable video' setting
This commit is contained in:
parent
d37f33a217
commit
a2b2b540e8
4 changed files with 4 additions and 48 deletions
|
|
@ -84,7 +84,6 @@ class SettingsViewModel
|
|||
|
||||
val adaptiveRateControlEnabled = MutableLiveData<Boolean>()
|
||||
|
||||
val videoEnabled = MutableLiveData<Boolean>()
|
||||
val videoFecEnabled = MutableLiveData<Boolean>()
|
||||
|
||||
val isVibrationAvailable = MutableLiveData<Boolean>()
|
||||
|
|
@ -330,7 +329,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
||||
|
|
|
|||
|
|
@ -124,35 +124,6 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/calibrate_echo_canceller" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:onClick="@{() -> viewModel.toggleEnableVideo()}"
|
||||
android:id="@+id/enable_video_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/settings_calls_enable_video_title"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:labelFor="@id/enable_video_switch"
|
||||
app:layout_constraintTop_toTopOf="@id/enable_video_switch"
|
||||
app:layout_constraintBottom_toBottomOf="@id/enable_video_switch"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/enable_video_switch"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/material_switch_style"
|
||||
android:id="@+id/enable_video_switch"
|
||||
android:onClick="@{() -> viewModel.toggleEnableVideo()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:checked="@{viewModel.videoEnabled}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/adaptive_rate_control_switch" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:onClick="@{() -> viewModel.toggleVibrateOnIncomingCalls()}"
|
||||
|
|
@ -182,7 +153,7 @@
|
|||
android:layout_marginEnd="16dp"
|
||||
android:checked="@{viewModel.vibrateDuringIncomingCall}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/enable_video_switch" />
|
||||
app:layout_constraintTop_toBottomOf="@id/adaptive_rate_control_switch" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:onClick="@{() -> viewModel.toggleEnableVideo()}"
|
||||
android:onClick="@{() -> viewModel.toggleUseWifiOnly()}"
|
||||
android:id="@+id/wifi_only_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue