mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 02:56:01 +00:00
fix: set NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE to avoid delays
This commit is contained in:
@@ -48,6 +48,7 @@ class LockTaskService: Service() {
|
||||
.setSmallIcon(R.drawable.lock_fill0)
|
||||
.addAction(NotificationCompat.Action.Builder(null, getString(R.string.stop), pendingIntent).build())
|
||||
.setOngoing(true)
|
||||
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE)
|
||||
.build()
|
||||
ServiceCompat.startForeground(
|
||||
this, NotificationType.LockTaskMode.id, notification,
|
||||
|
||||
Reference in New Issue
Block a user