diff --git a/app/src/main/java/org/linphone/telecom/TelecomCallControlCallback.kt b/app/src/main/java/org/linphone/telecom/TelecomCallControlCallback.kt index e5c02dce6..536f6367e 100644 --- a/app/src/main/java/org/linphone/telecom/TelecomCallControlCallback.kt +++ b/app/src/main/java/org/linphone/telecom/TelecomCallControlCallback.kt @@ -203,7 +203,9 @@ class TelecomCallControlCallback( if (result is CallControlResult.Error) { Log.e("$TAG Failed to change endpoint audio device, error [$result]") } else { - Log.i("$TAG It took [$attempts] attempt(s) to change endpoint audio device...") + Log.i( + "$TAG It took [$attempts] attempt(s) to change endpoint audio device..." + ) } } 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 a9b81e065..c4756242b 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 @@ -118,6 +118,7 @@ class SettingsViewModel @UiThread constructor() : GenericViewModel() { // Network settings val useWifiOnly = MutableLiveData() + val allowIpv6 = MutableLiveData() // User Interface settings val showThemeSelector = MutableLiveData() @@ -234,6 +235,7 @@ class SettingsViewModel @UiThread constructor() : GenericViewModel() { autoRecordCalls.postValue(corePreferences.automaticallyStartCallRecording) useWifiOnly.postValue(core.isWifiOnlyEnabled) + allowIpv6.postValue(core.isIpv6Enabled) autoDownloadEnabled.postValue(core.maxSizeForAutoDownloadIncomingFiles == 0) @@ -443,6 +445,15 @@ class SettingsViewModel @UiThread constructor() : GenericViewModel() { } } + @UiThread + fun toggleIpv6() { + val newValue = allowIpv6.value == false + coreContext.postOnCoreThread { core -> + core.isIpv6Enabled = newValue + allowIpv6.postValue(newValue) + } + } + @UiThread fun toggleUserInterfaceExpand() { expandUserInterface.value = expandUserInterface.value == false diff --git a/app/src/main/res/layout/settings_network.xml b/app/src/main/res/layout/settings_network.xml index 578f918d6..a526101fc 100644 --- a/app/src/main/res/layout/settings_network.xml +++ b/app/src/main/res/layout/settings_network.xml @@ -44,6 +44,34 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index bb857aa28..8ccbbc3b6 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -223,6 +223,7 @@ Mosaïque Réseau Se connecter uniquement via le Wi-Fi + Autoriser l\'IPv6 Affichage Thème Sombre diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 17775d160..e1ac40495 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -259,6 +259,7 @@ Mosaic Network Use only Wi-Fi networks + Allow IPv6 User interface Theme Dark theme