summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/syndication
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2012-07-22 12:41:17 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2012-07-22 12:41:17 +0200
commitf0edc0558b19bd8185e84876a233d1930c5867f5 (patch)
tree4284284b2dae1ae6575812e4ac14dc473d91138a /src/de/danoeh/antennapod/syndication
parent581e8af135570ba4fc8b3fdbad536d59a9ce20d3 (diff)
downloadAntennaPod-f0edc0558b19bd8185e84876a233d1930c5867f5.zip
Added DEBUG logging condition0.8_RC3
Diffstat (limited to 'src/de/danoeh/antennapod/syndication')
-rw-r--r--src/de/danoeh/antennapod/syndication/handler/SyndHandler.java9
-rw-r--r--src/de/danoeh/antennapod/syndication/handler/TypeGetter.java9
2 files changed, 10 insertions, 8 deletions
diff --git a/src/de/danoeh/antennapod/syndication/handler/SyndHandler.java b/src/de/danoeh/antennapod/syndication/handler/SyndHandler.java
index 396f170c5..808b3f0f9 100644
--- a/src/de/danoeh/antennapod/syndication/handler/SyndHandler.java
+++ b/src/de/danoeh/antennapod/syndication/handler/SyndHandler.java
@@ -6,6 +6,7 @@ import org.xml.sax.helpers.DefaultHandler;
import android.util.Log;
+import de.danoeh.antennapod.BuildConfig;
import de.danoeh.antennapod.feed.Feed;
import de.danoeh.antennapod.syndication.namespace.Namespace;
import de.danoeh.antennapod.syndication.namespace.SyndElement;
@@ -82,17 +83,17 @@ public class SyndHandler extends DefaultHandler {
state.defaultNamespaces.push(new NSAtom());
} else if (prefix.equals(NSAtom.NSTAG)) {
state.namespaces.put(uri, new NSAtom());
- Log.d(TAG, "Recognized Atom namespace");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized Atom namespace");
}
} else if (uri.equals(NSContent.NSURI) && prefix.equals(NSContent.NSTAG)) {
state.namespaces.put(uri, new NSContent());
- Log.d(TAG, "Recognized Content namespace");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized Content namespace");
} else if (uri.equals(NSITunes.NSURI) && prefix.equals(NSITunes.NSTAG)) {
state.namespaces.put(uri, new NSITunes());
- Log.d(TAG, "Recognized ITunes namespace");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized ITunes namespace");
} else if (uri.equals(NSSimpleChapters.NSURI) && prefix.equals(NSSimpleChapters.NSTAG)) {
state.namespaces.put(uri, new NSSimpleChapters());
- Log.d(TAG, "Recognized SimpleChapters namespace");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized SimpleChapters namespace");
}
}
diff --git a/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java b/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java
index 7e346ca5c..4a706311e 100644
--- a/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java
+++ b/src/de/danoeh/antennapod/syndication/handler/TypeGetter.java
@@ -12,6 +12,7 @@ import org.xmlpull.v1.XmlPullParserFactory;
import android.util.Log;
+import de.danoeh.antennapod.BuildConfig;
import de.danoeh.antennapod.feed.Feed;
/** Gets the type of a specific feed by reading the root element. */
@@ -38,15 +39,15 @@ public class TypeGetter {
if (eventType == XmlPullParser.START_TAG) {
String tag = xpp.getName();
if (tag.equals(ATOM_ROOT)) {
- Log.d(TAG, "Recognized type Atom");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized type Atom");
return Type.ATOM;
} else if (tag.equals(RSS_ROOT)
&& (xpp.getAttributeValue(null, "version")
.equals("2.0"))) {
- Log.d(TAG, "Recognized type RSS 2.0");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Recognized type RSS 2.0");
return Type.RSS20;
} else {
- Log.d(TAG, "Type is invalid");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Type is invalid");
throw new UnsupportedFeedtypeException(Type.INVALID);
}
} else {
@@ -59,7 +60,7 @@ public class TypeGetter {
} catch (IOException e) {
e.printStackTrace();
}
- Log.d(TAG, "Type is invalid");
+ if (BuildConfig.DEBUG) Log.d(TAG, "Type is invalid");
throw new UnsupportedFeedtypeException(Type.INVALID);
}