mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
Fix notification wake screen on
This commit is contained in:
@@ -568,6 +568,7 @@ class AudioPlayService : BaseService(),
|
||||
.setSmallIcon(R.drawable.ic_volume_up)
|
||||
.setSubText(getString(R.string.audio))
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentTitle(nTitle)
|
||||
.setContentText(nSubtitle)
|
||||
.setContentIntent(
|
||||
|
||||
@@ -551,6 +551,7 @@ abstract class BaseReadAloudService : BaseService(),
|
||||
.setSmallIcon(R.drawable.ic_volume_up)
|
||||
.setSubText(getString(R.string.read_aloud))
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentTitle(nTitle)
|
||||
.setContentText(nSubtitle)
|
||||
.setContentIntent(
|
||||
|
||||
@@ -51,6 +51,7 @@ class CacheBookService : BaseService() {
|
||||
val builder = NotificationCompat.Builder(this, AppConst.channelIdDownload)
|
||||
.setSmallIcon(R.drawable.ic_download)
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentTitle(getString(R.string.offline_cache))
|
||||
.setContentIntent(activityPendingIntent<CacheActivity>("cacheActivity"))
|
||||
builder.addAction(
|
||||
|
||||
@@ -63,6 +63,7 @@ class CheckSourceService : BaseService() {
|
||||
NotificationCompat.Builder(this, AppConst.channelIdReadAloud)
|
||||
.setSmallIcon(R.drawable.ic_network_check)
|
||||
.setOngoing(true)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentTitle(getString(R.string.check_book_source))
|
||||
.setContentIntent(
|
||||
activityPendingIntent<BookSourceActivity>("activity")
|
||||
|
||||
@@ -249,6 +249,7 @@ class DownloadService : BaseService() {
|
||||
.setSmallIcon(R.drawable.ic_download)
|
||||
.setSubText(getString(R.string.action_download))
|
||||
.setContentTitle(content)
|
||||
.setOnlyAlertOnce(true)
|
||||
.setContentIntent(
|
||||
servicePendingIntent<DownloadService>(IntentAction.play, downloadId.toInt()) {
|
||||
putExtra("downloadId", downloadId)
|
||||
|
||||
@@ -160,6 +160,7 @@ class ExportBookService : BaseService() {
|
||||
.setContentText(notificationContentText)
|
||||
.setDeleteIntent(servicePendingIntent<ExportBookService>(IntentAction.stop))
|
||||
.setGroup(groupKey)
|
||||
.setOnlyAlertOnce(true)
|
||||
if (!finish) {
|
||||
notification.setOngoing(true)
|
||||
notification.addAction(
|
||||
|
||||
Reference in New Issue
Block a user