summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-04-03 11:15:37 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-04-03 11:15:37 +0000
commitd767dc8f40f794f869d352d02c02c66813b83741 (patch)
tree6f196ff226711613272339bd928e43bba0d8a0c0 /app
parenteecf7650b01e29fdd2fb7cf289f5ecfbab8c8ef6 (diff)
parent4d6e903210b4e6c8c04196e6df40922c14d80063 (diff)
Merge branch '842-fix_hide_ip_whitelist' into 'main'
842: fix whitelist compatapps, when system app in whitelist. See merge request e/os/advanced-privacy!120
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/domain/usecases/IpScramblingStateUseCase.kt8
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
}