X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/e9ba0ebbfae76d20f74f296259f694844504836f..6f1fe5ad6d8b6f49275a8e44c9631cc65b1bafc8:/src/com/owncloud/android/operations/DownloadFileOperation.java diff --git a/src/com/owncloud/android/operations/DownloadFileOperation.java b/src/com/owncloud/android/operations/DownloadFileOperation.java index f3eace9c..78811f8b 100644 --- a/src/com/owncloud/android/operations/DownloadFileOperation.java +++ b/src/com/owncloud/android/operations/DownloadFileOperation.java @@ -1,5 +1,9 @@ -/* ownCloud Android client application - * Copyright (C) 2012-2013 ownCloud Inc. +/** + * ownCloud Android client application + * + * @author David A. Velasco + * @author masensio + * Copyright (C) 2015 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, @@ -23,7 +27,6 @@ import java.util.Iterator; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; -import com.owncloud.android.MainApp; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.lib.common.network.OnDatatransferProgressListener; import com.owncloud.android.lib.common.OwnCloudClient; @@ -35,14 +38,10 @@ import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation; import com.owncloud.android.utils.FileStorageUtils; import android.accounts.Account; -import android.media.MediaScannerConnection; import android.webkit.MimeTypeMap; /** * Remote mDownloadOperation performing the download of a file to an ownCloud server - * - * @author David A. Velasco - * @author masensio */ public class DownloadFileOperation extends RemoteOperation { @@ -152,18 +151,11 @@ public class DownloadFileOperation extends RemoteOperation { newFile = new File(getSavePath()); newFile.getParentFile().mkdirs(); moved = tmpFile.renameTo(newFile); - - Log_OC.d("mediaScan", "mediaScan : " + newFile.getAbsolutePath()); - MediaScannerConnection.scanFile(MainApp.getAppContext(), - new String[]{newFile.getAbsolutePath()}, null, null); - - if (!moved) result = new RemoteOperationResult(RemoteOperationResult.ResultCode.LOCAL_STORAGE_NOT_MOVED); } Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage()); - return result; } @@ -186,5 +178,4 @@ public class DownloadFileOperation extends RemoteOperation { mDataTransferListeners.remove(listener); } } - }