Commit Graph

7801 Commits

Author SHA1 Message Date
Torsten Grote
fbf3816cb5 [app] Add Repo name as prefix to update error toasts 2022-09-02 13:16:55 -03:00
Torsten Grote
d2d078e165 [app] Fix formatting of timestamps (e.g. lastUpdated) and remove unused Utils methods 2022-09-02 13:16:55 -03:00
Torsten Grote
a57aa3230f [app] Fix downloading from content:// Uris (flash drive repos) 2022-09-02 13:16:55 -03:00
Torsten Grote
013aed717c [app] Remove code for SDK versions that we don't support anymore 2022-09-02 13:16:55 -03:00
Torsten Grote
2a6cea9aaf [app] Remove unused code 2022-09-02 13:16:54 -03:00
Torsten Grote
4e1f538797 [app] Remove jackson dependency
Parsing of JSON is now done inside the index library using kotlinx.serialization multi-platform library.

Another small usage in FDroidMetricsWorker was replaced with native JSONObject.
2022-09-02 13:16:54 -03:00
Torsten Grote
1c833939e7 [app] Fix ApkVerifierTest by removing index v0 XML parsing and adding permissions directly in the test 2022-09-02 13:16:54 -03:00
Torsten Grote
928cd1d6a4 [app] remove old ContentProviders from old database implementation 2022-09-02 13:16:54 -03:00
Torsten Grote
6ffb0dc8d7 [app] kill old IndexUpdaters and related code as this is now in libraries via RepoUpdater 2022-09-02 13:16:54 -03:00
Torsten Grote
8ace3e1129 [app] kill InstalledAppProvider and related code
We don't need to cache installed apps locally as they are available via the PackageManager as well. This avoids an entire class of bugs where our cache gets out of sync with reality. Also, it simplifies the code the database. We no longer need to listen to broadcast about which packages get installed and removed which is more tricker when targetting newer Android SDKs.
2022-09-02 13:16:54 -03:00
Torsten Grote
2cd8a24367 [app] Fix or remove UI tests
Tests for v0 index have been removed with their assets.

AntiFeaturesTest is not needed anymore, because filtering doesn't happen in new DB

PanicResponderActivityTest can not be tested as easily anymore

MultiIndexUpdaterTests are now spread over various database tests

LocaleSelectionTest is now in org.fdroid.database.BestLocaleTest

