Skip to content

Commit

Permalink
Merge branch 'hotfix/5.192.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
CDRussell committed Mar 6, 2024
2 parents f2dd8b1 + d3e7bce commit d587ecb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,24 @@ class WebViewFeatureFlagReporter @Inject constructor(
@UiThread
override fun onCreate(owner: LifecycleOwner) {
appCoroutineScope.launch(dispatchers.io()) {
val params = buildParams() ?: return@launch
pixel.fire(
pixelName = AppPixelName.WEBVIEW_FEATURE_FLAGS_INJECTION_CAPABILITY.pixelName,
parameters = buildParams(),
parameters = params,
encodedParameters = emptyMap(),
type = PixelType.UNIQUE,
)
}
}

private fun buildParams(): Map<String, String> {
return mapOf(
"supportsWebMessageListener" to isFeatureSupported(WEB_MESSAGE_LISTENER).toString(),
"supportsPostWebMessage" to isFeatureSupported(POST_WEB_MESSAGE).toString(),
"supportsDocumentStartJavascript" to isFeatureSupported(DOCUMENT_START_SCRIPT).toString(),
"supportsUserAgentMetadata" to isFeatureSupported(USER_AGENT_METADATA).toString(),
)
private fun buildParams(): Map<String, String>? {
return runCatching {
mapOf(
"supportsWebMessageListener" to isFeatureSupported(WEB_MESSAGE_LISTENER).toString(),
"supportsPostWebMessage" to isFeatureSupported(POST_WEB_MESSAGE).toString(),
"supportsDocumentStartJavascript" to isFeatureSupported(DOCUMENT_START_SCRIPT).toString(),
"supportsUserAgentMetadata" to isFeatureSupported(USER_AGENT_METADATA).toString(),
)
}.getOrDefault(null)
}
}
2 changes: 1 addition & 1 deletion app/version/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=5.192.1
VERSION=5.192.2

0 comments on commit d587ecb

Please sign in to comment.