mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-05 17:17:45 +00:00
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)
|
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 {
|
|||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user