X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/42fde39ff1694bd618729c07a615bbb410072d82..b064bd45916f17bf1ae0fc43e2c23a2f1fb8d925:/src/com/owncloud/android/utils/CopyTmpFileAsyncTask.java
diff --git a/src/com/owncloud/android/utils/CopyTmpFileAsyncTask.java b/src/com/owncloud/android/utils/CopyTmpFileAsyncTask.java
new file mode 100644
index 00000000..a680d0d2
--- /dev/null
+++ b/src/com/owncloud/android/utils/CopyTmpFileAsyncTask.java
@@ -0,0 +1,132 @@
+/**
+ * ownCloud Android client application
+ *
+ * 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,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+package com.owncloud.android.utils;
+
+import android.app.Activity;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.net.Uri;
+import android.os.AsyncTask;
+
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.ui.activity.FileActivity;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.lang.ref.WeakReference;
+
+/**
+ * AsyncTask to copy a file from a uri in a temporal file
+ */
+public class CopyTmpFileAsyncTask extends AsyncTask