Most tests org.fdroid.fdroid.data now have equivalents in the new database library
2022-09-02 13:16:53 -03:00
Torsten Grote
a81ca55bc6 [app] Adapt nearby/swap to new DB 2022-09-02 13:16:53 -03:00
Torsten Grote
e32e71494f [app] Remove Provisioner as it isn't used/needed anymore 2022-09-02 13:16:53 -03:00
Torsten Grote
ad758caa40 [app] Adjust settings UI to new DB 2022-09-02 13:16:53 -03:00
Torsten Grote
2a6617e6f0 [app] Make InstallConfirmActivity use new DB 2022-09-02 13:16:53 -03:00
Torsten Grote
d7dd24a5f3 [app] Make installed apps use new DB 2022-09-02 13:16:53 -03:00
Torsten Grote
d88c2d14de [app] App list search with new DB 2022-09-02 13:16:52 -03:00
Torsten Grote
27f07559a1 [app] Make Updates tab use new DB 2022-09-02 13:16:52 -03:00
Torsten Grote
091899e499 [app] Move managing repos to new DB 2022-09-02 13:16:52 -03:00
Torsten Grote
1f9e055967 [app] Expose beta release channel in the app details UI 2022-09-02 13:16:52 -03:00
Torsten Grote
ec718ebbc9 [app] Make AppDetailsActivity use new DB
AppIconsTest is now part of org.fdroid.database.AppTest
2022-09-02 13:16:52 -03:00
Torsten Grote
90b7570ffb [app] Use new IndexV1Updater and make latest and category tab use new DB 2022-09-02 13:16:52 -03:00
Torsten Grote
4b5aaf2d16 [app] Don't show unknown (other) anti-features by default 2022-09-02 13:16:51 -03:00
Torsten Grote
65ee9c7fec [app] upgrade dependencies 2022-09-02 13:16:51 -03:00
Torsten Grote
49cdcb98b3 [db] add test for DefaultUriBuilder 2022-09-02 13:16:51 -03:00
Torsten Grote
c7bf225ba0 [index] move v1 tests from app to index
and allow permission arrays of larger size for v1
2022-09-02 13:16:51 -03:00
Torsten Grote
068f4d37ad [download] Fix double slash in repo URLs causing redirect exceptions 2022-09-02 13:16:51 -03:00
Torsten Grote
a07e57ec99 DO NOT MERGE: nightly deploy also from db-library branch 2022-09-02 13:16:50 -03:00
Torsten Grote
72bdf58210 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-07-25 10:47:45 -03:00
Torsten Grote
363ea96c5f [db] clean up public API and docs 2022-07-25 10:47:32 -03:00
Torsten Grote
6e5aef5c1e [db] add dokka for generation of docs 2022-07-25 10:47:31 -03:00
Torsten Grote
abf265450c [db] add search support with FTS4
FTS5 isn't supported by Room because old Android devices ship only with sqlite with FTS4
2022-07-25 10:47:31 -03:00
Torsten Grote
2dbbbad74a [db] remove getBestLocale() as it was moved to index lib 2022-07-25 10:47:31 -03:00
Torsten Grote
83bc99ab3c [db] Add a RepoUriBuilder for custom Uris for downloading a file from a repo. Allowing different implementations for this is useful for exotic repository locations that do not allow for simple concatenation such as content:// repos. 2022-07-25 10:47:31 -03:00
Torsten Grote
79160b68ec [db] clean up RepositoryDao and add more tests 2022-07-25 10:47:31 -03:00
Torsten Grote
40d5c60d63 [db] simplify app queries and add more tests for AppDao 2022-07-25 10:47:31 -03:00
Torsten Grote
a1b64a5ba2 [db] Add more tests (for locales, IndexV1, etc.) 2022-07-25 10:47:29 -03:00
Torsten Grote
dfd8eb178f [db] improve loading of versions
faster permission loading and more tests
2022-07-21 16:55:58 -03:00
Torsten Grote
a47ab38533 [db] Run tests also locally with roboelectric
This is much faster and doesn't require a device. However, the test should also continue to run on-device as this is the sqlite version used in practice.
2022-07-21 16:55:58 -03:00
Torsten Grote
1fd3205f84 [db] Implement interfaces from index library
so we can use UpdateChecker and CompatibilityChecker with our DB classes
2022-07-21 16:49:25 -03:00
Torsten Grote
663f7fd305 [db] Add IndexV2Updater and RepoUpdater
The IndexV2Updater fetches the new entry.jar, verifies it and then either processes a diff or the full index.

The RepoUpdater is a convenience class that encapsulates updating repos with potentially more than one format. It tries v2 first (in case the repo has upgraded) and falls back to v1 if the repo isn't known to support v2 already (downgrade protection).
2022-07-21 16:49:25 -03:00
Torsten Grote
8236f48b38 [db] Implement diffing via DbV2DiffStreamReceiver 2022-07-21 16:49:24 -03:00
Torsten Grote
56af97990e [db] make repo icon and name localizable
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.
2022-07-21 16:49:24 -03:00
Torsten Grote
3c8cc6c9d8 [db] use prefix and postfix when serializing lists of strings into the DB
This makes for safer LIKE queries
2022-07-21 16:49:24 -03:00
Torsten Grote
0f1d0e03dc [db] remove grouping of author and donation fields
at the explicit request of Hans who feels strongly about it.
2022-07-21 16:49:24 -03:00
Torsten Grote
03ba42bbc1 [db] Add webBaseUrl to Repository
and test another auto-migration with it
2022-07-21 16:49:24 -03:00
Torsten Grote
0a2075b51e [db] allow clearing all repos
used for panic responder in F-Droid
2022-07-21 16:49:24 -03:00
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