// always get client from client manager, to get fresh credentials in case of update
OwnCloudAccount ocAccount = new OwnCloudAccount(account, mService);
mOwnCloudClient = OwnCloudClientManagerFactory.getDefaultSingleton().
- getClientFor(ocAccount, mService, MainApp.getUserAgent());
+ getClientFor(ocAccount, mService);
result = mCurrentSyncOperation.execute(mOwnCloudClient, mStorageManager);
public void add(Account account, String remotePath,
SynchronizeFolderOperation syncFolderOperation){
- mPendingOperations.putIfAbsent(account, remotePath, syncFolderOperation);
- sendBroadcastNewSyncFolder(account, remotePath); // TODO upgrade!
+ Pair<String, String> putResult =
+ mPendingOperations.putIfAbsent(account, remotePath, syncFolderOperation);
+ if (putResult != null) {
+ sendBroadcastNewSyncFolder(account, remotePath); // TODO upgrade!
+ }
}