Commit Graph

74 Commits

Author SHA1 Message Date
Torsten Grote
4aa244bd1a Downgrade kotlinx-serialization-json to 1.4.1 to fix #2637
https://github.com/Kotlin/kotlinx.serialization/issues/2231
2023-06-20 09:11:20 -03:00
Torsten Grote
d62e4b7735 Upgrade kotlinx-serialization-json to 1.5.1 in hope to fix #2637 2023-06-19 10:32:02 -03:00
Torsten Grote
26262e77bc [index] Require at least SDK 24 for BestLocale test 2023-06-15 10:28:40 +00:00
Torsten Grote
e80323e57f [download] TLS 1.3 is only supported on SDK 29 and up 2023-06-15 10:28:40 +00:00
Torsten Grote
7853354394 [db] Require SDK 28 for instrumentation tests 2023-06-15 10:28:40 +00:00
Torsten Grote
e83bf6f94c Run KVM tests on SDK 28 due to mock limitation 2023-06-15 10:28:40 +00:00
Torsten Grote
6a5022511e Run library instrumentation tests together with app instrumentation tests
This job already takes the longest to complete due to the slow emulator. Therefore splitting this off doesn't make much sense.
2023-06-15 10:28:40 +00:00
Torsten Grote
373d038cc9 Enable gradle build cache within each pipeline
in order to speed up the CI.

This does not enable the build cache on local dev machines.
2023-06-15 10:28:40 +00:00
Torsten Grote
b70b3a9a06 [app] Use RepoManager for enabling/disabling repos 2023-06-07 13:52:21 +00:00
Torsten Grote
e382900f39 [app] Use RepoManager for deleting repositories 2023-06-07 13:52:21 +00:00
Torsten Grote
e819741c1a [app] Introduce RepoManager for managing list of repos
Later this will also be used for adding/removing repos.
2023-06-07 13:52:21 +00:00
Torsten Grote
0b28cced32 [db] Expose repoId of category and add method to get localized icon
The repoId is needed, so we can download the category icon from the correct repo.
2023-06-07 13:52:21 +00:00
Torsten Grote
b0d04e3664 [download] increase high HTTP timeouts to 5min
Apparently, this can still be a sane choice for Tor as well :o
2023-06-07 09:47:20 -03:00
Torsten Grote
fe78d954b6 [download] Allow making connections with higher HTTP timeouts
always use that for Tor proxies
2023-06-06 11:47:16 -03:00
Torsten Grote
21f8a23814 Upgrade all (most of) the things 2023-05-30 09:39:15 -03:00
Torsten Grote
9c50183b68 Upgrade to Android Studio Electric Eel to solve some test bugs 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
d7b52abf43 [db] Clarify method documentation for clearing/resetting 2023-04-06 08:34:02 -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
2500915a03 Bump library versions and update their README 2023-02-23 10:45:53 +00:00
Torsten Grote
a70f89a255 [download] Consider that MirrorChooser can auto-resume downloads as well
Also try next mirror when you need to resume, but the current one doesn't support it.
2023-02-08 21:22:12 +01:00
Torsten Grote
d2473d8ae8 [download] remove deprecated HttpGlideUrlLoader as we always use DownloadRequest with mirrors now 2023-02-01 14:25:14 -03:00
Hans-Christoph Steiner
9ab226b3fb re-add sig field for use in swap v1 compatibility checks
With index-v2, "signer" will be the only field used, since "sig" is
deprecated and should be removed.  "sig" needs to be kept only for
generating the index-v1.jar in nearby/swap repos so that it remains
compatible with older clients.  This code base should no longer use
"sig" for anything besides writing it out to index-v1.json.
2023-01-20 15:21:11 +01:00
Hans-Christoph Steiner
e3550171aa rename all cases where "sig" or "signature" should be "signer"
* "signer": standard SHA-256 fingerprint of the APK Signing Certificate
* "sig": fdroid-specific MD5 fingerprint of the APK Signing Certificate
2023-01-20 15:21:11 +01:00
Torsten Grote
7ff61fde50 [app] Don't treat apps with known-vulnerabilities like real updates 2023-01-19 08:36:04 +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
6d26927b44 [download] Don't log URLs, filenames or site content in release builds 2022-12-22 11:48:02 -03:00
Torsten Grote
50722f8270 [db] Ensure that we never return an empty list of mirrors for Repository#getMirrors() 2022-12-21 14:29:06 +00:00
Torsten Grote
efafc86b87 [app] fix NPE when de-serializing apkFile
Closes acra-crash-reports#127
2022-12-20 12:09:16 -03: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
818767b6c0 Update Room DB schema to match actual schema used 2022-12-15 17:10:08 +00:00
Hans-Christoph Steiner
bdc77a31b3 IndexCreator: if symlink fails, copy file into repo
Roboletric apparently does not support Os.symlink, and some devices might
have wonky implementations.  Copying is slower and takes more disk space,
but is much more reliable.  So it is a workable fallback.
2022-12-01 17:43:14 +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
b1499c89d4 [db] add lastUpdated to AppListItem so it can be used for custom sorting in UI 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
7c5ce606d0 Explicitly bubble up NotFoundException to UI
Otherwise, the UI might not catch it and crash. This can happen if a file is not available anymore on all mirrors.
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
aa6f30f34d [download] properly calculate hash when resuming downloads
Before, we were ignoring the already downloaded bytes which caused the hash verification to fail.
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
d512c909c3 [download] Fix corrupted download after mirror fail-over bug
When we had already read bytes from one mirror, but needed to fail-over to another mirror, we would re-read the same bytes again corrupting our download.

Fixes #2412

This commit resumes the download where the last mirror left off.
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
0019535279 [index] Add support for IPFS CIDv1 in the index v2 format 2022-12-01 17:43:13 +01:00
Torsten Grote
77c4506420 [download] add support for IPFS HTTP gateways
This refactors the library so that Downloaders receive the IndexFile directly so that they get access to the IPFS CID, but also to the SHA256 hash and the file size. Mirrors can now be marked as IPFS gateways.
2022-12-01 17:43:13 +01:00
Torsten Grote
eef3c3fb0d Upgrade to Android Studio Chipmunk
and upgrade other dependencies as well
2022-11-28 12:48:58 +01:00
Torsten Grote
83dd06e682 [app] upgrade dependencies 2022-11-28 10:17:30 +01:00