按审查报告修复 M1-M4 与 L1-L8;版本 0.7(versionCode 23)

This commit is contained in:
XIGE
2026-11-28 21:21:36 +08:00
parent 3ad599add7
commit 4afe99cb09
14 changed files with 129 additions and 59 deletions

View File

@@ -49,7 +49,7 @@ object Notif {
// 提醒通道交给我们自己播放声音与振动,这里保持静默,避免"响两遍"。
val alert = NotificationChannel(
CHANNEL_ALERT,
"计时结束提醒",
context.getString(R.string.notif_channel_alert),
NotificationManager.IMPORTANCE_HIGH,
).apply {
enableVibration(false)
@@ -130,11 +130,13 @@ object Notif {
b.setCustomContentView(rv)
b.setCustomBigContentView(rv)
// 模板动作保留作兜底(自定义布局生效时系统不会重复绘制这两颗按钮)
// 模板动作保留作兜底(自定义布局生效时系统不会重复绘制这两颗按钮)。
// 文字必须有:屏幕朗读器读兜底动作时靠它提供语义。
if (TimerCore.mode == TimerCore.MODE_FOCUS) {
b.addAction(
NotificationCompat.Action(
if (running) R.drawable.ic_pause else R.drawable.ic_play, "",
if (running) R.drawable.ic_pause else R.drawable.ic_play,
context.getString(if (running) R.string.notif_action_pause else R.string.notif_action_resume),
serviceAction(
context,
if (running) TimerService.ACTION_PAUSE else TimerService.ACTION_RESUME,
@@ -145,7 +147,8 @@ object Notif {
}
b.addAction(
NotificationCompat.Action(
R.drawable.ic_stop, "",
R.drawable.ic_stop,
context.getString(R.string.notif_action_stop),
serviceAction(context, TimerService.ACTION_STOP, 23),
)
)