From 2531c88f2c8a992aa0c40c9f96e88099dc94139e Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 20 Nov 2015 22:41:30 +0100 Subject: Implements FS#67: Introduce central logging class to use log prefix, new activity to show logcat output and button to copy contents --- .../xmpp/jingle/JingleInbandTransport.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleInbandTransport.java') diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleInbandTransport.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleInbandTransport.java index 94cce09f..db22f8c3 100644 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleInbandTransport.java +++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/jingle/JingleInbandTransport.java @@ -8,7 +8,7 @@ import java.security.NoSuchAlgorithmException; import java.util.Arrays; import android.util.Base64; -import android.util.Log; +import de.thedevstack.conversationsplus.utils.Logging; import de.thedevstack.conversationsplus.Config; import de.thedevstack.conversationsplus.entities.Account; @@ -96,13 +96,13 @@ public class JingleInbandTransport extends JingleTransport { file.createNewFile(); this.fileOutputStream = file.createOutputStream(); if (this.fileOutputStream == null) { - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": could not create output stream"); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": could not create output stream"); callback.onFileTransferAborted(); return; } this.remainingSize = this.fileSize = file.getExpectedSize(); } catch (final NoSuchAlgorithmException | IOException e) { - Log.d(Config.LOGTAG,account.getJid().toBareJid()+" "+e.getMessage()); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+" "+e.getMessage()); callback.onFileTransferAborted(); } } @@ -123,7 +123,7 @@ public class JingleInbandTransport extends JingleTransport { this.digest.reset(); fileInputStream = this.file.createInputStream(); if (fileInputStream == null) { - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": could no create input stream"); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": could no create input stream"); callback.onFileTransferAborted(); return; } @@ -132,7 +132,7 @@ public class JingleInbandTransport extends JingleTransport { } } catch (NoSuchAlgorithmException e) { callback.onFileTransferAborted(); - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); } } @@ -190,7 +190,7 @@ public class JingleInbandTransport extends JingleTransport { fileInputStream.close(); } } catch (IOException e) { - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); StreamUtil.close(fileInputStream); this.onFileTransmissionStatusChanged.onFileTransferAborted(); } @@ -214,7 +214,7 @@ public class JingleInbandTransport extends JingleTransport { connection.updateProgress((int) ((((double) (this.fileSize - this.remainingSize)) / this.fileSize) * 100)); } } catch (IOException e) { - Log.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); + Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": "+e.getMessage()); StreamUtil.close(fileOutputStream); this.onFileTransmissionStatusChanged.onFileTransferAborted(); } -- cgit v1.2.3