diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index a5be114ab4..71ace54edc 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -48,8 +48,7 @@ import org.mozilla.fenix.test.Mockable class BackgroundServices( context: Context, historyStorage: PlacesHistoryStorage, - bookmarkStorage: PlacesBookmarksStorage, - notificationManager: NotificationManager + bookmarkStorage: PlacesBookmarksStorage ) { companion object { const val CLIENT_ID = "a2270f727f45f648" @@ -234,4 +233,11 @@ class BackgroundServices( } CoroutineScope(Dispatchers.Main).launch { it.initAsync().await() } } + + /** + * Provides notification functionality, manages notification channels. + */ + val notificationManager by lazy { + NotificationManager(context) + } } diff --git a/app/src/main/java/org/mozilla/fenix/components/Components.kt b/app/src/main/java/org/mozilla/fenix/components/Components.kt index 50903114a4..bf90533f1c 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Components.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Components.kt @@ -13,7 +13,7 @@ import org.mozilla.fenix.test.Mockable @Mockable class Components(private val context: Context) { val backgroundServices by lazy { - BackgroundServices(context, core.historyStorage, core.bookmarksStorage, utils.notificationManager) + BackgroundServices(context, core.historyStorage, core.bookmarksStorage) } val services by lazy { Services(backgroundServices.accountManager) } val core by lazy { Core(context) } diff --git a/app/src/main/java/org/mozilla/fenix/components/Utilities.kt b/app/src/main/java/org/mozilla/fenix/components/Utilities.kt index 357527a35e..c95f6c6a6a 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Utilities.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Utilities.kt @@ -39,12 +39,5 @@ class Utilities( CustomTabIntentProcessor(sessionManager, sessionUseCases.loadUrl, context.resources) } - /** - * Provides notification functionality, manages notification channels. - */ - val notificationManager by lazy { - NotificationManager(context) - } - val publicSuffixList by lazy { PublicSuffixList(context) } }