From df5f64796269d77f9ee058139d5f251a0e9eead5 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Thu, 11 Jul 2019 11:30:50 +0200 Subject: fix empty parenthesis on EipFragment if no location name is available --- app/src/main/java/se/leap/bitmaskclient/EipFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java index 0a58bdc2..11ad8da3 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java @@ -35,6 +35,7 @@ import android.support.v7.app.AlertDialog; import android.support.v7.widget.AppCompatButton; import android.support.v7.widget.AppCompatImageView; import android.support.v7.widget.AppCompatTextView; +import android.text.TextUtils; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; @@ -537,7 +538,7 @@ public class EipFragment extends Fragment implements Observer { private void setVpnRouteText() { String vpnRouteString = provider.getName(); VpnProfile vpnProfile = ProfileManager.getLastConnectedVpn(); - if (vpnProfile != null && vpnProfile.mName != null) { + if (vpnProfile != null && !TextUtils.isEmpty(vpnProfile.mName)) { vpnRouteString += " (" + vpnProfile.mName + ")"; } vpnRoute.setText(vpnRouteString); -- cgit v1.2.3