X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/91e50a97a527a27d134836f89c01d52ffaf1c20d..2be23eaec586972a5ff86c4f9c34d95188231821:/src/com/owncloud/android/files/services/FileDownloader.java diff --git a/src/com/owncloud/android/files/services/FileDownloader.java b/src/com/owncloud/android/files/services/FileDownloader.java index 07c4257c..dfac27b0 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -31,9 +31,10 @@ import java.util.concurrent.ConcurrentMap; import com.owncloud.android.authentication.AuthenticatorActivity; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; -import eu.alefzero.webdav.OnDatatransferProgressListener; import com.owncloud.android.network.OwnCloudClientUtils; +import com.owncloud.android.network.webdav.OnDatatransferProgressListener; +import com.owncloud.android.network.webdav.WebdavClient; import com.owncloud.android.operations.DownloadFileOperation; import com.owncloud.android.operations.RemoteOperationResult; import com.owncloud.android.operations.RemoteOperationResult.ResultCode; @@ -61,7 +62,6 @@ import android.widget.RemoteViews; import com.owncloud.android.Log_OC; import com.owncloud.android.MainApp; import com.owncloud.android.R; -import eu.alefzero.webdav.WebdavClient; public class FileDownloader extends Service implements OnDatatransferProgressListener { @@ -92,12 +92,12 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis private int mLastPercent; - public String getDownloadAddedMessage() { - return getClass().getName().toString() + DOWNLOAD_ADDED_MESSAGE; + public static String getDownloadAddedMessage() { + return FileDownloader.class.getName().toString() + DOWNLOAD_ADDED_MESSAGE; } - public String getDownloadFinishMessage() { - return getClass().getName().toString() + DOWNLOAD_FINISH_MESSAGE; + public static String getDownloadFinishMessage() { + return FileDownloader.class.getName().toString() + DOWNLOAD_FINISH_MESSAGE; } /** @@ -239,7 +239,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis if (account == null || file == null) return false; String targetKey = buildRemoteName(account, file); synchronized (mPendingDownloads) { - if (file.isDirectory()) { + if (file.isFolder()) { // this can be slow if there are many downloads :( Iterator it = mPendingDownloads.keySet().iterator(); boolean found = false;