Commit Graph

17 Commits

Author SHA1 Message Date
Torsten Grote
7fbb08de1b [db] explicitly clear repo data before updating with full index
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.
2022-07-21 16:49:23 -03:00
Torsten Grote
8d60009e49 [db] Add app preferences and let UpdateChecker use them 2022-07-21 16:49:23 -03:00
Torsten Grote
69673475cc [db] Let UpdateChecker also check for known vulnerabilities 2022-07-21 16:49:23 -03:00
Torsten Grote
89a2a50f7c [db] store localized name and summary in DB
otherwise we can't really sort *all* apps by name in an efficient manner
2022-07-21 16:49:23 -03:00
Torsten Grote
8f132fc6d0 [db] Enable strict API mode and ktlint for database library 2022-07-21 16:49:23 -03:00
Torsten Grote
5ab385ac57 [db] Store repo version in DB 2022-07-21 16:49:23 -03:00
Torsten Grote
1a73527c1e Use sharedTest sourceSet from index library instead own TestUtils 2022-07-21 16:49:22 -03:00
Torsten Grote
772cdb170f [db] Calculate app compatibility in DB
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).
2022-07-21 16:49:22 -03:00
Torsten Grote
1cfa06d6b5 [db] Add special queries for AppListItems 2022-07-21 16:49:22 -03:00
Torsten Grote
0fd4eb9c0c [db] Add UpdateChecker
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.
2022-07-21 16:49:22 -03:00
Torsten Grote
6f79b4dc17 [db] Allow pre-populating the database via onCreate callback
Also add more methods for managing repos and improve selecting apps from repos
2022-07-21 16:49:22 -03:00
Torsten Grote
81ab1b56f2 [db] Add a method for getting an app without specifying the repoId 2022-07-21 16:49:22 -03:00
Torsten Grote
0627d3276a [db] Add repo preferences as separate table
and use it in IndexV1Updater
2022-07-21 16:49:21 -03:00
Torsten Grote
3d69c13228 [db] Prepare DB for use by UI
Add AppOverviewItem and certificates for repos
2022-07-21 16:49:21 -03:00
Torsten Grote
b1f1d031f7 [db] Add simple IndexV1Updater (not in final form)
just to be able to get a real DB into the app for further testing
2022-07-21 16:49:21 -03:00
Torsten Grote
9d696e01cb [db] Add support for apps and streaming 2022-07-21 16:49:21 -03:00
Torsten Grote
75a6267cec [db] First prototype 2022-07-21 16:49:21 -03:00