summaryrefslogtreecommitdiff
path: root/permissionsstandalone/src/main/java/foundation/e
diff options
context:
space:
mode:
authorGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-04-21 06:25:54 +0000
committerGuillaume Jacquart <guillaume.jacquart@hoodbrains.com>2023-04-21 06:25:54 +0000
commit6068cebe972e000872e4780dd9f75680a3abf073 (patch)
tree4785f6b44d121f95c840020441687bce5777a44f /permissionsstandalone/src/main/java/foundation/e
parent2df577ca97a674a4bd3875dc5137bb44df2c03ef (diff)
6556: add AdvancedPrivacy App Id in trackers stats to avoid appUid aliasing
Diffstat (limited to 'permissionsstandalone/src/main/java/foundation/e')
-rw-r--r--permissionsstandalone/src/main/java/foundation/e/privacymodules/permissions/PermissionsPrivacyModule.kt13
1 files changed, 5 insertions, 8 deletions
diff --git a/permissionsstandalone/src/main/java/foundation/e/privacymodules/permissions/PermissionsPrivacyModule.kt b/permissionsstandalone/src/main/java/foundation/e/privacymodules/permissions/PermissionsPrivacyModule.kt
index da7c73e..283b417 100644
--- a/permissionsstandalone/src/main/java/foundation/e/privacymodules/permissions/PermissionsPrivacyModule.kt
+++ b/permissionsstandalone/src/main/java/foundation/e/privacymodules/permissions/PermissionsPrivacyModule.kt
@@ -21,6 +21,7 @@ import android.app.NotificationChannel
import android.content.Context
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
+import android.graphics.drawable.Drawable
import foundation.e.privacymodules.permissions.data.AppOpModes
import foundation.e.privacymodules.permissions.data.ApplicationDescription
@@ -29,19 +30,15 @@ import foundation.e.privacymodules.permissions.data.ApplicationDescription
*/
class PermissionsPrivacyModule(context: Context) : APermissionsPrivacyModule(context) {
override fun getApplications(
- filter: ((PackageInfo) -> Boolean)?,
- withIcon: Boolean
+ filter: ((PackageInfo) -> Boolean)?
): List<ApplicationDescription> {
return context.packageManager.getInstalledPackages(PackageManager.GET_PERMISSIONS)
.filter { filter?.invoke(it) == true }
- .map { buildApplicationDescription(it.applicationInfo, withIcon = withIcon) }
+ .map { buildApplicationDescription(it.applicationInfo) }
}
- override fun getWorkProfileApplications(
- filter: ((PackageInfo) -> Boolean)?,
- withIcon: Boolean
- ): List<ApplicationDescription> {
- return emptyList()
+ override fun getApplicationIcon(app: ApplicationDescription): Drawable? {
+ return getApplicationIcon(app.packageName)
}
/**