forked from github/wulkanowy-mirror
Fix change of worker specs after app update (#402)
This commit is contained in:

committed by
Mikołaj Pich

parent
75122d0dcd
commit
7485cb2a39
@ -4,9 +4,21 @@ import android.content.Context
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.crashlytics.android.core.CrashlyticsCore
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import io.github.wulkanowy.BuildConfig
|
||||
import timber.log.Timber
|
||||
|
||||
fun initCrashlytics(context: Context, appInfo: AppInfo) {
|
||||
Fabric.with(Fabric.Builder(context)
|
||||
.kits(
|
||||
Crashlytics.Builder()
|
||||
.core(CrashlyticsCore.Builder()
|
||||
.disabled(!appInfo.isCrashlyticsEnabled)
|
||||
.build())
|
||||
.build()
|
||||
)
|
||||
.debuggable(appInfo.isDebug)
|
||||
.build())
|
||||
}
|
||||
|
||||
class CrashlyticsTree : Timber.Tree() {
|
||||
|
||||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
|
||||
@ -17,9 +29,3 @@ class CrashlyticsTree : Timber.Tree() {
|
||||
else Crashlytics.logException(t)
|
||||
}
|
||||
}
|
||||
|
||||
fun initCrashlytics(context: Context) {
|
||||
Fabric.with(Fabric.Builder(context).kits(
|
||||
Crashlytics.Builder().core(CrashlyticsCore.Builder().disabled(!BuildConfig.CRASHLYTICS_ENABLED).build()).build()
|
||||
).debuggable(BuildConfig.DEBUG).build())
|
||||
}
|
||||
|
Reference in New Issue
Block a user