diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-06-25 12:56:01 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-06-25 12:56:01 +0200 |
commit | a974358f262749eb58060aed13e3068811ea12ed (patch) | |
tree | fb343ba695fb1dfa4bdc53ea0a67a491b1091d07 /src/de/podfetcher | |
parent | 703972e3c0c1d43a9a5e5224fa2ef33fd9f5a12d (diff) | |
download | AntennaPod-a974358f262749eb58060aed13e3068811ea12ed.zip |
Improved feedparser performance
Diffstat (limited to 'src/de/podfetcher')
-rw-r--r-- | src/de/podfetcher/activity/ItemviewActivity.java | 4 | ||||
-rw-r--r-- | src/de/podfetcher/service/DownloadService.java | 2 | ||||
-rw-r--r-- | src/de/podfetcher/syndication/namespace/content/NSContent.java | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/de/podfetcher/activity/ItemviewActivity.java b/src/de/podfetcher/activity/ItemviewActivity.java index 472623ee8..f6ebe6102 100644 --- a/src/de/podfetcher/activity/ItemviewActivity.java +++ b/src/de/podfetcher/activity/ItemviewActivity.java @@ -4,6 +4,8 @@ import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.text.DateFormat; +import org.apache.commons.lang3.StringEscapeUtils; + import android.content.Intent; import android.os.Bundle; import android.text.format.DateUtils; @@ -91,7 +93,7 @@ public class ItemviewActivity extends SherlockActivity { url = URLEncoder.encode(item.getDescription(), "utf-8") .replaceAll("\\+", " "); } else { - url = URLEncoder.encode(item.getContentEncoded(), "utf-8") + url = URLEncoder.encode(StringEscapeUtils.unescapeHtml4(item.getContentEncoded()), "utf-8") .replaceAll("\\+", " "); } diff --git a/src/de/podfetcher/service/DownloadService.java b/src/de/podfetcher/service/DownloadService.java index c453c03d3..8e3b4f73c 100644 --- a/src/de/podfetcher/service/DownloadService.java +++ b/src/de/podfetcher/service/DownloadService.java @@ -35,6 +35,7 @@ import android.graphics.BitmapFactory; import android.support.v4.app.NotificationCompat; import android.util.Log; import android.os.Binder; +import android.os.Debug; import android.os.Handler; import android.os.Message; import android.os.Messenger; @@ -270,7 +271,6 @@ public class DownloadService extends Service { public void run() { long imageId = 0; boolean hasImage = false; - FeedManager manager = FeedManager.getInstance(); FeedHandler handler = new FeedHandler(); feed.setDownloaded(true); diff --git a/src/de/podfetcher/syndication/namespace/content/NSContent.java b/src/de/podfetcher/syndication/namespace/content/NSContent.java index d5dba9101..8dcfc208a 100644 --- a/src/de/podfetcher/syndication/namespace/content/NSContent.java +++ b/src/de/podfetcher/syndication/namespace/content/NSContent.java @@ -29,7 +29,7 @@ public class NSContent extends Namespace { @Override public void handleElementEnd(String localName, HandlerState state) { if (localName.equals(ENCODED)) { - state.getCurrentItem().setContentEncoded(StringEscapeUtils.unescapeHtml4(state.getContentBuf().toString())); + state.getCurrentItem().setContentEncoded(state.getContentBuf().toString()); } } |