Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import android.app.NotificationManager
import android.content.Context
import android.os.Build
import androidx.core.app.NotificationCompat
import androidx.core.content.getSystemService
import androidx.work.Constraints
import androidx.work.ForegroundInfo
import androidx.work.NetworkType
Expand Down Expand Up @@ -60,10 +61,7 @@ private fun Context.syncWorkNotification(): Notification {
description = getString(R.string.sync_work_notification_channel_description)
}
// Register the channel with the system
val notificationManager: NotificationManager? =
getSystemService(Context.NOTIFICATION_SERVICE) as? NotificationManager

notificationManager?.createNotificationChannel(channel)
getSystemService<NotificationManager>()?.createNotificationChannel(channel)
}

return NotificationCompat.Builder(
Expand Down
Loading