Bug fix for processing exclude routes for older android versions

This commit is contained in:
albexk 2024-01-31 19:59:00 +03:00
parent 1e5c9c9c4d
commit 090208bd2c

View file

@ -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()