mirror of
https://github.com/gedoor/legado.git
synced 2024-07-04 23:36:56 +08:00
优化
This commit is contained in:
parent
17d187b4af
commit
d774b2df7c
|
@ -496,6 +496,8 @@ abstract class BaseReadAloudService : BaseService(),
|
||||||
nSubtitle = getString(R.string.read_aloud_s)
|
nSubtitle = getString(R.string.read_aloud_s)
|
||||||
val builder = NotificationCompat
|
val builder = NotificationCompat
|
||||||
.Builder(this@BaseReadAloudService, AppConst.channelIdReadAloud)
|
.Builder(this@BaseReadAloudService, AppConst.channelIdReadAloud)
|
||||||
|
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
||||||
|
.setForegroundServiceBehavior(NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE)
|
||||||
.setSmallIcon(R.drawable.ic_volume_up)
|
.setSmallIcon(R.drawable.ic_volume_up)
|
||||||
.setSubText(getString(R.string.read_aloud))
|
.setSubText(getString(R.string.read_aloud))
|
||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
|
@ -535,7 +537,7 @@ abstract class BaseReadAloudService : BaseService(),
|
||||||
androidx.media.app.NotificationCompat.MediaStyle()
|
androidx.media.app.NotificationCompat.MediaStyle()
|
||||||
.setShowActionsInCompactView(0, 1, 2)
|
.setShowActionsInCompactView(0, 1, 2)
|
||||||
)
|
)
|
||||||
return builder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
|
return builder
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user