Commit Graph
34 Commits
Author SHA1 Message Date
Torsten Grote 51a4bcec58 [db] don't allow initial repos from fixtures to provide weight
The client was already auto-incrementing their weight anyway. But it leaked our internal weight handling into the library consumer which can cause issues like when me are making changes to how we handles repo weights as we are doing now.
2024-02-20 09:42:40 -03:00
Torsten Grote b993da8db8 [db] New repos now get lower weight than older ones
so they do not override the information from older repos anymore. This is especially an issue for the official repo which historically had the lowest priority while it should have the highest.
2024-02-20 09:42:39 -03:00
Torsten Grote d9ea1e154b [db] Migrate repo weights and test migration 2024-02-20 09:42:39 -03:00
Torsten Grote 4a01b02fa6 [db] Add DB query for getting repos an app is in 2024-02-20 09:42:39 -03:00
Torsten Grote ead8bd1262 [db] Only consider preferred versions for updates and suggested version 2024-02-20 09:42:39 -03:00
Torsten Grote 12af2fa32b [db] reset the preferred repo when it gets disabled or deleted 2024-02-20 09:42:38 -03:00
Torsten Grote 5c27f7033e [db] Move InstantTaskExecutorRule into base DbTest class
so all tests can use LiveData helper methods such as getOrFail() without worrying about that rule
2024-02-20 09:42:38 -03:00
Torsten Grote 704234c9df [db] allow setting a preferred repo per app 2024-02-20 09:42:38 -03:00
Torsten Grote a5ec22fa6c [db] add queries for getting app list items by repo 2023-10-18 11:39:38 +00:00
Torsten Grote 7c9083fea1 Add test for compat flag in AppOverviewItems 2023-10-10 11:08:10 -03:00
Torsten Grote f3e8a0a45b [db] Add plumping for fetching and adding a new repo 2023-08-21 10:52:34 +02:00
Torsten Grote 43816ffe8d [db] validate repo certificate
for now only for initial repos, but eventually we should validate for CoreRepository as well to prevent invalid certs from entering the DB by other means.
2023-08-02 09:16:44 +02:00
Torsten Grote 8d4da28936 [app] some pre-repo mirror nitpicks 2023-07-11 13:29:45 -03:00
Michael Pöhn bcd9cc0548 🧭 add mirrors to default_repos.xml 2023-07-11 16:19:26 +00:00
Torsten Grote 7853354394 [db] Require SDK 28 for instrumentation tests 2023-06-15 10:28:40 +00:00
Torsten Grote 21f8a23814 Upgrade all (most of) the things 2023-05-30 09:39:15 -03:00
Torsten Grote d83822510c Compile libraries with SDK 33 as well 2023-05-29 12:00:49 -03:00
Torsten Grote 7489f8466b [db] Rework AppDao#clearAll() method to fix critical bug
This is a breaking change.

The new method is in FDroidDatabase and called clearAllAppData(). It now also resets repository timestamps, so we will not try to apply a diff when we should use a full index.
2023-04-05 17:34:36 -03:00
Torsten Grote 21f40158a2 [db] escape search query
to prevent sqlite FTS search features from messing up query

Fixes acra-crash-reports#217
2023-03-14 13:28:48 +00:00
Torsten Grote 7a2d0e31f3 [db] Handle users with a thousand apps or more installed in AppDao 2023-01-13 08:41:37 +00:00
Torsten Grote a474198c34 [db] Handle users with a thousand apps or more installed in VersionDao 2023-01-13 08:41:37 +00:00
Torsten Grote 90a14f82a1 [db] Add method for clearing all app data from DB (old resetTransient) 2022-12-19 11:01:35 -03:00
Hans-Christoph Steiner be5b7d89f8 fix ktlint
libs/database/src/dbTest/java/org/fdroid/database/AppListItemsTest.kt:68:1 Exceeded max line length (100) (cannot be auto-corrected) (max-line-length)
libs/database/src/dbTest/java/org/fdroid/database/AppListItemsTest.kt:121:1 Exceeded max line length (100) (cannot be auto-corrected) (max-line-length)
2022-12-16 11:34:46 +01:00
Isira Seneviratne 4ae3da15f0 Use PackageInfoCompat.getLongVersionCode(). 2022-12-15 18:28:29 +01:00
Torsten Grote cae10f11d9 Make index file name constants public and replace their string usages 2022-12-01 17:43:14 +01:00
Torsten Grote 367e9e9d0c [db] attach install data from PackageManager to search results
otherwise all found apps are considered not installed
2022-12-01 17:43:13 +01:00
Torsten Grote e86063937a Change repo attribute icons to be localized
This affects anti-features and categories. Reflection diffing has been made more robust in the process with the earlier FileV2 hack removed and better error messages.
2022-12-01 17:43:13 +01:00
Torsten Grote 3eca9402fe [db] expose preferredSigner to AppListItems (needed for picking correct version)
and add a test for checking preferredSigner in DbUpdateChecker
2022-12-01 17:43:13 +01:00
Torsten Grote 6a805c464e [db] only consider enabled repos for getApp() query 2022-12-01 17:43:13 +01:00
Torsten Grote 23966e4a09 [db] Add IPFS CIDv1 to database
and support new version of download library
2022-12-01 17:43:13 +01:00
Torsten Grote 8c64ad4707 [db] add test for DefaultUriBuilder 2022-11-25 12:59:00 +01:00
Torsten Grote 38e7bce982 Rename EntryV2 to Entry as requested by Hans in #2443 2022-11-25 12:24:33 +01:00
Torsten Grote 6b4e91ca0b [db] Assert that DB transaction gets rolled back when index update fails 2022-09-12 09:46:15 +00:00
Torsten Grote f6075848e7 Move libraries into their own folder
and remove sharedTest symlink hack. The shared tests are now a proper gradle module to avoid issues with using the same source files in different modules.
2022-09-12 09:46:15 +00:00