Commit e658f929 authored by topjohnwu's avatar topjohnwu

Make progress notifications persist

parent 2b502e9a
......@@ -107,7 +107,8 @@ public class Notifications {
builder.setPriority(NotificationCompat.PRIORITY_LOW)
.setSmallIcon(android.R.drawable.stat_sys_download)
.setContentTitle(title)
.setProgress(0, 0, true);
.setProgress(0, 0, true)
.setOngoing(true);
return builder;
}
}
......@@ -50,14 +50,16 @@ public class ProgressNotification implements DownloadProgressListener {
public void dlDone() {
builder.setProgress(0, 0, false)
.setContentText(Data.MM().getString(R.string.download_complete))
.setSmallIcon(R.drawable.ic_check_circle);
.setSmallIcon(R.drawable.ic_check_circle)
.setOngoing(false);
update();
}
public void dlFail() {
builder.setProgress(0, 0, false)
.setContentText(Data.MM().getString(R.string.download_file_error))
.setSmallIcon(R.drawable.ic_cancel);
.setSmallIcon(R.drawable.ic_cancel)
.setOngoing(false);
update();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment