From 321c04958cd8acddd5f881fcd8778abb0cf27752 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 16 Oct 2024 08:54:41 -0300 Subject: [PATCH] Exclude ourselves from backup status --- .../com/stevesoltys/seedvault/settings/AppListRetriever.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/settings/AppListRetriever.kt b/app/src/main/java/com/stevesoltys/seedvault/settings/AppListRetriever.kt index 9d6cdb3c..55a6d96f 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/settings/AppListRetriever.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/settings/AppListRetriever.kt @@ -107,7 +107,11 @@ internal class AppListRetriever( val locale = Locale.getDefault() return (userApps + packageService.launchableSystemApps.mapNotNull { val packageName = it.activityInfo.packageName - if (packageName in userPackages) return@mapNotNull null + if (packageName in userPackages || packageName == context.packageName) { + // don't re-add user packages again, + // also on some ROMs we are a launchableSystemApp, so we need to exclude ourselves + return@mapNotNull null + } val metadata = metadataManager.getPackageMetadata(packageName) AppStatus( packageName = packageName,