Commit a5c930a7 authored by wanglei's avatar wanglei

...

parent a62bca80
......@@ -57,7 +57,6 @@ class StayNotificationService : Service() {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU) {
return
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(intent)
} else {
......@@ -69,7 +68,7 @@ class StayNotificationService : Service() {
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU) {
return START_STICKY
return START_NOT_STICKY
}
if (fileObserver == null) {
......@@ -88,7 +87,7 @@ class StayNotificationService : Service() {
isRunning = true
}
return START_STICKY
return START_NOT_STICKY
}
private var mediaContentObserver: MediaContentObserver? = null
......
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