diff --git a/fingerprint/src/main/java/com/fingerprintjs/android/fingerprint/device_id_providers/MediaDrmIdProvider.kt b/fingerprint/src/main/java/com/fingerprintjs/android/fingerprint/device_id_providers/MediaDrmIdProvider.kt index 64495dc..2c0031e 100644 --- a/fingerprint/src/main/java/com/fingerprintjs/android/fingerprint/device_id_providers/MediaDrmIdProvider.kt +++ b/fingerprint/src/main/java/com/fingerprintjs/android/fingerprint/device_id_providers/MediaDrmIdProvider.kt @@ -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) @@ -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 \ No newline at end of file +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