Fix opt-out apps showing up as not yet backed up

This bug also caused APKs of opt-out apps not getting backed up.
This commit is contained in:
Torsten Grote 2020-09-21 09:57:46 -03:00 committed by Chirayu Desai
parent 1e3263ec54
commit 397f27b460

View file

@ -154,6 +154,6 @@ internal fun PackageInfo.isNotUpdatedSystemApp(): Boolean {
internal fun PackageInfo.doesNotGetBackedUp(): Boolean { internal fun PackageInfo.doesNotGetBackedUp(): Boolean {
if (packageName == MAGIC_PACKAGE_MANAGER || applicationInfo == null) return true if (packageName == MAGIC_PACKAGE_MANAGER || applicationInfo == null) return true
return applicationInfo.flags and FLAG_ALLOW_BACKUP == 0 && // does not allow backup return applicationInfo.flags and FLAG_ALLOW_BACKUP == 0 || // does not allow backup
applicationInfo.flags and FLAG_STOPPED != 0 // is stopped applicationInfo.flags and FLAG_STOPPED != 0 // is stopped
} }