Bug 1796348 - Add notification delegate as a component in apps.

This adds notification delegate as a component in Fenix, Focus and Sample Browser.
fenix/113.0
mcarare 1 year ago committed by Ryan VanderMeulen
parent 105c1cdd7c
commit 093e70faad

@ -9,6 +9,7 @@ import android.app.Application
import android.content.Context
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import androidx.core.app.NotificationManagerCompat
import com.google.android.play.core.review.ReviewManagerFactory
import mozilla.components.feature.addons.AddonManager
import mozilla.components.feature.addons.amo.AddonCollectionProvider
@ -16,6 +17,7 @@ import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
import mozilla.components.feature.addons.update.DefaultAddonUpdater
import mozilla.components.feature.autofill.AutofillConfiguration
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
import mozilla.components.support.base.android.NotificationsDelegate
import mozilla.components.support.base.worker.Frequency
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config
@ -88,6 +90,14 @@ class Components(private val context: Context) {
)
}
private val notificationManagerCompat = NotificationManagerCompat.from(context)
val notificationsDelegate: NotificationsDelegate by lazyMonitored {
NotificationsDelegate(
notificationManagerCompat,
)
}
val intentProcessors by lazyMonitored {
IntentProcessors(
context,

Loading…
Cancel
Save