mirror of
https://github.com/kvorschk/Magisk.git
synced 2026-12-04 19:10:47 -05:00
app: fix suNotification setTimeoutAfter behind API 26 (#10241)
This commit is contained in:
@@ -118,6 +118,7 @@ object Notifications {
|
||||
val builder = if (SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Notification.Builder(this, SU_CHANNEL)
|
||||
.setSmallIcon(getBitmap(R.drawable.ic_magisk_outline).toIcon())
|
||||
.setTimeoutAfter(SU_NOTIFICATION_TIMEOUT_MS)
|
||||
} else {
|
||||
Notification.Builder(this).setPriority(Notification.PRIORITY_HIGH)
|
||||
.setSmallIcon(R.drawable.ic_magisk_outline)
|
||||
@@ -126,7 +127,6 @@ object Notifications {
|
||||
.setContentTitle(title)
|
||||
.setContentText(text)
|
||||
.setAutoCancel(true)
|
||||
.setTimeoutAfter(SU_NOTIFICATION_TIMEOUT_MS)
|
||||
mgr.notify(nextId(), builder.build())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user