Use constant for Magic Number

This commit is contained in:
Maxr1998 authored and Max Rumpf committed 2022-11-26 00:47:03 +01:00
1 parent b8cfa7ea52
commit f611a11d94
1 file changed
+2 -1
@@ -42,6 +42,7 @@ import org.koin.dsl.module
import java.util.concurrent.Executors
const val PLAYER_EVENT_CHANNEL = "PlayerEventChannel"
private const val HTTP_CACHE_SIZE: Long = 16 * 1024 * 1024
private const val TS_SEARCH_PACKETS = 1800
val applicationModule = module {
@@ -90,7 +91,7 @@ val applicationModule = module {
.enableHttp2(true)
.enableQuic(true)
.enableBrotli(true)
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, 16 * 1024 * 1024)
.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_IN_MEMORY, HTTP_CACHE_SIZE)
.build()
CronetDataSource.Factory(cronetEngine, Executors.newCachedThreadPool()).setUserAgent(Util.getUserAgent(context, Constants.APP_INFO_NAME))
} else {