mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
Bug 1796348 - Add notification delegate as a component in apps.
This adds notification delegate as a component in Fenix, Focus and Sample Browser.
This commit is contained in:
parent
105c1cdd7c
commit
093e70faad
@ -9,6 +9,7 @@ import android.app.Application
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.core.app.NotificationManagerCompat
|
||||||
import com.google.android.play.core.review.ReviewManagerFactory
|
import com.google.android.play.core.review.ReviewManagerFactory
|
||||||
import mozilla.components.feature.addons.AddonManager
|
import mozilla.components.feature.addons.AddonManager
|
||||||
import mozilla.components.feature.addons.amo.AddonCollectionProvider
|
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.addons.update.DefaultAddonUpdater
|
||||||
import mozilla.components.feature.autofill.AutofillConfiguration
|
import mozilla.components.feature.autofill.AutofillConfiguration
|
||||||
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
import mozilla.components.lib.publicsuffixlist.PublicSuffixList
|
||||||
|
import mozilla.components.support.base.android.NotificationsDelegate
|
||||||
import mozilla.components.support.base.worker.Frequency
|
import mozilla.components.support.base.worker.Frequency
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.Config
|
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 {
|
val intentProcessors by lazyMonitored {
|
||||||
IntentProcessors(
|
IntentProcessors(
|
||||||
context,
|
context,
|
||||||
|
Loading…
Reference in New Issue
Block a user