From dba6756bfd1c9460fda67b9b653c7e875632c16b Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 9 May 2013 11:49:38 -0600 Subject: Synchronize serializing/deserializing --- .../daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 8 ++++++-- 1 file 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 { @Override protected Void doInBackground(Void... params) { - serializeDownloadQueueNow(); + synchronized(DownloadServiceLifecycleSupport.this) { + serializeDownloadQueueNow(); + } return null; } } private class DeserializeTask extends AsyncTask { @Override protected Void doInBackground(Void... params) { - deserializeDownloadQueueNow(); + synchronized(DownloadServiceLifecycleSupport.this) { + deserializeDownloadQueueNow(); + } return null; } } -- cgit v1.2.3