From 35ad6f8dc17cf3e5231981ac025ad6ef6fcea3a4 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Wed, 27 Aug 2014 20:05:16 -0700 Subject: Fix shuffle buffer change causing crash due to invalid context --- src/github/daneren2005/dsub/service/DownloadService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java index 54df07ac..a21bbd91 100644 --- a/src/github/daneren2005/dsub/service/DownloadService.java +++ b/src/github/daneren2005/dsub/service/DownloadService.java @@ -111,7 +111,7 @@ public class DownloadService extends Service { private final Handler handler = new Handler(); private Handler mediaPlayerHandler; private final DownloadServiceLifecycleSupport lifecycleSupport = new DownloadServiceLifecycleSupport(this); - private final ShufflePlayBuffer shufflePlayBuffer = new ShufflePlayBuffer(this); + private ShufflePlayBuffer shufflePlayBuffer; private final LruCache downloadFileCache = new LruCache(100); private final List cleanupCandidates = new ArrayList(); @@ -224,6 +224,7 @@ public class DownloadService extends Service { instance = this; lifecycleSupport.onCreate(); + shufflePlayBuffer = new ShufflePlayBuffer(this); } @Override -- cgit v1.2.3