From 3346d0d49e1d2844e07376158b9b250ee4d43c09 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 17 Jan 2022 17:43:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/service/WebService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/WebService.kt b/app/src/main/java/io/legado/app/service/WebService.kt index 676cba0bc..d1e1283e9 100644 --- a/app/src/main/java/io/legado/app/service/WebService.kt +++ b/app/src/main/java/io/legado/app/service/WebService.kt @@ -10,7 +10,6 @@ import io.legado.app.constant.AppConst import io.legado.app.constant.EventBus import io.legado.app.constant.IntentAction import io.legado.app.constant.PreferKey -import io.legado.app.ui.main.MainActivity import io.legado.app.utils.* import io.legado.app.web.HttpServer import io.legado.app.web.WebSocketServer @@ -61,6 +60,7 @@ class WebService : BaseService() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { when (intent?.action) { IntentAction.stop -> stopSelf() + "copyHostAddress" -> sendToClip(hostAddress) else -> upWebServer() } return super.onStartCommand(intent, flags, startId) @@ -114,7 +114,7 @@ class WebService : BaseService() { .setContentTitle(getString(R.string.web_service)) .setContentText(notificationContent) .setContentIntent( - activityPendingIntent("webService") + servicePendingIntent("copyHostAddress") ) builder.addAction( R.drawable.ic_stop_black_24dp,