fixed nullPointerException and removed current downloading text from contentText
This commit is contained in:
parent
05b48e899d
commit
f29ace4544
1 changed files with 12 additions and 4 deletions
|
@ -123,10 +123,18 @@ public class DownloadIndexesThread {
|
||||||
if (contentText.length() > 0) {
|
if (contentText.length() > 0) {
|
||||||
contentText.append(", ");
|
contentText.append(", ");
|
||||||
}
|
}
|
||||||
|
if (i == currentDownloadingItem) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
contentText.append(i.getVisibleName(app, app.getRegions()));
|
contentText.append(i.getVisibleName(app, app.getRegions()));
|
||||||
|
if (i.getType() != null) {
|
||||||
contentText.append(" ").append(i.getType().getString(app));
|
contentText.append(" ").append(i.getType().getString(app));
|
||||||
}
|
}
|
||||||
bld.setContentTitle(msg+" "+currentDownloadingItem.getType().getString(app)).setSmallIcon(android.R.drawable.stat_sys_download)
|
}
|
||||||
|
if (currentDownloadingItem != null) {
|
||||||
|
msg += " " + currentDownloadingItem.getType().getString(app);
|
||||||
|
}
|
||||||
|
bld.setContentTitle(msg).setSmallIcon(android.R.drawable.stat_sys_download)
|
||||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
||||||
.setContentText(contentText.toString())
|
.setContentText(contentText.toString())
|
||||||
.setContentIntent(contentPendingIntent).setOngoing(true);
|
.setContentIntent(contentPendingIntent).setOngoing(true);
|
||||||
|
|
Loading…
Reference in a new issue