summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-02-24 18:29:35 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-02-27 12:15:21 +0000
commit57f19f079dd220bfe32fbac97542d5e6cbe76b91 (patch)
tree806e7d6c2d69f4863caae33c97dcb429e0d2dfdd
parent7d69d3bd423a4dc6b71f972040bd1c7830b1b9c3 (diff)
downloadmullvadvpn-57f19f079dd220bfe32fbac97542d5e6cbe76b91.tar.xz
mullvadvpn-57f19f079dd220bfe32fbac97542d5e6cbe76b91.zip
Show critical error message in notification
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt11
-rw-r--r--android/src/main/res/values/strings.xml3
2 files changed, 11 insertions, 3 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
index b352db1fce..4fb1557d8c 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/service/ForegroundNotificationManager.kt
@@ -103,8 +103,7 @@ class ForegroundNotificationManager(
if (state.errorState.isBlocking) {
R.string.blocking_all_connections
} else {
- // TODO Revise use of message when the app fails to block traffic
- R.string.unsecured
+ R.string.critical_error
}
}
}
@@ -124,7 +123,13 @@ class ForegroundNotificationManager(
else -> R.string.connect
}
}
- is TunnelState.Error -> R.string.disconnect
+ is TunnelState.Error -> {
+ if (state.errorState.isBlocking) {
+ R.string.disconnect
+ } else {
+ R.string.dismiss
+ }
+ }
}
}
diff --git a/android/src/main/res/values/strings.xml b/android/src/main/res/values/strings.xml
index f34ef41a9b..4294c0f868 100644
--- a/android/src/main/res/values/strings.xml
+++ b/android/src/main/res/values/strings.xml
@@ -5,6 +5,8 @@
<string name="disconnecting">Disconnecting</string>
<string name="secured">Secured</string>
<string name="unsecured">Unsecured</string>
+ <string name="critical_error">Critical error (your attention is
+ required)</string>
<string name="blocking_all_connections">Blocking all
connections</string>
<string name="foreground_notification_channel_name">VPN tunnel
@@ -89,6 +91,7 @@
<string name="connect">Secure my connection</string>
<string name="cancel">Cancel</string>
<string name="disconnect">Disconnect</string>
+ <string name="dismiss">Dismiss</string>
<string name="switch_location">Switch location</string>
<string name="wireguard">WireGuard</string>
<string name="tcp">TCP</string>