diff options
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn/core/StatusListener.java')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/StatusListener.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/StatusListener.java b/main/src/main/java/de/blinkt/openvpn/core/StatusListener.java index d6660147..8df1dfed 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/StatusListener.java +++ b/main/src/main/java/de/blinkt/openvpn/core/StatusListener.java @@ -27,9 +27,12 @@ public class StatusListener { IServiceStatus serviceStatus = IServiceStatus.Stub.asInterface(service); try { /* Check if this a local service ... */ - if (service.queryLocalInterface("de.blinkt.openvpn.core.IServiceStatus") == null) + if (service.queryLocalInterface("de.blinkt.openvpn.core.IServiceStatus") == null) { + VpnStatus.setConnectedVPNProfile(serviceStatus.getLastConnectedVPN()); serviceStatus.registerStatusCallback(mCallback); + } + } catch (RemoteException e) { e.printStackTrace(); } |