1
0
Fork 0

Log push crashes to CrashReporter

master
Jonathan Almeida 2020-03-03 11:43:39 -05:00 committed by Jonathan Almeida
parent 4bbf87d272
commit 4ccda4d495
2 changed files with 5 additions and 3 deletions

View File

@ -79,5 +79,5 @@ class Components(private val context: Context) {
val clipboardHandler by lazy { ClipboardHandler(context) }
val migrationStore by lazy { MigrationStore() }
val performance by lazy { PerformanceComponent() }
val push by lazy { Push(context) }
val push by lazy { Push(context, analytics.crashReporter) }
}

View File

@ -3,6 +3,7 @@ package org.mozilla.fenix.components
import android.content.Context
import mozilla.components.feature.push.AutoPushFeature
import mozilla.components.feature.push.PushConfig
import mozilla.components.lib.crash.CrashReporter
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.R
@ -10,13 +11,14 @@ import org.mozilla.fenix.R
* Component group for push services. These components use services that strongly depend on
* push messaging (e.g. WebPush, SendTab).
*/
class Push(context: Context) {
class Push(context: Context, crashReporter: CrashReporter) {
val feature by lazy {
pushConfig?.let { config ->
AutoPushFeature(
context = context,
service = pushService,
config = config
config = config,
crashReporter = crashReporter
)
}
}