mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Added bundle mode account setting
This commit is contained in:
parent
0fac6150c7
commit
c90961408f
5 changed files with 51 additions and 1 deletions
|
|
@ -58,6 +58,8 @@ class AccountSettingsViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
val limeServerUrl = MutableLiveData<String>()
|
||||
|
||||
val bundleModeEnabled = MutableLiveData<Boolean>()
|
||||
|
||||
val accountFoundEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
||||
private lateinit var account: Account
|
||||
|
|
@ -93,6 +95,8 @@ class AccountSettingsViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
avpfEnabled.postValue(account.isAvpfEnabled)
|
||||
|
||||
bundleModeEnabled.postValue(params.isRtpBundleEnabled)
|
||||
|
||||
expire.postValue(params.expires.toString())
|
||||
|
||||
conferenceFactoryUri.postValue(params.conferenceFactoryAddress?.asStringUriOnly())
|
||||
|
|
@ -139,6 +143,8 @@ class AccountSettingsViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
newParams.avpfMode = if (avpfEnabled.value == true) AVPFMode.Enabled else AVPFMode.Disabled
|
||||
|
||||
newParams.isRtpBundleEnabled = bundleModeEnabled.value == true
|
||||
|
||||
newParams.expires = expire.value?.toInt() ?: 31536000
|
||||
|
||||
val conferenceFactoryAddress = core.interpretUrl(
|
||||
|
|
|
|||
|
|
@ -238,6 +238,32 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/avpf_switch"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/material_switch_style"
|
||||
android:id="@+id/bundle_mode_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:checked="@={viewModel.bundleModeEnabled}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/avpf_switch" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:id="@+id/bundle_mode_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/account_settings_bundle_mode_title"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintTop_toTopOf="@id/bundle_mode_switch"
|
||||
app:layout_constraintBottom_toBottomOf="@id/bundle_mode_switch"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/bundle_mode_switch"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:id="@+id/expire_title"
|
||||
|
|
@ -249,7 +275,7 @@
|
|||
android:text="@string/account_settings_expire_title"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintTop_toBottomOf="@id/avpf_switch"
|
||||
app:layout_constraintTop_toBottomOf="@id/bundle_mode_switch"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,20 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/active_speaker_miniatures_layout"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style_500"
|
||||
android:id="@+id/active_speaker_screen_sharing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/conference_active_speaker_is_screen_sharing"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
android:visibility="@{conferenceViewModel.isScreenSharing ? View.VISIBLE : View.GONE}"
|
||||
app:layout_constraintBottom_toBottomOf="@id/active_speaker_name"
|
||||
app:layout_constraintTop_toTopOf="@id/active_speaker_name"
|
||||
app:layout_constraintStart_toEndOf="@id/active_speaker_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/muted"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@
|
|||
<string name="account_settings_conference_factory_uri_title">URI de l\'usine à conversations</string>
|
||||
<string name="account_settings_audio_video_conference_factory_uri_title">URI de l\'usine à conférences</string>
|
||||
<string name="account_settings_lime_server_url_title">URL du serveur d\'échange de clés de chiffrement</string>
|
||||
<string name="account_settings_bundle_mode_title">Mode "bundle"</string>
|
||||
|
||||
<string name="account_settings_dialog_invalid_password_title">Autentification requise</string>
|
||||
<string name="account_settings_dialog_invalid_password_message">La connexion a échoué pour le compte \n%s.\n\nVous pouvez renseigner votre mot de passe à nouveau ou bien vérifier les options de configuration de votre compte.</string>
|
||||
|
|
@ -518,6 +519,7 @@
|
|||
</plurals>
|
||||
<string name="conference_participant_joining_text">En train de rejoindre…</string>
|
||||
<string name="conference_participant_paused_text">En pause</string>
|
||||
<string name="conference_active_speaker_is_screen_sharing">partage son écran</string>
|
||||
|
||||
<string name="conference_layout_grid">Mosaïque</string>
|
||||
<string name="conference_layout_active_speaker">Intervenant actif</string>
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@
|
|||
<string name="account_settings_conference_factory_uri_title">Conference factory URI</string>
|
||||
<string name="account_settings_audio_video_conference_factory_uri_title">Audio/video conference factory URI</string>
|
||||
<string name="account_settings_lime_server_url_title">E2E encryption keys server URL</string>
|
||||
<string name="account_settings_bundle_mode_title">Bundle mode</string>
|
||||
|
||||
<string name="account_settings_dialog_invalid_password_title">Authentication needed</string>
|
||||
<string name="account_settings_dialog_invalid_password_message">Connection failed because authentication is missing or invalid for account \n%s.\n\nYou can provide password again, or check your account configuration in the settings.</string>
|
||||
|
|
@ -569,6 +570,7 @@
|
|||
</plurals>
|
||||
<string name="conference_participant_joining_text">Joining…</string>
|
||||
<string name="conference_participant_paused_text">Paused</string>
|
||||
<string name="conference_active_speaker_is_screen_sharing">is sharing it\'s screen</string>
|
||||
|
||||
<string name="conference_layout_grid">Mosaic</string>
|
||||
<string name="conference_layout_active_speaker">Speaker</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue