Эх сурвалжийг харах

allow synch of multiple accounts at once

Bartek Przybylski 13 жил өмнө
parent
commit
8bcbc073e2

+ 1 - 9
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();
     }
 }