Commit a62bca80 authored by wanglei's avatar wanglei

...

parent 4576272f
......@@ -55,7 +55,7 @@ class StayNotificationService : Service() {
fun Context.startStayNotification() {
val intent = Intent(this, StayNotificationService::class.java)
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.TIRAMISU) {
return
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
......@@ -68,9 +68,11 @@ 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
}
if (fileObserver == null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
fileObserver = FileObserverExample()
fileObserver?.startObserving()
......
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