Skip to content

Commit

Permalink
Also show TikTok in Backup status
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
grote committed Oct 7, 2024
1 parent 5f8e859 commit 3601494
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3601494

Please sign in to comment.