Make progress notifications persist
This commit is contained in:
parent
2b502e9a0f
commit
e658f9297d
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user