diff options
author | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-03-31 19:35:12 +0200 |
---|---|---|
committer | Guillaume Jacquart <guillaume.jacquart@hoodbrains.com> | 2023-03-31 19:35:12 +0200 |
commit | 4d6e903210b4e6c8c04196e6df40922c14d80063 (patch) | |
tree | 6f196ff226711613272339bd928e43bba0d8a0c0 /app/src | |
parent | eecf7650b01e29fdd2fb7cf289f5ecfbab8c8ef6 (diff) |
842: fix whitelist compatapps, when system app in whitelist.
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt | 8 |
1 files 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<String> 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 } |