diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-04-08 00:06:55 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-04-08 00:06:55 +0200 |
commit | 92432b6f64bc56fcb9f59eb40b65032eae18177b (patch) | |
tree | c97ccdadb6f2e937c8fe8a7dd5d10d9418ad605b /src/de | |
parent | 195b0a10d96ad358d956381d8a0e423a8dd913c7 (diff) |
Fix status updates
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/blinkt/openvpn/api/ExternalOpenVPNService.java | 11 |
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;
|