Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24506960 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

fix: use Notification Utils to create the notification builder & to provide notification channel

parent 99cf9ac9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ import at.bitfire.davdroid.ReLoginWithOidcActivity
import at.bitfire.davdroid.log.Logger
import at.bitfire.davdroid.settings.AccountSettings
import at.bitfire.davdroid.syncadapter.AccountUtils
import at.bitfire.davdroid.ui.NotificationUtils
import at.bitfire.davdroid.ui.NotificationUtils.CHANNEL_GENERAL
import at.bitfire.davdroid.ui.NotificationUtils.NOTIFY_SWITCH_TO_OPENID
import at.bitfire.davdroid.ui.NotificationUtils.notifyIfPossible

@@ -60,7 +62,8 @@ class BootCompletedReceiver: BroadcastReceiver() {
        val notifText = context.getString(R.string.notification_switch_to_openId_text)
        val notifIntent = generateLogoutIntent(account.name, context)

        val notification = NotificationCompat.Builder(context, "your_channel_id")

        val notification = NotificationUtils.newBuilder(context, CHANNEL_GENERAL)
            .setContentTitle(notifTitle)
            .setContentText(notifText)
            .setSmallIcon(R.drawable.ic_info)