summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-07-11 11:30:50 +0200
committercyBerta <cyberta@riseup.net>2019-07-11 11:30:50 +0200
commitdf5f64796269d77f9ee058139d5f251a0e9eead5 (patch)
tree480814a589fea4a3a1770a18c34a2eebaf560f01 /app/src/main/java
parent8444b148ad40e73d3a0fe07724d369e18eeb751d (diff)
fix empty parenthesis on EipFragment if no location name is available
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipFragment.java3
1 files changed, 2 insertions, 1 deletions
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);