From: Bartek Przybylski Date: Thu, 21 Jun 2012 17:20:40 +0000 (+0200) Subject: allow synch of multiple accounts at once X-Git-Tag: oc-android-1.4.3~353 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/8bcbc073e2c16134e5c3e77a9fc9a5f5269efb79?ds=inline allow synch of multiple accounts at once --- diff --git a/src/eu/alefzero/owncloud/syncadapter/FileSyncService.java b/src/eu/alefzero/owncloud/syncadapter/FileSyncService.java index e4112d7f..6ab23db1 100644 --- a/src/eu/alefzero/owncloud/syncadapter/FileSyncService.java +++ b/src/eu/alefzero/owncloud/syncadapter/FileSyncService.java @@ -32,19 +32,11 @@ public class FileSyncService extends Service { public static final String IN_PROGRESS = "sync_in_progress"; public static final String ACCOUNT_NAME = "account_name"; - private static final Object syncAdapterLock = new Object(); - private static AbstractOwnCloudSyncAdapter concretSyncAdapter = null; - /* * {@inheritDoc} */ @Override public void onCreate() { - synchronized (syncAdapterLock) { - if (concretSyncAdapter == null) - concretSyncAdapter = new FileSyncAdapter( - getApplicationContext(), true); - } } /* @@ -52,6 +44,6 @@ public class FileSyncService extends Service { */ @Override public IBinder onBind(Intent intent) { - return concretSyncAdapter.getSyncAdapterBinder(); + return new FileSyncAdapter(getApplicationContext(), true).getSyncAdapterBinder(); } }