Commit a5c930a7 authored by wanglei's avatar wanglei

...

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