From 3601494b06f4761cb382cf8bb214840b42627ea1 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 7 Oct 2024 10:47:27 -0300 Subject: [PATCH] Also show TikTok in Backup status The apps ships an instrumentation configuration which we've so far only soon for instrumentation test dev apps. Now, we do more checks to identify those. --- .../seedvault/transport/backup/PackageService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/PackageService.kt b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/PackageService.kt index d409842e..51ecceda 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/transport/backup/PackageService.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/transport/backup/PackageService.kt @@ -232,7 +232,11 @@ internal class PackageService( internal fun PackageInfo.isUserVisible(context: Context): Boolean { if (packageName == MAGIC_PACKAGE_MANAGER || applicationInfo == null) return false - return !isNotUpdatedSystemApp() && instrumentation == null && packageName != context.packageName + val isInstrumentationApp = instrumentation.let { i -> + // TikTok for example ships instrumentation, so do more checks. See #769 + !i.isNullOrEmpty() && packageName.endsWith(".test") && i[0].splitNames.isEmpty() + } + return !isNotUpdatedSystemApp() && !isInstrumentationApp && packageName != context.packageName } internal fun PackageInfo.isSystemApp(): Boolean {