Commit e658f929 authored by topjohnwu's avatar topjohnwu

Make progress notifications persist

parent 2b502e9a
...@@ -107,7 +107,8 @@ public class Notifications { ...@@ -107,7 +107,8 @@ public class Notifications {
builder.setPriority(NotificationCompat.PRIORITY_LOW) builder.setPriority(NotificationCompat.PRIORITY_LOW)
.setSmallIcon(android.R.drawable.stat_sys_download) .setSmallIcon(android.R.drawable.stat_sys_download)
.setContentTitle(title) .setContentTitle(title)
.setProgress(0, 0, true); .setProgress(0, 0, true)
.setOngoing(true);
return builder; return builder;
} }
} }
...@@ -50,14 +50,16 @@ public class ProgressNotification implements DownloadProgressListener { ...@@ -50,14 +50,16 @@ public class ProgressNotification implements DownloadProgressListener {
public void dlDone() { public void dlDone() {
builder.setProgress(0, 0, false) builder.setProgress(0, 0, false)
.setContentText(Data.MM().getString(R.string.download_complete)) .setContentText(Data.MM().getString(R.string.download_complete))
.setSmallIcon(R.drawable.ic_check_circle); .setSmallIcon(R.drawable.ic_check_circle)
.setOngoing(false);
update(); update();
} }
public void dlFail() { public void dlFail() {
builder.setProgress(0, 0, false) builder.setProgress(0, 0, false)
.setContentText(Data.MM().getString(R.string.download_file_error)) .setContentText(Data.MM().getString(R.string.download_file_error))
.setSmallIcon(R.drawable.ic_cancel); .setSmallIcon(R.drawable.ic_cancel)
.setOngoing(false);
update(); 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