From 0f455acc978140424bcaf7b6670b65074d343635 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Dec 2019 16:26:47 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/service/DownloadService.kt | 2 +- app/src/main/java/io/legado/app/service/help/Download.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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)