diff options
author | daneren2005 <daneren2005@gmail.com> | 2013-05-09 11:49:38 -0600 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2013-05-09 11:49:38 -0600 |
commit | dba6756bfd1c9460fda67b9b653c7e875632c16b (patch) | |
tree | 43041067fdacdfab6544714de1564dfd432edf8f | |
parent | 01332c834b75b3cb5adbd36587f8ed674d9add92 (diff) | |
download | dsub-dba6756bfd1c9460fda67b9b653c7e875632c16b.tar.gz dsub-dba6756bfd1c9460fda67b9b653c7e875632c16b.tar.bz2 dsub-dba6756bfd1c9460fda67b9b653c7e875632c16b.zip |
Synchronize serializing/deserializing
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index 68917d9e..e1df05a8 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -310,14 +310,18 @@ public class DownloadServiceLifecycleSupport { private class SerializeTask extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { - serializeDownloadQueueNow(); + synchronized(DownloadServiceLifecycleSupport.this) { + serializeDownloadQueueNow(); + } return null; } } private class DeserializeTask extends AsyncTask<Void, Void, Void> { @Override protected Void doInBackground(Void... params) { - deserializeDownloadQueueNow(); + synchronized(DownloadServiceLifecycleSupport.this) { + deserializeDownloadQueueNow(); + } return null; } } |