import android.app.Service;\r
import android.content.ContentValues;\r
import android.content.Intent;\r
-import android.net.Uri;\r
import android.os.Binder;\r
-import android.os.Environment;\r
import android.os.Handler;\r
import android.os.HandlerThread;\r
import android.os.IBinder;\r
private String buildRemoteName(Account account, OCFile file) {\r
return account.name + file.getRemotePath();\r
}\r
- \r
- public static final String getSavePath(String accountName) {\r
- File sdCard = Environment.getExternalStorageDirectory();\r
- return sdCard.getAbsolutePath() + "/owncloud/" + Uri.encode(accountName, "@"); \r
- // URL encoding is an 'easy fix' to overcome that NTFS and FAT32 don't allow ":" in file names, that can be in the accountName since 0.1.190B\r
- }\r
- \r
- public static final String getTemporalPath(String accountName) {\r
- File sdCard = Environment.getExternalStorageDirectory();\r
- return sdCard.getAbsolutePath() + "/owncloud/tmp/" + Uri.encode(accountName, "@");\r
- // URL encoding is an 'easy fix' to overcome that NTFS and FAT32 don't allow ":" in file names, that can be in the accountName since 0.1.190B\r
- }\r
\r
\r
/**\r
end.putExtra(EXTRA_DOWNLOAD_RESULT, downloadResult.isSuccess());\r
end.putExtra(ACCOUNT_NAME, download.getAccount().name);\r
end.putExtra(EXTRA_REMOTE_PATH, download.getRemotePath());\r
- if (downloadResult.isSuccess()) {\r
- end.putExtra(EXTRA_FILE_PATH, download.getSavePath());\r
- }\r
+ end.putExtra(EXTRA_FILE_PATH, download.getSavePath());\r
sendBroadcast(end);\r
}\r
\r