From 83007ae1abc16de9489431cef599e9d60a518d6a Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 23 Jul 2012 12:34:27 +0200 Subject: check for extrainfo == null --- src/de/blinkt/openvpn/NetworkSateReceiver.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/de/blinkt/openvpn') diff --git a/src/de/blinkt/openvpn/NetworkSateReceiver.java b/src/de/blinkt/openvpn/NetworkSateReceiver.java index 0758cf3..6584e0f 100644 --- a/src/de/blinkt/openvpn/NetworkSateReceiver.java +++ b/src/de/blinkt/openvpn/NetworkSateReceiver.java @@ -33,8 +33,12 @@ public class NetworkSateReceiver extends BroadcastReceiver { String subtype = networkInfo.getSubtypeName(); if(subtype==null) subtype = ""; + String extrainfo = networkInfo.getExtraInfo(); + if(extrainfo==null) + extrainfo=""; + netstatestring = String.format("%2$s %4$s to %1$s %3$s",networkInfo.getTypeName(), - networkInfo.getDetailedState(),networkInfo.getExtraInfo(),subtype ); + networkInfo.getDetailedState(),extrainfo,subtype ); } if(networkInfo!=null && networkInfo.getState() == State.CONNECTED) { -- cgit v1.2.3