aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-04-30 17:14:34 +0200
committerTobias Brunner <tobias@strongswan.org>2016-05-02 18:39:19 +0200
commite69781b1a2e15a2a6c01d9a0b67426ddbc799efc (patch)
treeb6ed8c9edc0cdb28d85883b63f51befb5bb81d74 /src
parent67fa05aa59edfdf94f54a009a4887f7bb75f0afc (diff)
downloadstrongswan-e69781b1a2e15a2a6c01d9a0b67426ddbc799efc.tar.bz2
strongswan-e69781b1a2e15a2a6c01d9a0b67426ddbc799efc.tar.xz
android: Show selected user identity in profile list
This also readds the colons that were removed from the labels.
Diffstat (limited to 'src')
-rw-r--r--src/frontends/android/app/src/main/java/org/strongswan/android/ui/adapter/VpnProfileAdapter.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/frontends/android/app/src/main/java/org/strongswan/android/ui/adapter/VpnProfileAdapter.java b/src/frontends/android/app/src/main/java/org/strongswan/android/ui/adapter/VpnProfileAdapter.java
index f3bb271bc..58296a018 100644
--- a/src/frontends/android/app/src/main/java/org/strongswan/android/ui/adapter/VpnProfileAdapter.java
+++ b/src/frontends/android/app/src/main/java/org/strongswan/android/ui/adapter/VpnProfileAdapter.java
@@ -63,12 +63,18 @@ public class VpnProfileAdapter extends ArrayAdapter<VpnProfile>
TextView tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_name);
tv.setText(profile.getName());
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_gateway);
- tv.setText(getContext().getString(R.string.profile_gateway_label) + " " + profile.getGateway());
+ tv.setText(getContext().getString(R.string.profile_gateway_label) + ": " + profile.getGateway());
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_username);
if (profile.getVpnType().has(VpnTypeFeature.USER_PASS))
{ /* if the view is reused we make sure it is visible */
tv.setVisibility(View.VISIBLE);
- tv.setText(getContext().getString(R.string.profile_username_label) + " " + profile.getUsername());
+ tv.setText(getContext().getString(R.string.profile_username_label) + ": " + profile.getUsername());
+ }
+ else if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE) &&
+ profile.getLocalId() != null)
+ {
+ tv.setVisibility(View.VISIBLE);
+ tv.setText(getContext().getString(R.string.profile_user_select_id_label) + ": " + profile.getLocalId());
}
else
{
@@ -77,7 +83,7 @@ public class VpnProfileAdapter extends ArrayAdapter<VpnProfile>
tv = (TextView)vpnProfileView.findViewById(R.id.profile_item_certificate);
if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE))
{
- tv.setText(getContext().getString(R.string.profile_user_certificate_label) + " " + profile.getUserCertificateAlias());
+ tv.setText(getContext().getString(R.string.profile_user_certificate_label) + ": " + profile.getUserCertificateAlias());
tv.setVisibility(View.VISIBLE);
}
else