mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Added back "replace + by 00 when formatting phone numbers" account setting
This commit is contained in:
parent
69301e23e7
commit
655aa62a78
5 changed files with 35 additions and 2 deletions
|
|
@ -90,6 +90,8 @@ class AccountSettingsViewModel
|
|||
val mwiUri = MutableLiveData<String>()
|
||||
val voicemailUri = MutableLiveData<String>()
|
||||
|
||||
val replacePlusBy00 = MutableLiveData<Boolean>()
|
||||
|
||||
val cpimInBasicChatRooms = MutableLiveData<Boolean>()
|
||||
|
||||
val accountFoundEvent = MutableLiveData<Event<Boolean>>()
|
||||
|
|
@ -165,6 +167,7 @@ class AccountSettingsViewModel
|
|||
|
||||
mwiUri.postValue(params.mwiServerAddress?.asStringUriOnly().orEmpty())
|
||||
voicemailUri.postValue(params.voicemailAddress?.asStringUriOnly().orEmpty())
|
||||
replacePlusBy00.postValue(params.isDialEscapePlusEnabled)
|
||||
|
||||
expire.postValue(params.expires.toString())
|
||||
|
||||
|
|
@ -298,6 +301,7 @@ class AccountSettingsViewModel
|
|||
|
||||
newParams.ccmpServerUrl = ccmpServerUrl.value
|
||||
newParams.limeServerUrl = limeServerUrl.value
|
||||
newParams.isDialEscapePlusEnabled = replacePlusBy00.value == true
|
||||
|
||||
account.params = newParams
|
||||
Log.i("$TAG Changes have been saved")
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ class AudioUtils {
|
|||
}
|
||||
}
|
||||
Log.i(
|
||||
"$TAG Found headset/headphones/hearingAid sound card [$headsetCard], bluetooth sound card [$bluetoothCard] and microphone card [$microphoneCard]"
|
||||
"$TAG Found headset/headphones sound card [$headsetCard], bluetooth/hearingAid sound card [$bluetoothCard] and microphone card [$microphoneCard]"
|
||||
)
|
||||
return headsetCard ?: bluetoothCard ?: microphoneCard
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,6 @@
|
|||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:background="@drawable/edit_text_background"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
|
|
@ -194,6 +193,34 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/mwi_uri_title"
|
||||
app:layout_constraintBottom_toTopOf="@id/replace_plus_by_00_switch"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/settings_title_style"
|
||||
android:id="@+id/replace_plus_by_00_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="@string/account_settings_replace_plus_by_00_title"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintTop_toTopOf="@id/replace_plus_by_00_switch"
|
||||
app:layout_constraintBottom_toBottomOf="@id/replace_plus_by_00_switch"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/replace_plus_by_00_switch"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
style="@style/material_switch_style"
|
||||
android:id="@+id/replace_plus_by_00_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:checked="@={viewModel.replacePlusBy00}"
|
||||
app:layout_constraintTop_toBottomOf="@id/mwi_uri"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -330,6 +330,7 @@
|
|||
<string name="account_settings_cpim_in_basic_conversations_title">Utiliser CPIM dans les conversations \"basiques\"</string>
|
||||
<string name="account_settings_voicemail_uri_title">URI de la messagerie vocale</string>
|
||||
<string name="account_settings_mwi_uri_title">URI du serveur MWI (Message Waiting Indicator)</string>
|
||||
<string name="account_settings_replace_plus_by_00_title">Remplacer + par 00 lors du formattage des numéros de téléphone</string>
|
||||
<string name="account_settings_update_password_title">Mettre à jour le mot de passe</string>
|
||||
|
||||
<string name="account_settings_dialog_invalid_password_title">Autentification requise</string>
|
||||
|
|
|
|||
|
|
@ -369,6 +369,7 @@
|
|||
<string name="account_settings_cpim_in_basic_conversations_title">Use CPIM in \"basic\" conversations</string>
|
||||
<string name="account_settings_voicemail_uri_title">Voicemail URI</string>
|
||||
<string name="account_settings_mwi_uri_title"> MWI server URI (Message Waiting Indicator)</string>
|
||||
<string name="account_settings_replace_plus_by_00_title">Replace + by 00 when formatting phone numbers</string>
|
||||
<string name="account_settings_update_password_title">Update password</string>
|
||||
|
||||
<string name="account_settings_dialog_invalid_password_title">Authentication needed</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue