From 090208bd2c600b412466bb0d8c7af04712bb12f7 Mon Sep 17 00:00:00 2001 From: albexk Date: Wed, 31 Jan 2024 19:59:00 +0300 Subject: [PATCH] Bug fix for processing exclude routes for older android versions --- client/android/protocolApi/src/main/kotlin/ProtocolConfig.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/android/protocolApi/src/main/kotlin/ProtocolConfig.kt b/client/android/protocolApi/src/main/kotlin/ProtocolConfig.kt index 75ba1abf..78a24e82 100644 --- a/client/android/protocolApi/src/main/kotlin/ProtocolConfig.kt +++ b/client/android/protocolApi/src/main/kotlin/ProtocolConfig.kt @@ -128,7 +128,8 @@ open class ProtocolConfig protected constructor( } private fun processExcludedRoutes() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU && excludedRoutes.isNotEmpty()) { + // todo: rewrite, taking into account the current routes // for older versions of Android, build a list of subnets without excluded routes // and add them to routes val ipRangeSet = IpRangeSet()