mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Improved message when WiFi only mode is enabled & active network isn't Wifi nor Ethernet
This commit is contained in:
parent
6554039d68
commit
96b37f2fd9
3 changed files with 12 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ import org.linphone.core.GlobalState
|
|||
import org.linphone.core.MessageWaitingIndication
|
||||
import org.linphone.core.RegistrationState
|
||||
import org.linphone.core.VFS
|
||||
import org.linphone.core.tools.AndroidPlatformHelper
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.Event
|
||||
|
|
@ -582,7 +583,15 @@ class MainViewModel
|
|||
val reachable = coreContext.core.isNetworkReachable
|
||||
Log.i("$TAG Network is ${if (reachable) "reachable" else "not reachable"}")
|
||||
if (!reachable && coreContext.core.globalState == GlobalState.On) {
|
||||
val label = AppUtils.getString(R.string.network_not_reachable)
|
||||
val label = if (coreContext.core.isWifiOnlyEnabled) {
|
||||
if (AndroidPlatformHelper.isReady() && AndroidPlatformHelper.instance().isActiveNetworkWifiOnlyCompliant) {
|
||||
AppUtils.getString(R.string.network_not_reachable)
|
||||
} else {
|
||||
AppUtils.getString(R.string.network_is_not_wifi)
|
||||
}
|
||||
} else {
|
||||
AppUtils.getString(R.string.network_not_reachable)
|
||||
}
|
||||
addAlert(NETWORK_NOT_REACHABLE, label)
|
||||
} else {
|
||||
removeAlert(NETWORK_NOT_REACHABLE)
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@
|
|||
<item quantity="other">%s notifications en attente</item>
|
||||
</plurals>
|
||||
<string name="network_not_reachable">Vous n\'êtes pas connecté à internet</string>
|
||||
<string name="network_is_not_wifi">Mode Wi-Fi uniquement activé</string>
|
||||
<string name="operation_in_progress_overlay">Opération en cours, merci de patienter…</string>
|
||||
<string name="generic_address_picker_conversations_list_title">Conversations</string>
|
||||
<string name="generic_address_picker_contacts_list_title">Contacts</string>
|
||||
|
|
|
|||
|
|
@ -823,6 +823,7 @@
|
|||
<item quantity="other">%s notifications for other account(s)</item>
|
||||
</plurals>
|
||||
<string name="network_not_reachable">You aren\'t connected to internet</string>
|
||||
<string name="network_is_not_wifi">Wi-Fi only mode enabled</string>
|
||||
<string name="operation_in_progress_overlay">Operation in progress, please wait</string>
|
||||
<string name="generic_address_picker_conversations_list_title">Conversations</string>
|
||||
<string name="generic_address_picker_contacts_list_title">Contacts</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue