Log push crashes to CrashReporter
parent
4bbf87d272
commit
4ccda4d495
|
@ -79,5 +79,5 @@ class Components(private val context: Context) {
|
||||||
val clipboardHandler by lazy { ClipboardHandler(context) }
|
val clipboardHandler by lazy { ClipboardHandler(context) }
|
||||||
val migrationStore by lazy { MigrationStore() }
|
val migrationStore by lazy { MigrationStore() }
|
||||||
val performance by lazy { PerformanceComponent() }
|
val performance by lazy { PerformanceComponent() }
|
||||||
val push by lazy { Push(context) }
|
val push by lazy { Push(context, analytics.crashReporter) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.mozilla.fenix.components
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import mozilla.components.feature.push.AutoPushFeature
|
import mozilla.components.feature.push.AutoPushFeature
|
||||||
import mozilla.components.feature.push.PushConfig
|
import mozilla.components.feature.push.PushConfig
|
||||||
|
import mozilla.components.lib.crash.CrashReporter
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
import org.mozilla.fenix.R
|
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
|
* Component group for push services. These components use services that strongly depend on
|
||||||
* push messaging (e.g. WebPush, SendTab).
|
* push messaging (e.g. WebPush, SendTab).
|
||||||
*/
|
*/
|
||||||
class Push(context: Context) {
|
class Push(context: Context, crashReporter: CrashReporter) {
|
||||||
val feature by lazy {
|
val feature by lazy {
|
||||||
pushConfig?.let { config ->
|
pushConfig?.let { config ->
|
||||||
AutoPushFeature(
|
AutoPushFeature(
|
||||||
context = context,
|
context = context,
|
||||||
service = pushService,
|
service = pushService,
|
||||||
config = config
|
config = config,
|
||||||
|
crashReporter = crashReporter
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue