aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2015-11-20 22:41:30 +0100
committersteckbrief <steckbrief@chefmail.de>2015-11-20 22:41:30 +0100
commit2531c88f2c8a992aa0c40c9f96e88099dc94139e (patch)
treee3815b7f1ef0bbd227df8c4452d4aa52b54830e4 /src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
parent8838a5094812e0540ccfef3334e49e1a5c1a564b (diff)
Implements FS#67: Introduce central logging class to use log prefix, new activity to show logcat output and button to copy contents
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
index 7ee67a15..5cc63065 100644
--- a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
+++ b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java
@@ -16,7 +16,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Environment;
-import android.util.Log;
+import de.thedevstack.conversationsplus.utils.Logging;
import android.webkit.MimeTypeMap;
import de.thedevstack.conversationsplus.Config;
@@ -82,7 +82,7 @@ public final class FileBackend {
}
public static DownloadableFile copyFileToPrivateStorage(Message message, Uri uri) throws FileCopyException {
- Log.d(Config.LOGTAG, "copy " + uri.toString() + " to private storage");
+ Logging.d(Config.LOGTAG, "copy " + uri.toString() + " to private storage");
String mime = ConversationsPlusApplication.getInstance().getContentResolver().getType(uri);
String extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(mime);
message.setRelativeFilePath(message.getUuid() + "." + extension);
@@ -109,7 +109,7 @@ public final class FileBackend {
StreamUtil.close(os);
StreamUtil.close(is);
}
- Log.d(Config.LOGTAG, "output file name " + file);
+ Logging.d(Config.LOGTAG, "output file name " + file);
return file;
}
@@ -132,7 +132,7 @@ public final class FileBackend {
Bitmap originalBitmap;
BitmapFactory.Options options = new BitmapFactory.Options();
int inSampleSize = (int) Math.pow(2, sampleSize);
- Log.d(Config.LOGTAG, "reading bitmap with sample size " + inSampleSize);
+ Logging.d(Config.LOGTAG, "reading bitmap with sample size " + inSampleSize);
options.inSampleSize = inSampleSize;
originalBitmap = BitmapFactory.decodeStream(is, null, options);
is.close();