diff options
author | Will Szumski <will@cowboycoders.org> | 2016-11-24 18:20:02 +0000 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2016-11-28 19:53:44 +0100 |
commit | 38050063b38b451d5bba562c500e7a8303370f39 (patch) | |
tree | f3c7747a536f0c17dafba3149acb2d2f72b19453 /src | |
parent | 67c09b54d28f20cfad41814d2b49c7551971ee6d (diff) | |
download | andiodine-38050063b38b451d5bba562c500e7a8303370f39.tar.gz andiodine-38050063b38b451d5bba562c500e7a8303370f39.zip |
Inform user of error status when tunnel name server cannot be detected
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/xapek/andiodine/IodineVpnService.java | 2 | ||||
-rw-r--r-- | src/main/res/values-de/strings.xml | 1 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/xapek/andiodine/IodineVpnService.java b/src/main/java/org/xapek/andiodine/IodineVpnService.java index bbe126b..5e1c6f5 100644 --- a/src/main/java/org/xapek/andiodine/IodineVpnService.java +++ b/src/main/java/org/xapek/andiodine/IodineVpnService.java @@ -211,6 +211,8 @@ public class IodineVpnService extends VpnService implements Runnable { String tunnelNameserver = IodineClient.getPropertyNetDns1(); if (tunnelNameserver.isEmpty()) { + String errorMessage = getString(R.string.vpnservice_error_dns_detect_failed); + setStatus(ACTION_STATUS_ERROR, mConfiguration.getId(), errorMessage); Log.e(TAG, "No valid IPv4 name servers detected. Aborting..."); return; } diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index 23d9dcc..9b98757 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -49,6 +49,7 @@ <string name="vpnservice_error_handshake_failed">Handshake fehlgeschlagen</string> <string name="vpnservice_error_unknown_error_code">Unbekannter Fehler. Kode %d</string> <string name="vpnservice_error_unknown_error_string">Unbekannter Fehler. Grund: %s</string> + <string name="vpnservice_error_dns_detect_failed">Es wurden keine gültigen IPv4-Nameserver erkannt</string> <string name="idle">Leerlauf</string> <string name="warning">Warnung</string> <string name="error">Fehler</string> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 21a3fed..f584765 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -74,6 +74,7 @@ <string name="vpnservice_error_handshake_failed">Handshake failed</string> <string name="vpnservice_error_unknown_error_code">Unknown Error. Code %d</string> <string name="vpnservice_error_unknown_error_string">Unknown Error. Reason: %s</string> + <string name="vpnservice_error_dns_detect_failed">No valid IPv4 name servers detected</string> <string name="idle">Idle</string> <string name="warning">Warning</string> <string name="error">Error</string> @@ -85,4 +86,5 @@ <string name="main_about">About</string> <string name="pref_delete">Delete</string> + </resources> |