Commit Graph

7905 Commits

Author SHA1 Message Date
Torsten Grote
b0748fc11f [app] pass App object into installers, so it is available everywhere where needed 2022-11-25 11:07:37 +01:00
Torsten Grote
d3b5620035 [app] Don't use ETag for determining if a repo has been updated or not 2022-11-25 11:07:37 +01:00
Torsten Grote
978da87f84 [app] Allow runOffUiThread() to return null 2022-11-25 11:07:37 +01:00
Torsten Grote
4ae34d9f14 [db] attach install data from PackageManager to search results
otherwise all found apps are considered not installed
2022-11-25 11:07:37 +01:00
Torsten Grote
ddabd8375b 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-11-25 11:07:37 +01:00
Torsten Grote
ddb6d46b6f 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-11-25 11:07:37 +01:00
Torsten Grote
45708edb66 Rename EntryV2 to Entry as requested by Hans in #2443 2022-11-25 11:07:37 +01:00
Torsten Grote
713e687856 [db] expose preferredSigner to AppListItems (needed for picking correct version)
and add a test for checking preferredSigner in DbUpdateChecker
2022-11-25 11:07:37 +01:00
Torsten Grote
4651c6b786 [download] properly calculate hash when resuming downloads
Before, we were ignoring the already downloaded bytes which caused the hash verification to fail.
2022-11-25 11:07:37 +01:00
Torsten Grote
03b536779f [app] Bump minSdkVersion to 23
This is done, because index v2 is signed with apksigner --min-sdk-version 23 by fdroidserver. So to ensure that the client will always be able to verify a v2 index, we force clients to run SDK 23 at least. If they were running 22 and apksigner ever upgrades to incompatible signing algorithms, those clients would get locked out.
2022-11-25 11:07:37 +01:00
Torsten Grote
82ecf7c0ab [db] only consider enabled repos for getApp() query 2022-11-25 11:07:37 +01:00
Torsten Grote
49c7792349 [app] Make forceOldIndex preference work for forcing v1
in case there are severe bugs with v2 after it rolled out to users, so they can at least continue to receive updates with this setting.
2022-11-25 11:07:37 +01:00
Torsten Grote
a2093f92bf [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-11-25 11:07:37 +01:00
Torsten Grote
e792f70fc6 [app] Add support for IPFS CID downloading
This uses IndexFile objects instead of String file names everywhere. The general advantage of that is that we can now pass the hash and the file size to the downloader. For index v2 the hash can then get validated while downloading.
2022-11-25 11:07:37 +01:00
Torsten Grote
8e022b1709 DO NOT MERGE [db] migrations and schemas during development 2022-11-25 11:07:37 +01:00
Torsten Grote
d5edeac42b [db] Add IPFS CIDv1 to database
and support new version of download library
2022-11-25 11:07:37 +01:00
Torsten Grote
59982c9990 [index] Add support for IPFS CIDv1 in the index v2 format 2022-11-25 11:07:37 +01:00
Torsten Grote
066a4e265f [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-11-25 11:07:37 +01:00
Torsten Grote
9035649f52 Upgrade to Android Studio Chipmunk
and upgrade other dependencies as well
2022-11-25 11:07:37 +01:00
Torsten Grote
50bdb3d4e4 [app] Don't show summary if null
Originally, we were showing "Unknown application" in English, no matter the user's locale. Then here we were actually showing "null". Both isn't good, so best to not show anything.
2022-11-25 11:07:37 +01:00
Torsten Grote
c1c1553135 [app] Add Repo name as prefix to update error toasts 2022-11-25 11:07:37 +01:00
Torsten Grote
46267a297d [app] Fix formatting of timestamps (e.g. lastUpdated) and remove unused Utils methods 2022-11-25 11:07:37 +01:00
Torsten Grote
e8e5351fe4 [app] Fix downloading from content:// Uris (flash drive repos) 2022-11-25 11:07:37 +01:00
Torsten Grote
debc35b6bd [app] Remove code for SDK versions that we don't support anymore 2022-11-25 11:07:37 +01:00
Torsten Grote
f6b36f7633 [app] Remove unused code 2022-11-25 11:07:37 +01:00
Torsten Grote
bf01a16c75 [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-11-25 11:07:37 +01:00
Torsten Grote
12ebcff665 [app] Fix ApkVerifierTest by removing index v0 XML parsing and adding permissions directly in the test 2022-11-25 11:07:37 +01:00
Torsten Grote
065cfe40f5 [app] remove old ContentProviders from old database implementation 2022-11-25 11:07:34 +01:00
Torsten Grote
ad0f84f619 [app] kill old IndexUpdaters and related code as this is now in libraries via RepoUpdater 2022-11-25 11:07:04 +01:00
Torsten Grote
a51c8776f5 [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-11-25 11:07:04 +01:00
Torsten Grote
16f5f6dc16 [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-11-25 11:07:04 +01:00
Torsten Grote
aaa919e1a9 [app] Adapt nearby/swap to new DB 2022-11-25 11:07:04 +01:00
Torsten Grote
c84c158ffa [app] Remove Provisioner as it isn't used/needed anymore 2022-11-25 11:07:04 +01:00
Torsten Grote
3908ac93d9 [app] Adjust settings UI to new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
564c7f8310 [app] Make InstallConfirmActivity use new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
f9f53f4610 [app] Make installed apps use new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
ab2941cae6 [app] App list search with new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
e6419b8f09 [app] Make Updates tab use new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
dff7666cf3 [app] Move managing repos to new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
3d59ddf28b [app] Expose beta release channel in the app details UI 2022-11-25 11:07:03 +01:00
Torsten Grote
614f1a55d5 [app] Make AppDetailsActivity use new DB
AppIconsTest is now part of org.fdroid.database.AppTest
2022-11-25 11:07:03 +01:00
Torsten Grote
9971693f7d [app] Use new IndexV1Updater and make latest and category tab use new DB 2022-11-25 11:07:03 +01:00
Torsten Grote
cc3f45bb41 [app] Don't show unknown (other) anti-features by default 2022-11-25 11:07:03 +01:00
Torsten Grote
ed82ae7b88 [app] upgrade dependencies 2022-11-25 11:07:03 +01:00
Torsten Grote
a74041123b [db] add test for DefaultUriBuilder 2022-11-25 11:07:03 +01:00
Hans-Christoph Steiner
9f7b160986 Merge branch 'index-download-libs-fixes' into 'master'
index/download lib fixes from !1135

Closes #2412

See merge request fdroid/fdroidclient!1141
2022-11-25 09:50:23 +00:00
Hans-Christoph Steiner
8cf836a8b3 IndexV1UpdaterTest is now in the database lib.
libs/database/src/dbTest/java/org/fdroid/index/v1/IndexV1UpdaterTest.kt
2022-11-25 10:20:54 +01:00
Hans-Christoph Steiner
835f7485f0 LocaleSelectionTest is now in org.fdroid.database.BestLocaleTest 2022-11-24 22:44:15 +01:00
Torsten Grote
6d9f3a8d7e [download] Require ktor-client-core as API dependency, otherwise consumers can't use HttpManager 2022-11-24 22:34:50 +01:00
Torsten Grote
ce1d07b4b1 [index] in v1 the whatsNew refers to suggested version not first version 2022-11-24 22:34:50 +01:00