summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-04-08 00:06:55 +0200
committerArne Schwabe <arne@rfc2549.org>2013-04-08 00:06:55 +0200
commit92432b6f64bc56fcb9f59eb40b65032eae18177b (patch)
treec97ccdadb6f2e937c8fe8a7dd5d10d9418ad605b /src/de/blinkt/openvpn
parent195b0a10d96ad358d956381d8a0e423a8dd913c7 (diff)
Fix status updates
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/api/ExternalOpenVPNService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
index 9e6ac9f3..cab00599 100644
--- a/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
+++ b/src/de/blinkt/openvpn/api/ExternalOpenVPNService.java
@@ -72,6 +72,7 @@ public class ExternalOpenVPNService extends Service implements StateListener {
intent.setAction(OpenVpnService.START_SERVICE);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+ mHandler.setService(this);
}
private final IOpenVPNAPIService.Stub mBinder = new IOpenVPNAPIService.Stub() {
@@ -249,9 +250,17 @@ public class ExternalOpenVPNService extends Service implements StateListener {
}
- private static final Handler mHandler = new Handler() {
+ private static final OpenVPNServiceHandler mHandler = new OpenVPNServiceHandler();
+
+
+ static class OpenVPNServiceHandler extends Handler {
WeakReference<ExternalOpenVPNService> service= null;
+ private void setService(ExternalOpenVPNService eos)
+ {
+ service = new WeakReference<ExternalOpenVPNService>(eos);
+ }
+
@Override public void handleMessage(Message msg) {
RemoteCallbackList<IOpenVPNStatusCallback> callbacks;