diff --git a/app/android/src/main/kotlin/AniApplication.kt b/app/android/src/main/kotlin/AniApplication.kt index 29758870ec..6c2def84fc 100644 --- a/app/android/src/main/kotlin/AniApplication.kt +++ b/app/android/src/main/kotlin/AniApplication.kt @@ -175,10 +175,10 @@ class AniApplication : Application() { return startForegroundService( Intent(this, AniTorrentService::class.java).apply { putExtra("app_name", me.him188.ani.R.string.app_name) - putExtra("app_service_title_text_idle", me.him188.ani.R.string.app_service_content_text) - putExtra("app_service_title_text_working", me.him188.ani.R.string.app_service_content_text) + putExtra("app_service_title_text_idle", me.him188.ani.R.string.app_service_title_text_idle) + putExtra("app_service_title_text_working", me.him188.ani.R.string.app_service_title_text_working) putExtra("app_service_content_text", me.him188.ani.R.string.app_service_content_text) - putExtra("app_service_stop_text", me.him188.ani.R.string.app_service_content_text) + putExtra("app_service_stop_text", me.him188.ani.R.string.app_service_stop_text) putExtra("app_icon", me.him188.ani.R.mipmap.a_round) putExtra("open_activity_intent", Intent(this@AniApplication, MainActivity::class.java)) }, diff --git a/app/shared/app-data/src/androidMain/kotlin/domain/torrent/service/ServiceNotification.kt b/app/shared/app-data/src/androidMain/kotlin/domain/torrent/service/ServiceNotification.kt index f918fa4ab7..f3c17835f0 100644 --- a/app/shared/app-data/src/androidMain/kotlin/domain/torrent/service/ServiceNotification.kt +++ b/app/shared/app-data/src/androidMain/kotlin/domain/torrent/service/ServiceNotification.kt @@ -49,13 +49,14 @@ class ServiceNotification( .also { notificationService.createNotificationChannel(it) } } - fun parseNotificationStrategyFromIntent(intent: Intent?): NotificationAppearance { + fun parseNotificationStrategyFromIntent(intent: Intent?) { val name = intent.getStringOrDefault("app_name") { defaultNotificationAppearance.name } - val titleIdle = intent.getStringOrDefault("app_service_title_text_idle") { + // TODO + val titleIdle = "BT 下载服务正在运行"/*intent.getStringOrDefault("app_service_title_text_idle") { defaultNotificationAppearance.titleIdle - } + }*/ val titleWorking = intent.getStringOrDefault("app_service_title_text_working") { defaultNotificationAppearance.titleWorking } @@ -74,7 +75,7 @@ class ServiceNotification( intent?.getParcelableExtra("open_activity_intent") } - return NotificationAppearance( + notificationAppearance = NotificationAppearance( name = name, titleIdle = titleIdle, titleWorking = titleWorking, @@ -164,7 +165,7 @@ class ServiceNotification( private val defaultNotificationAppearance = NotificationAppearance( name = "Animeko BT 引擎服务", - titleIdle = "没有下载任务", + titleIdle = "BT 下载服务正在运行", titleWorking = "正在下载 %1\$d 个资源", content = "下载:%1\$s,上传:%2\$s", stopActionText = "停止",