From 38cf8431f5f63aba52c7cb6ac1229e29386e779e Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Fri, 16 Sep 2022 09:24:06 +0200 Subject: [PATCH 1/2] 5819: remove PWA PLayer from dummy system apps. --- .../privacycentralapp/data/repositories/AppListsRepository.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt b/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt index d6af1e01..000d1f4c 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt @@ -38,6 +38,7 @@ class AppListsRepository( ) { companion object { private const val settingsPackageName = "com.android.settings" + private const val pwaPlayerPackageName = "foundation.e.pwaplayer" } val dummySystemApp = ApplicationDescription( @@ -102,6 +103,8 @@ class AppListsRepository( private fun isNotHiddenSystemApp(app: ApplicationInfo, launcherApps: List): Boolean { if (app.packageName == settingsPackageName) { return false + } else if (app.packageName == pwaPlayerPackageName) { + return true } else if (app.hasFlag(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) { return true } else if (!app.hasFlag(ApplicationInfo.FLAG_SYSTEM)) { -- GitLab From e4d0a3ba6da3ce7e1fa244cbe6483340b19dfe32 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Sat, 17 Sep 2022 17:48:59 +0200 Subject: [PATCH 2/2] MR feedbacks --- .../data/repositories/AppListsRepository.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt b/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt index 000d1f4c..febda91b 100644 --- a/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt +++ b/app/src/main/java/foundation/e/privacycentralapp/data/repositories/AppListsRepository.kt @@ -37,8 +37,8 @@ class AppListsRepository( private val coroutineScope: CoroutineScope ) { companion object { - private const val settingsPackageName = "com.android.settings" - private const val pwaPlayerPackageName = "foundation.e.pwaplayer" + private const val PNAME_SETTINGS = "com.android.settings" + private const val PNAME_PWAPLAYER = "foundation.e.pwaplayer" } val dummySystemApp = ApplicationDescription( @@ -101,9 +101,9 @@ class AppListsRepository( } private fun isNotHiddenSystemApp(app: ApplicationInfo, launcherApps: List): Boolean { - if (app.packageName == settingsPackageName) { + if (app.packageName == PNAME_SETTINGS) { return false - } else if (app.packageName == pwaPlayerPackageName) { + } else if (app.packageName == PNAME_PWAPLAYER) { return true } else if (app.hasFlag(ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) { return true -- GitLab