Skip to content

Commit

Permalink
CI fix: increase timeout for mediaDrmId retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey-Makarov committed Oct 6, 2023
1 parent bb46a59 commit 1733d85
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.util.UUID

@Deprecated(message = DeprecationMessages.UNREACHABLE_SYMBOL_UNINTENDED_PUBLIC_API)
public class MediaDrmIdProvider {
public fun getMediaDrmId(): String? = safeWithTimeout {
public fun getMediaDrmId(): String? = safeWithTimeout(timeoutMs = MEDIA_DRM_ID_TIMEOUT_MS) {
mediaDrmId()
}.getOrDefault(null)

Expand Down Expand Up @@ -44,4 +44,7 @@ private fun ByteArray.toHexString(): String {
}

private const val WIDEWINE_UUID_MOST_SIG_BITS = -0x121074568629b532L
private const val WIDEWINE_UUID_LEAST_SIG_BITS = -0x5c37d8232ae2de13L
private const val WIDEWINE_UUID_LEAST_SIG_BITS = -0x5c37d8232ae2de13L
// this is not needed for the vast majority of cases,
// but on CI with emulator (api 32, google apis) the timeout of 1s was not enough
private const val MEDIA_DRM_ID_TIMEOUT_MS = 3000L

0 comments on commit 1733d85

Please sign in to comment.