projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1048 from owncloud/shareWithYou_icon_in_fileList
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
syncadapter
/
AbstractOwnCloudSyncAdapter.java
diff --git
a/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java
b/src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java
index
a9defc0
..
4740310
100644
(file)
--- a/
src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java
+++ b/
src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java
@@
-1,6
+1,10
@@
-/* ownCloud Android client application
\r
+/**
\r
+ * ownCloud Android client application
\r
+ *
\r
+ * @author sassman
\r
+ * @author David A. Velasco
\r
* Copyright (C) 2011 Bartek Przybylski
\r
* Copyright (C) 2011 Bartek Przybylski
\r
- * Copyright (C) 201
2-2013
ownCloud Inc.
\r
+ * Copyright (C) 201
5
ownCloud Inc.
\r
*
\r
* This program is free software: you can redistribute it and/or modify
\r
* it under the terms of the GNU General Public License version 2,
\r
*
\r
* This program is free software: you can redistribute it and/or modify
\r
* it under the terms of the GNU General Public License version 2,
\r
@@
-24,12
+28,13
@@
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
\r
import org.apache.http.client.ClientProtocolException;
\r
\r
import org.apache.http.HttpResponse;
\r
import org.apache.http.client.ClientProtocolException;
\r
\r
+import com.owncloud.android.MainApp;
\r
import com.owncloud.android.datamodel.FileDataStorageManager;
\r
import com.owncloud.android.lib.common.accounts.AccountUtils;
\r
import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
\r
import com.owncloud.android.datamodel.FileDataStorageManager;
\r
import com.owncloud.android.lib.common.accounts.AccountUtils;
\r
import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
\r
-import com.owncloud.android.lib.common.OwnCloud
ClientFactory
;
\r
+import com.owncloud.android.lib.common.OwnCloud
Account
;
\r
import com.owncloud.android.lib.common.OwnCloudClient;
\r
import com.owncloud.android.lib.common.OwnCloudClient;
\r
-
\r
+import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
\r
\r
import android.accounts.Account;
\r
import android.accounts.AccountManager;
\r
\r
import android.accounts.Account;
\r
import android.accounts.AccountManager;
\r
@@
-44,9
+49,6
@@
import android.content.Context;
* resource types, like FileSync, ConcatsSync, CalendarSync, etc..
\r
*
\r
* Implements the standard {@link AbstractThreadedSyncAdapter}.
\r
* resource types, like FileSync, ConcatsSync, CalendarSync, etc..
\r
*
\r
* Implements the standard {@link AbstractThreadedSyncAdapter}.
\r
- *
\r
- * @author sassman
\r
- * @author David A. Velasco
\r
*/
\r
public abstract class AbstractOwnCloudSyncAdapter extends
\r
AbstractThreadedSyncAdapter {
\r
*/
\r
public abstract class AbstractOwnCloudSyncAdapter extends
\r
AbstractThreadedSyncAdapter {
\r
@@
-63,7
+65,8
@@
public abstract class AbstractOwnCloudSyncAdapter extends
this.setAccountManager(AccountManager.get(context));
\r
}
\r
\r
this.setAccountManager(AccountManager.get(context));
\r
}
\r
\r
- public AbstractOwnCloudSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
\r
+ public AbstractOwnCloudSyncAdapter(Context context, boolean autoInitialize,
\r
+ boolean allowParallelSyncs) {
\r
super(context, autoInitialize, allowParallelSyncs);
\r
this.setAccountManager(AccountManager.get(context));
\r
}
\r
super(context, autoInitialize, allowParallelSyncs);
\r
this.setAccountManager(AccountManager.get(context));
\r
}
\r
@@
-100,9
+103,12
@@
public abstract class AbstractOwnCloudSyncAdapter extends
return mStoreManager;
\r
}
\r
\r
return mStoreManager;
\r
}
\r
\r
- protected void initClientForCurrentAccount() throws OperationCanceledException, AuthenticatorException, IOException, AccountNotFoundException {
\r
+ protected void initClientForCurrentAccount() throws OperationCanceledException,
\r
+ AuthenticatorException, IOException, AccountNotFoundException {
\r
AccountUtils.constructFullURLForAccount(getContext(), account);
\r
AccountUtils.constructFullURLForAccount(getContext(), account);
\r
- mClient = OwnCloudClientFactory.createOwnCloudClient(account, getContext());
\r
+ OwnCloudAccount ocAccount = new OwnCloudAccount(account, getContext());
\r
+ mClient = OwnCloudClientManagerFactory.getDefaultSingleton().
\r
+ getClientFor(ocAccount, getContext());
\r
}
\r
\r
protected OwnCloudClient getClient() {
\r
}
\r
\r
protected OwnCloudClient getClient() {
\r