diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/worker/SyncMediaWorker.kt b/AnkiDroid/src/main/java/com/ichi2/anki/worker/SyncMediaWorker.kt index 67f51a2dc8c4..aed84dc14935 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/worker/SyncMediaWorker.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/worker/SyncMediaWorker.kt @@ -106,10 +106,13 @@ class SyncMediaWorker( } override suspend fun getForegroundInfo(): ForegroundInfo { + val title = applicationContext.getString(R.string.syncing_media) + val cancelTitle = applicationContext.getString(R.string.dialog_cancel) val notification = buildNotification { - setContentTitle(applicationContext.getString(R.string.syncing_media)) + setContentTitle(title) setOngoing(true) setProgress(0, 0, true) + addAction(R.drawable.close_icon, cancelTitle, cancelIntent) foregroundServiceBehavior = NotificationCompat.FOREGROUND_SERVICE_IMMEDIATE } return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {