X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/92080afefcab6de830d6a5c099b04e3c3a7db47f..aef73a5263c94e34a38bc45ce1506651d80c7f78:/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 1ac3a0a4..a07b0823 100644 --- a/src/com/owncloud/android/files/services/FileDownloader.java +++ b/src/com/owncloud/android/files/services/FileDownloader.java @@ -42,9 +42,7 @@ import android.app.PendingIntent; import android.app.Service; import android.content.ContentValues; import android.content.Intent; -import android.net.Uri; import android.os.Binder; -import android.os.Environment; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; @@ -93,18 +91,6 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis private String buildRemoteName(Account account, OCFile file) { return account.name + file.getRemotePath(); } - - public static final String getSavePath(String accountName) { - File sdCard = Environment.getExternalStorageDirectory(); - return sdCard.getAbsolutePath() + "/owncloud/" + Uri.encode(accountName, "@"); - // 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 - } - - public static final String getTemporalPath(String accountName) { - File sdCard = Environment.getExternalStorageDirectory(); - return sdCard.getAbsolutePath() + "/owncloud/tmp/" + Uri.encode(accountName, "@"); - // 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 - } /** @@ -382,9 +368,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis end.putExtra(EXTRA_DOWNLOAD_RESULT, downloadResult.isSuccess()); end.putExtra(ACCOUNT_NAME, download.getAccount().name); end.putExtra(EXTRA_REMOTE_PATH, download.getRemotePath()); - if (downloadResult.isSuccess()) { - end.putExtra(EXTRA_FILE_PATH, download.getSavePath()); - } + end.putExtra(EXTRA_FILE_PATH, download.getSavePath()); sendBroadcast(end); }