diff --git a/src/frontends/android/app/src/main/java/org/strongswan/android/logic/CharonVpnService.java b/src/frontends/android/app/src/main/java/org/strongswan/android/logic/CharonVpnService.java
index 53d84cf0c..24cc1da90 100644
--- a/src/frontends/android/app/src/main/java/org/strongswan/android/logic/CharonVpnService.java
+++ b/src/frontends/android/app/src/main/java/org/strongswan/android/logic/CharonVpnService.java
@@ -402,9 +402,10 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
int s = R.string.state_disabled;
if (error != ErrorState.NO_ERROR)
{
- s = R.string.state_error;
+ s = mService.getErrorText();
builder.setSmallIcon(R.drawable.ic_notification_warning);
builder.setColor(ContextCompat.getColor(this, R.color.error_text));
+ builder.setContentText(getString(R.string.tap_for_details));
}
else
{
@@ -438,7 +439,10 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
PendingIntent.FLAG_UPDATE_CURRENT);
builder.addAction(R.drawable.ic_notification_disconnect, getString(R.string.disconnect), pending);
}
- builder.setContentText(name);
+ if (error == ErrorState.NO_ERROR)
+ {
+ builder.setContentText(name);
+ }
builder.setPublicVersion(buildNotification(true));
}
diff --git a/src/frontends/android/app/src/main/java/org/strongswan/android/logic/VpnStateService.java b/src/frontends/android/app/src/main/java/org/strongswan/android/logic/VpnStateService.java
index cd30049f7..5effafdf1 100644
--- a/src/frontends/android/app/src/main/java/org/strongswan/android/logic/VpnStateService.java
+++ b/src/frontends/android/app/src/main/java/org/strongswan/android/logic/VpnStateService.java
@@ -22,6 +22,7 @@ import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
+import org.strongswan.android.R;
import org.strongswan.android.data.VpnProfile;
import org.strongswan.android.logic.imc.ImcState;
import org.strongswan.android.logic.imc.RemediationInstruction;
@@ -166,6 +167,35 @@ public class VpnStateService extends Service
return mError;
}
+ /**
+ * Get a description of the current error, if any.
+ *
+ * @return error description text id
+ */
+ public int getErrorText()
+ {
+ switch (mError)
+ {
+ case AUTH_FAILED:
+ if (mImcState == ImcState.BLOCK)
+ {
+ return R.string.error_assessment_failed;
+ }
+ else
+ {
+ return R.string.error_auth_failed;
+ }
+ case PEER_AUTH_FAILED:
+ return R.string.error_peer_auth_failed;
+ case LOOKUP_FAILED:
+ return R.string.error_lookup_failed;
+ case UNREACHABLE:
+ return R.string.error_unreachable;
+ default:
+ return R.string.error_generic;
+ }
+ }
+
/**
* Get the current IMC state, if any.
*
diff --git a/src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnStateFragment.java b/src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnStateFragment.java
index d75db9b6e..0e4a58329 100644
--- a/src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnStateFragment.java
+++ b/src/frontends/android/app/src/main/java/org/strongswan/android/ui/VpnStateFragment.java
@@ -263,31 +263,7 @@ public class VpnStateFragment extends Fragment implements VpnStateListener
enableActionButton(null);
mStateView.setText(R.string.state_error);
mStateView.setTextColor(mColorStateError);
- switch (error)
- {
- case AUTH_FAILED:
- if (imcState == ImcState.BLOCK)
- {
- showError(R.string.error_assessment_failed);
- }
- else
- {
- showError(R.string.error_auth_failed);
- }
- break;
- case PEER_AUTH_FAILED:
- showError(R.string.error_peer_auth_failed);
- break;
- case LOOKUP_FAILED:
- showError(R.string.error_lookup_failed);
- break;
- case UNREACHABLE:
- showError(R.string.error_unreachable);
- break;
- default:
- showError(R.string.error_generic);
- break;
- }
+ showError(mService.getErrorText());
return true;
}
diff --git a/src/frontends/android/app/src/main/res/values-de/strings.xml b/src/frontends/android/app/src/main/res/values-de/strings.xml
index c3ea58ced..45de885dd 100644
--- a/src/frontends/android/app/src/main/res/values-de/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-de/strings.xml
@@ -31,6 +31,7 @@
strongSwan-Verknüpfung
VPN Verbindungsstatus
Zeigt Informationen zum Verbindungsstatus der VPN Verbindung und dient als permanente Notification dazu, den VPN Dienst im Hintergrund am Laufen zu halten.
+ Antippen für Details.
Einstellungen
diff --git a/src/frontends/android/app/src/main/res/values-pl/strings.xml b/src/frontends/android/app/src/main/res/values-pl/strings.xml
index 9b668a9aa..091417b52 100644
--- a/src/frontends/android/app/src/main/res/values-pl/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-pl/strings.xml
@@ -31,6 +31,7 @@
Skrót strongSwan
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings
diff --git a/src/frontends/android/app/src/main/res/values-ru/strings.xml b/src/frontends/android/app/src/main/res/values-ru/strings.xml
index b081f21e3..5b53893ba 100644
--- a/src/frontends/android/app/src/main/res/values-ru/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-ru/strings.xml
@@ -28,6 +28,7 @@
Ссылка на strongSwan
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings
diff --git a/src/frontends/android/app/src/main/res/values-ua/strings.xml b/src/frontends/android/app/src/main/res/values-ua/strings.xml
index 192f8aa2c..c21c2f8ff 100644
--- a/src/frontends/android/app/src/main/res/values-ua/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-ua/strings.xml
@@ -29,6 +29,7 @@
strongSwan посилання
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings
diff --git a/src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml b/src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml
index 982ca236a..74ad2490a 100644
--- a/src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-zh-rCN/strings.xml
@@ -28,6 +28,7 @@
strongSwan快捷方式
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings
diff --git a/src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml b/src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml
index 975a8f145..e7f004e38 100644
--- a/src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml
+++ b/src/frontends/android/app/src/main/res/values-zh-rTW/strings.xml
@@ -28,6 +28,7 @@
strongSwan快速選單
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings
diff --git a/src/frontends/android/app/src/main/res/values/strings.xml b/src/frontends/android/app/src/main/res/values/strings.xml
index 1021d19aa..8c0bf5f6c 100644
--- a/src/frontends/android/app/src/main/res/values/strings.xml
+++ b/src/frontends/android/app/src/main/res/values/strings.xml
@@ -31,6 +31,7 @@
strongSwan shortcut
VPN connection state
Provides information about the VPN connection state and serves as permanent notification to keep the VPN service running in the background.
+ Tap for details.
Settings