aboutsummaryrefslogtreecommitdiff
path: root/src/github
diff options
context:
space:
mode:
Diffstat (limited to 'src/github')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadServiceImpl.java2
-rw-r--r--src/github/daneren2005/dsub/service/JukeboxController.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index 9568c0af..06c7495d 100644
--- a/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -1045,7 +1045,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
remoteState = newState;
switch(newState) {
case JUKEBOX_SERVER:
- remoteController = new JukeboxController(this);
+ remoteController = new JukeboxController(this, handler);
break;
case LOCAL: default:
break;
diff --git a/src/github/daneren2005/dsub/service/JukeboxController.java b/src/github/daneren2005/dsub/service/JukeboxController.java
index f27a147f..30160c1c 100644
--- a/src/github/daneren2005/dsub/service/JukeboxController.java
+++ b/src/github/daneren2005/dsub/service/JukeboxController.java
@@ -39,7 +39,7 @@ public class JukeboxController extends RemoteController {
private static final String TAG = JukeboxController.class.getSimpleName();
private static final long STATUS_UPDATE_INTERVAL_SECONDS = 5L;
- private final Handler handler = new Handler();
+ private final Handler handler;
private boolean running = false;
private final TaskQueue tasks = new TaskQueue();
private final ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
@@ -48,8 +48,9 @@ public class JukeboxController extends RemoteController {
private RemoteStatus jukeboxStatus;
private float gain = 0.5f;
- public JukeboxController(DownloadServiceImpl downloadService) {
+ public JukeboxController(DownloadServiceImpl downloadService, Handler handler) {
this.downloadService = downloadService;
+ this.handler = handler;
new Thread() {
@Override
public void run() {