aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2015-01-30 09:19:21 -0800
committerScott Jackson <daneren2005@gmail.com>2015-01-30 09:19:21 -0800
commitb78037fca560ab3b8b7b273358681a0b6e830a44 (patch)
tree1793d5f2187a5540bef104d095f3026995a72145 /src
parent3eea65132c03517384849a2203c035c55ce2ea72 (diff)
downloaddsub-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')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java7
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() {