summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-02-10 21:16:45 +0100
committerdaniel oeh <daniel.oeh@gmail.com>2013-02-10 21:16:45 +0100
commitf18286218272d60843307a29a332c6889d591caa (patch)
treef0987ac5241e1ae25ccda0ecb87bf933537dba10 /src
parentcfb7c156462ae4186bc49febf9902accc4a2ae81 (diff)
downloadAntennaPod-f18286218272d60843307a29a332c6889d591caa.zip
Don't show notification entry if title is null
Diffstat (limited to 'src')
-rw-r--r--src/de/danoeh/antennapod/service/download/DownloadService.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/de/danoeh/antennapod/service/download/DownloadService.java b/src/de/danoeh/antennapod/service/download/DownloadService.java
index ad0bb534a..278736db8 100644
--- a/src/de/danoeh/antennapod/service/download/DownloadService.java
+++ b/src/de/danoeh/antennapod/service/download/DownloadService.java
@@ -263,22 +263,26 @@ public class DownloadService extends Service {
StringBuilder bigText = null;
for (Downloader downloader : downloads) {
- if (bigText == null) {
- bigText = new StringBuilder();
- } else {
- bigText.append("\n");
- }
if (downloader.getStatus() != null) {
+ if (bigText == null) {
+ bigText = new StringBuilder("");
+ }
FeedFile f = downloader.getStatus().getFeedFile();
if (f.getClass() == Feed.class) {
- bigText.append("\u2022 " + ((Feed) f).getTitle());
+ Feed feed = (Feed) f;
+ if (feed.getTitle() != null) {
+ bigText.append("\u2022 " + feed.getTitle()
+ + "\n");
+ }
} else if (f.getClass() == FeedMedia.class) {
FeedMedia media = (FeedMedia) f;
- bigText.append("\u2022 "
- + media.getItem().getTitle()
- + " ("
- + downloader.getStatus()
- .getProgressPercent() + "%)");
+ if (media.getItem().getTitle() != null) {
+ bigText.append("\u2022 "
+ + media.getItem().getTitle()
+ + " ("
+ + downloader.getStatus()
+ .getProgressPercent() + "%)\n");
+ }
}
}
}