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.
This commit is contained in:
Torsten Grote 2024-10-07 10:47:27 -03:00
parent 5f8e85944a
commit 3601494b06
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -232,7 +232,11 @@ internal class PackageService(
internal fun PackageInfo.isUserVisible(context: Context): Boolean { internal fun PackageInfo.isUserVisible(context: Context): Boolean {
if (packageName == MAGIC_PACKAGE_MANAGER || applicationInfo == null) return false 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 { internal fun PackageInfo.isSystemApp(): Boolean {