aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-02-18 16:06:03 -0800
committerScott Jackson <daneren2005@gmail.com>2014-02-18 16:06:03 -0800
commit2e2964235d96f85ba12ac3a87a233ae21bedb13d (patch)
tree5967f6f283c0ea06269688a9891a25bc53455ff1 /src
parent0fac4fb558fa9e22def8fd705973025fcf54f553 (diff)
downloaddsub-2e2964235d96f85ba12ac3a87a233ae21bedb13d.tar.gz
dsub-2e2964235d96f85ba12ac3a87a233ae21bedb13d.tar.bz2
dsub-2e2964235d96f85ba12ac3a87a233ae21bedb13d.zip
Give names to all threads
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java2
-rw-r--r--src/github/daneren2005/dsub/service/DownloadService.java4
-rw-r--r--src/github/daneren2005/dsub/service/JukeboxController.java2
-rw-r--r--src/github/daneren2005/dsub/service/StreamProxy.java2
-rw-r--r--src/github/daneren2005/dsub/util/CancellableTask.java2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java
index 9977c69a..9598b572 100644
--- a/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -454,7 +454,7 @@ public class DownloadFile {
// Start a thread that will close the input stream if the task is
// cancelled, thus causing the copy() method to return.
- new Thread() {
+ new Thread("DownloadFile_copy") {
@Override
public void run() {
while (true) {
diff --git a/src/github/daneren2005/dsub/service/DownloadService.java b/src/github/daneren2005/dsub/service/DownloadService.java
index d5664d25..f2383fdb 100644
--- a/src/github/daneren2005/dsub/service/DownloadService.java
+++ b/src/github/daneren2005/dsub/service/DownloadService.java
@@ -180,7 +180,7 @@ public class DownloadService extends Service {
mediaPlayerHandler = new Handler(mediaPlayerLooper);
Looper.loop();
}
- }).start();
+ }, "DownloadService").start();
Util.registerMediaButtonEventReceiver(this);
@@ -993,7 +993,7 @@ public class DownloadService extends Service {
if(playerState == STARTED && positionCache == null) {
positionCache = new PositionCache();
- Thread thread = new Thread(positionCache);
+ Thread thread = new Thread(positionCache, "PositionCache");
thread.start();
} else if(playerState != STARTED && positionCache != null) {
positionCache.stop();
diff --git a/src/github/daneren2005/dsub/service/JukeboxController.java b/src/github/daneren2005/dsub/service/JukeboxController.java
index eff2da0b..2b8e7715 100644
--- a/src/github/daneren2005/dsub/service/JukeboxController.java
+++ b/src/github/daneren2005/dsub/service/JukeboxController.java
@@ -49,7 +49,7 @@ public class JukeboxController extends RemoteController {
public JukeboxController(DownloadService downloadService, Handler handler) {
this.downloadService = downloadService;
this.handler = handler;
- new Thread() {
+ new Thread("JukeboxController") {
@Override
public void run() {
running = true;
diff --git a/src/github/daneren2005/dsub/service/StreamProxy.java b/src/github/daneren2005/dsub/service/StreamProxy.java
index 900a0c92..d660b6d3 100644
--- a/src/github/daneren2005/dsub/service/StreamProxy.java
+++ b/src/github/daneren2005/dsub/service/StreamProxy.java
@@ -56,7 +56,7 @@ public class StreamProxy implements Runnable {
}
public void start() {
- thread = new Thread(this);
+ thread = new Thread(this, "StreamProxy");
thread.start();
}
diff --git a/src/github/daneren2005/dsub/util/CancellableTask.java b/src/github/daneren2005/dsub/util/CancellableTask.java
index 933bc0c1..d519f276 100644
--- a/src/github/daneren2005/dsub/util/CancellableTask.java
+++ b/src/github/daneren2005/dsub/util/CancellableTask.java
@@ -65,7 +65,7 @@ public abstract class CancellableTask {
public abstract void execute();
public void start() {
- thread.set(new Thread() {
+ thread.set(new Thread("CancellableTask") {
@Override
public void run() {
running.set(true);