summaryrefslogtreecommitdiffhomepage
path: root/android/src/main/kotlin/net
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-07-31 13:04:05 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2019-07-31 14:01:30 +0000
commit8a7f10fe8c8001c60a4630f12970ee442d749e77 (patch)
tree65c5a4d2a139fc7b4d37ccbb5cc961716ede3aea /android/src/main/kotlin/net
parent767c30d5ada93f8ad59c2f4d4dff925e110a8c40 (diff)
downloadmullvadvpn-8a7f10fe8c8001c60a4630f12970ee442d749e77.tar.xz
mullvadvpn-8a7f10fe8c8001c60a4630f12970ee442d749e77.zip
Configure external link for too many keys error
Diffstat (limited to 'android/src/main/kotlin/net')
-rw-r--r--android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt
index 6eaaf452de..7060011158 100644
--- a/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt
+++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/NotificationBanner.kt
@@ -12,6 +12,8 @@ import net.mullvad.mullvadvpn.model.KeygenEvent
import net.mullvad.mullvadvpn.model.TunnelState
class NotificationBanner(val parentView: View, val context: Context) {
+ private val accountUrl = Uri.parse(context.getString(R.string.account_url))
+
private val banner: View = parentView.findViewById(R.id.notification_banner)
private val title: TextView = parentView.findViewById(R.id.notification_title)
private val message: TextView = parentView.findViewById(R.id.notification_message)
@@ -45,7 +47,10 @@ class NotificationBanner(val parentView: View, val context: Context) {
when (keyState) {
null -> return false
is KeygenEvent.NewKey -> return false
- is KeygenEvent.TooManyKeys -> show(R.string.wireguard_error, R.string.too_many_keys)
+ is KeygenEvent.TooManyKeys -> {
+ externalLink = accountUrl
+ show(R.string.wireguard_error, R.string.too_many_keys)
+ }
is KeygenEvent.GenerationFailure -> {
show(R.string.wireguard_error, R.string.failed_to_generate_key)
}