Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-20 19:01:36 +04:00
parent d9c08b5055
commit 64b094c8e7
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit 52d7e406032b0f41cdfac00e796974e06a99ad7f Subproject commit c6dd1a8d384aa4b91ee09a9f99b7cdf8be3f1ab2

View file

@ -33,7 +33,15 @@ sealed class RequestHeader(vararg pairs: Pair<String, ProviderSuspend<String>>)
"platform" to ProviderSuspend { "android" }, "platform" to ProviderSuspend { "android" },
"language" to ProviderSuspend { appInfoProvider.language.checkHeaderValueOrEmpty() }, "language" to ProviderSuspend { appInfoProvider.language.checkHeaderValueOrEmpty() },
"timezone" to ProviderSuspend { "timezone" to ProviderSuspend {
TimeZone.getDefault().getDisplayName(false, TimeZone.SHORT).checkHeaderValueOrEmpty() val timeZone = TimeZone.getDefault()
// TimeZone.getDisplayName may throw AssertionError on some devices due to an Android ICU bug
// ("No NameTypeIndex match for SHORT_STANDARD"), so fall back to the timezone id.
val displayName = try {
timeZone.getDisplayName(false, TimeZone.SHORT)
} catch (_: AssertionError) {
timeZone.id
}
displayName.checkHeaderValueOrEmpty()
}, },
"device" to ProviderSuspend { appInfoProvider.device.checkHeaderValueOrEmpty() }, "device" to ProviderSuspend { appInfoProvider.device.checkHeaderValueOrEmpty() },
) )