|
@@ -32,19 +32,11 @@ public class FileSyncService extends Service {
|
|
public static final String IN_PROGRESS = "sync_in_progress";
|
|
public static final String IN_PROGRESS = "sync_in_progress";
|
|
public static final String ACCOUNT_NAME = "account_name";
|
|
public static final String ACCOUNT_NAME = "account_name";
|
|
|
|
|
|
- private static final Object syncAdapterLock = new Object();
|
|
|
|
- private static AbstractOwnCloudSyncAdapter concretSyncAdapter = null;
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* {@inheritDoc}
|
|
* {@inheritDoc}
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public void onCreate() {
|
|
public void onCreate() {
|
|
- synchronized (syncAdapterLock) {
|
|
|
|
- if (concretSyncAdapter == null)
|
|
|
|
- concretSyncAdapter = new FileSyncAdapter(
|
|
|
|
- getApplicationContext(), true);
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -52,6 +44,6 @@ public class FileSyncService extends Service {
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
public IBinder onBind(Intent intent) {
|
|
public IBinder onBind(Intent intent) {
|
|
- return concretSyncAdapter.getSyncAdapterBinder();
|
|
|
|
|
|
+ return new FileSyncAdapter(getApplicationContext(), true).getSyncAdapterBinder();
|
|
}
|
|
}
|
|
}
|
|
}
|