am e5bfd50e: Also filter the list of Archives to only show the compatible ones.

Merge commit 'e5bfd50ece683b42c0053995d149dc096c80a312'

* commit 'e5bfd50ece683b42c0053995d149dc096c80a312':
  Also filter the list of Archives to only show the compatible ones.
This commit is contained in:
Xavier Ducrohet
2009-07-24 12:52:20 -07:00
committed by Android Git Automerger

View File

@@ -163,7 +163,19 @@ public class RepoSourcesAdapter {
} }
} else if (parentElement instanceof Package) { } else if (parentElement instanceof Package) {
return ((Package) parentElement).getArchives(); Archive[] archives = ((Package) parentElement).getArchives();
if (mUpdaterData.getSettingsController().getShowUpdateOnly()) {
for (Archive archive : archives) {
// if we only want the compatible archives, then we just take the first
// one. it's unlikely there are 2 compatible archives for the same
// package
if (archive.isCompatible()) {
return new Object[] { archive };
}
}
}
return archives;
} }
return new Object[0]; return new Object[0];