From 4d6e903210b4e6c8c04196e6df40922c14d80063 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Fri, 31 Mar 2023 19:35:12 +0200 Subject: 842: fix whitelist compatapps, when system app in whitelist. --- .../privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt index 537586d..caba132 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 E FOUNDATION + * Copyright (C) 2021 E FOUNDATION, 2023 MURENA SAS * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ package foundation.e.privacycentralapp.domain.usecases +import android.util.Log import foundation.e.privacycentralapp.data.repositories.AppListsRepository import foundation.e.privacycentralapp.data.repositories.LocalStateRepository import foundation.e.privacycentralapp.domain.entities.InternetPrivacyMode @@ -90,19 +91,18 @@ class IpScramblingStateUseCase( val bypassTorApps: Set get() { var whitelist = ipScramblerModule.appList - if (getHiddenPackageNames().any { it in whitelist }) { val mutable = whitelist.toMutableSet() mutable.removeAll(getHiddenPackageNames()) mutable.add(appListsRepository.dummySystemApp.packageName) whitelist = mutable - } else if (AppListsRepository.appsCompatibiltyPNames.any { it in whitelist }) { + } + if (AppListsRepository.appsCompatibiltyPNames.any { it in whitelist }) { val mutable = whitelist.toMutableSet() mutable.removeAll(AppListsRepository.appsCompatibiltyPNames) mutable.add(appListsRepository.dummyAppsCompatibilityApp.packageName) whitelist = mutable } - return whitelist } -- cgit v1.2.1