gedoor 4 年之前
父節點
當前提交
5a2234258c
共有 1 個文件被更改,包括 8 次插入 和 5 次删除
  1. 8 5
      app/src/main/java/io/legado/app/service/WebService.kt

+ 8 - 5
app/src/main/java/io/legado/app/service/WebService.kt

@@ -128,13 +128,16 @@ class WebService : BaseService() {
 
 
     private fun upTile(active: Boolean) {
     private fun upTile(active: Boolean) {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
-            startService<WebTileService> {
-                action = if (active) {
-                    IntentAction.start
-                } else {
-                    IntentAction.stop
+            kotlin.runCatching {
+                startService<WebTileService> {
+                    action = if (active) {
+                        IntentAction.start
+                    } else {
+                        IntentAction.stop
+                    }
                 }
                 }
             }
             }
+
         }
         }
     }
     }
 }
 }