summaryrefslogtreecommitdiff
path: root/permissionsstandalone/src/main/java/foundation/e
diff options
context:
space:
mode:
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)
}
/**