Skip to content

Commit

Permalink
refactor: remove is_foreground from event producer (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickybondarenko authored Jun 4, 2024
1 parent 6ac48f9 commit 27846fc
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ class AndroidLifecycleEventProducer(
trackApplicationLifecycleEvents()
}

override fun onStart(owner: LifecycleOwner) {
updateContext(IS_FOREGROUND_KEY, ConfidenceValue.Boolean(true))
}

override fun onStop(owner: LifecycleOwner) {
updateContext(IS_FOREGROUND_KEY, ConfidenceValue.Boolean(false))
}

private fun updateContext(key: String, value: ConfidenceValue) {
updateContext(mapOf(key to value))
}

@Synchronized
private fun updateContext(map: Map<String, ConfidenceValue>) {
val context = contextFlow.value.toMutableMap()
Expand Down Expand Up @@ -185,7 +173,6 @@ class AndroidLifecycleEventProducer(
private const val LEGACY_APP_BUILD = "LEGACY_APP_BUILD"

// Context keys
private const val IS_FOREGROUND_KEY = "is_foreground"
private const val APP_VERSION_KEY = "app_version"
private const val APP_BUILD_KEY = "app_build"

Expand Down

0 comments on commit 27846fc

Please sign in to comment.