diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-01-30 09:19:21 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-01-30 09:19:21 -0800 |
commit | b78037fca560ab3b8b7b273358681a0b6e830a44 (patch) | |
tree | 1793d5f2187a5540bef104d095f3026995a72145 /src/github | |
parent | 3eea65132c03517384849a2203c035c55ce2ea72 (diff) | |
download | dsub-b78037fca560ab3b8b7b273358681a0b6e830a44.tar.gz dsub-b78037fca560ab3b8b7b273358681a0b6e830a44.tar.bz2 dsub-b78037fca560ab3b8b7b273358681a0b6e830a44.zip |
Do a one time wait for event handler to init, otherwise ignore
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 3a9c697f..fa0e66af 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -168,6 +168,13 @@ public class DownloadServiceLifecycleSupport { if (intent != null) { final String action = intent.getAction(); + if(eventHandler == null) { + Util.sleepQuietly(100L); + } + if(eventHandler == null) { + return; + } + eventHandler.post(new Runnable() { @Override public void run() { |