diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index 92bf18a4b..142a66c3d 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -79,7 +79,7 @@ class DownloadService : BaseService() { builder.addAction( R.drawable.ic_stop_black_24dp, getString(R.string.cancel), - IntentHelp.servicePendingIntent(this, Action.stop) + IntentHelp.servicePendingIntent(this, Action.stop) ) builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC) val notification = builder.build() diff --git a/app/src/main/java/io/legado/app/service/help/Download.kt b/app/src/main/java/io/legado/app/service/help/Download.kt index b439e4c82..1c17a7ee1 100644 --- a/app/src/main/java/io/legado/app/service/help/Download.kt +++ b/app/src/main/java/io/legado/app/service/help/Download.kt @@ -2,12 +2,14 @@ package io.legado.app.service.help import android.content.Context import android.content.Intent +import io.legado.app.constant.Action import io.legado.app.service.DownloadService object Download { fun start(context: Context, bookUrl: String, start: Int, end: Int) { Intent(context, DownloadService::class.java).let { + it.action = Action.start it.putExtra("bookUrl", bookUrl) it.putExtra("start", start) it.putExtra("end", end)