Skip to content

Commit

Permalink
For mozilla-mobile#3074 - Add name to fatal crash dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
boek committed Nov 8, 2018
1 parent 7a384ab commit 836bd4e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import mozilla.components.lib.crash.CrashReporter
import mozilla.components.lib.crash.service.MozillaSocorroService
import mozilla.components.lib.crash.service.SentryService
import org.mozilla.focus.BuildConfig
import org.mozilla.focus.R
import org.mozilla.focus.activity.MainActivity
import org.mozilla.focus.locale.LocaleManager
import java.util.Locale
Expand Down Expand Up @@ -59,14 +60,17 @@ object CrashReporterWrapper {
sendEventForNativeCrashes = true),
MozillaSocorroService(context, "Firefox Focus")
),
promptConfiguration = CrashReporter.PromptConfiguration(
appName = context.resources.getString(R.string.app_name)
),
shouldPrompt = CrashReporter.Prompt.ALWAYS,
nonFatalCrashIntent = pendingIntent).install(context)

onIsEnabledChanged(context)
}

fun onIsEnabledChanged(context: Context, isEnabled: Boolean = TelemetryWrapper.isTelemetryEnabled(context)) {
crashReporter?.enabled = isEnabled
crashReporter?.enabled = isEnabled || true
}

fun submitCrash(crash: Crash) {
Expand Down

0 comments on commit 836bd4e

Please sign in to comment.