added type of downloading map to taskName

This commit is contained in:
Chumva 2018-02-27 11:31:26 +02:00
parent 0d03a7d472
commit fdd75a211d
3 changed files with 6 additions and 5 deletions

View file

@ -127,4 +127,8 @@ public abstract class BasicProgressAsyncTask<Tag, Params, Progress, Result> exte
protected void setTag(Tag tag) {
this.tag = tag;
}
public Tag getTag() {
return tag;
}
}

View file

@ -264,7 +264,7 @@ public class DownloadFileHelper {
}
String taskName = ctx.getString(R.string.shared_string_downloading) + ": " +
//+ de.baseName /*+ " " + mb + " MB"*/;
FileNameTranslationHelper.getFileName(ctx, ctx.getRegions(), de.baseName);
FileNameTranslationHelper.getFileName(ctx, ctx.getRegions(), de.baseName) + " " + de.type.getString(ctx);
progress.startTask(taskName, len / 1024);
if (!de.zipStream) {

View file

@ -120,7 +120,7 @@ public class DownloadIndexesThread {
StringBuilder contentText = new StringBuilder();
List<IndexItem> ii = getCurrentDownloadingItems();
for (IndexItem i : ii) {
if (i == currentDownloadingItem) {
if (!isFinished && task.getTag() == i) {
continue;
}
if (contentText.length() > 0) {
@ -131,9 +131,6 @@ public class DownloadIndexesThread {
contentText.append(" ").append(i.getType().getString(app));
}
}
if (currentDownloadingItem != null) {
msg += " " + currentDownloadingItem.getType().getString(app);
}
bld.setContentTitle(msg).setSmallIcon(android.R.drawable.stat_sys_download)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentText(contentText.toString())