Merge pull request #781 from grote/exclude-us
Exclude ourselves from backup status
This commit is contained in:
commit
1299008780
1 changed files with 5 additions and 1 deletions
|
@ -107,7 +107,11 @@ internal class AppListRetriever(
|
||||||
val locale = Locale.getDefault()
|
val locale = Locale.getDefault()
|
||||||
return (userApps + packageService.launchableSystemApps.mapNotNull {
|
return (userApps + packageService.launchableSystemApps.mapNotNull {
|
||||||
val packageName = it.activityInfo.packageName
|
val packageName = it.activityInfo.packageName
|
||||||
if (packageName in userPackages) return@mapNotNull null
|
if (packageName in userPackages || packageName == context.packageName) {
|
||||||
|
// don't re-add user packages again,
|
||||||
|
// also on some ROMs we are a launchableSystemApp, so we need to exclude ourselves
|
||||||
|
return@mapNotNull null
|
||||||
|
}
|
||||||
val metadata = metadataManager.getPackageMetadata(packageName)
|
val metadata = metadataManager.getPackageMetadata(packageName)
|
||||||
AppStatus(
|
AppStatus(
|
||||||
packageName = packageName,
|
packageName = packageName,
|
||||||
|
|
Loading…
Reference in a new issue