One of those last minute requests for changing index structure...
We don't bother with making a new table for localizable repo icons. They just get serialized into the DB. If we ever need to update the structure, we can consider wiping the icons. They can get updated with a full index update.
In JSON, keys can come in any order, so we need to handle the case that we receive packages before the repo metadata. Now we explicitly clear data and rename the insert method to insertOrReplace in order to make it clear that data gets replaced.
Also, we pass the repoId into the constructor of the DB stream receivers to make clear that one receiver is meant to receive a single pre-existing repo.
and remove feature version as it app can't even use that.
Compatibility checking has been added to the DB layer as a post-processing step only because the UI wants to query for that on the app level (which would need all APKs).
Doing the actual update check is more work than it would be with keeping info about all installed apps in the DB. However, this way, we don't need to keep that info in sync with reality. Also, we need to check for updates only after updating repos, so there we are on a worker thread already anyway and an spare an extra second.