From 12077c6dad2955729d35b0e97a6c530a79fd1215 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Fri, 29 Aug 2014 16:29:36 -0500 Subject: [PATCH] enable more verbose PDU parse logging // FREEBIE --- src/org/thoughtcrime/securesms/mms/MmsDownloadHelper.java | 4 +++- src/ws/com/google/android/mms/pdu/PduParser.java | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/mms/MmsDownloadHelper.java b/src/org/thoughtcrime/securesms/mms/MmsDownloadHelper.java index dbcdc0eb5e..ba3b80781d 100644 --- a/src/org/thoughtcrime/securesms/mms/MmsDownloadHelper.java +++ b/src/org/thoughtcrime/securesms/mms/MmsDownloadHelper.java @@ -22,6 +22,7 @@ import android.util.Log; import java.io.IOException; import java.net.HttpURLConnection; +import java.util.Arrays; import ws.com.google.android.mms.pdu.PduParser; import ws.com.google.android.mms.pdu.RetrieveConf; @@ -88,7 +89,7 @@ public class MmsDownloadHelper extends MmsCommunication { if (pdu != null) break; } catch (IOException ioe) { - Log.w("MmsDownloadHelper", ioe); + Log.w(TAG, ioe); } } @@ -99,6 +100,7 @@ public class MmsDownloadHelper extends MmsCommunication { RetrieveConf retrieved = (RetrieveConf)new PduParser(pdu).parse(); if (retrieved == null) { + Log.w(TAG, "Couldn't parse PDU, raw server response: " + Arrays.toString(pdu)); throw new IOException("Bad retrieved PDU"); } diff --git a/src/ws/com/google/android/mms/pdu/PduParser.java b/src/ws/com/google/android/mms/pdu/PduParser.java index ede021aabb..f95e4a0ad1 100644 --- a/src/ws/com/google/android/mms/pdu/PduParser.java +++ b/src/ws/com/google/android/mms/pdu/PduParser.java @@ -83,8 +83,7 @@ public class PduParser { * The log tag. */ private static final String LOG_TAG = "PduParser"; - private static final boolean DEBUG = false; - private static final boolean LOCAL_LOGV = false; + private static final boolean LOCAL_LOGV = true; /** * Constructor.