import android.content.SyncResult;\r
import android.content.IntentSender.SendIntentException;\r
import android.os.Bundle;\r
+import android.util.Log;\r
import eu.alefzero.owncloud.datamodel.FileDataStorageManager;\r
import eu.alefzero.owncloud.datamodel.OCFile;\r
import eu.alefzero.webdav.WebdavEntry;\r
*/\r
public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {\r
\r
- public static final String SYNC_MESSAGE = "eu.alefzero.owncloud.files.ACCOUNT_SYNC";\r
- public static final String IN_PROGRESS = "sync_in_progress";\r
- public static final String ACCOUNT_NAME = "account_name";\r
- \r
public FileSyncAdapter(Context context, boolean autoInitialize) {\r
super(context, autoInitialize);\r
}\r
this.setContentProvider(provider);\r
this.setStorageManager(new FileDataStorageManager(account, getContentProvider()));\r
\r
- Intent i = new Intent(SYNC_MESSAGE);\r
- i.putExtra(IN_PROGRESS, true);\r
- i.putExtra("ACCOUNT_NAME", account.name);\r
+ Intent i = new Intent(FileSyncService.SYNC_MESSAGE);\r
+ i.putExtra(FileSyncService.IN_PROGRESS, true);\r
+ i.putExtra(FileSyncService.ACCOUNT_NAME, account.name);\r
getContext().sendStickyBroadcast(i);\r
\r
PropFindMethod query;\r
try {\r
- query = new PropFindMethod(getUri().toString());\r
+ Log.e("ASD", getUri().toString());\r
+ query = new PropFindMethod(getUri().toString()+"/");\r
getClient().executeMethod(query);\r
MultiStatus resp = null;\r
resp = query.getResponseBodyAsMultiStatus();\r
+ \r
if (resp.getResponses().length > 0) {\r
WebdavEntry we = new WebdavEntry(resp.getResponses()[0]);\r
OCFile file = fillOCFile(we);\r
syncResult.stats.numIoExceptions++;\r
e.printStackTrace();\r
}\r
- i.putExtra(IN_PROGRESS, false);\r
+ i.putExtra(FileSyncService.IN_PROGRESS, false);\r
getContext().sendStickyBroadcast(i);\r
}\r
\r