FairEmail/app/src/main/java/com/bugsnag/android/ClientObservable.kt

37 lines
957 B
Kotlin
Raw Normal View History

2021-05-15 20:03:05 +00:00
package com.bugsnag.android
2021-07-29 19:08:19 +00:00
import com.bugsnag.android.internal.ImmutableConfig
2021-05-15 20:03:05 +00:00
internal class ClientObservable : BaseObservable() {
fun postOrientationChange(orientation: String?) {
2021-07-29 19:08:19 +00:00
updateState { StateEvent.UpdateOrientation(orientation) }
2021-05-15 20:03:05 +00:00
}
2021-06-01 05:34:31 +00:00
fun postMemoryTrimEvent(isLowMemory: Boolean) {
2021-07-29 19:08:19 +00:00
updateState { StateEvent.UpdateMemoryTrimEvent(isLowMemory) }
2021-06-01 05:34:31 +00:00
}
2021-07-29 19:08:19 +00:00
fun postNdkInstall(
conf: ImmutableConfig,
lastRunInfoPath: String,
consecutiveLaunchCrashes: Int
) {
updateState {
2021-05-15 20:03:05 +00:00
StateEvent.Install(
conf.apiKey,
conf.enabledErrorTypes.ndkCrashes,
conf.appVersion,
conf.buildUuid,
conf.releaseStage,
lastRunInfoPath,
consecutiveLaunchCrashes
)
2021-07-29 19:08:19 +00:00
}
2021-05-15 20:03:05 +00:00
}
fun postNdkDeliverPending() {
2021-07-29 19:08:19 +00:00
updateState { StateEvent.DeliverPending }
2021-05-15 20:03:05 +00:00
}
}