From 687d8fcdc40480d2f0863065e7c99a44be136eae Mon Sep 17 00:00:00 2001 From: Joshua Bahnsen Date: Sun, 9 Feb 2014 21:32:15 -0700 Subject: [PATCH] Use Util.sleepQuietly() for all sleeps --- .../ultrasonic/androidapp/service/DownloadServiceImpl.java | 2 +- src/com/thejoshwa/ultrasonic/androidapp/util/StreamProxy.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/thejoshwa/ultrasonic/androidapp/service/DownloadServiceImpl.java b/src/com/thejoshwa/ultrasonic/androidapp/service/DownloadServiceImpl.java index ad4986f5..76f6d4f9 100644 --- a/src/com/thejoshwa/ultrasonic/androidapp/service/DownloadServiceImpl.java +++ b/src/com/thejoshwa/ultrasonic/androidapp/service/DownloadServiceImpl.java @@ -2182,7 +2182,7 @@ public class DownloadServiceImpl extends Service implements DownloadService cachedPosition = mediaPlayer.getCurrentPosition(); } - Thread.sleep(50L); + Util.sleepQuietly(25L); } catch (Exception e) { diff --git a/src/com/thejoshwa/ultrasonic/androidapp/util/StreamProxy.java b/src/com/thejoshwa/ultrasonic/androidapp/util/StreamProxy.java index 9f51eda7..840a3466 100644 --- a/src/com/thejoshwa/ultrasonic/androidapp/util/StreamProxy.java +++ b/src/com/thejoshwa/ultrasonic/androidapp/util/StreamProxy.java @@ -260,7 +260,7 @@ public class StreamProxy implements Runnable if (cbSentThisBatch == 0) { Log.d(TAG, String.format("Blocking until more data appears (%d)", cbToSend)); - Thread.sleep(1000); + Util.sleepQuietly(1000L); } } }