Commit Graph

7914 Commits

Author SHA1 Message Date
Torsten Grote
ec69bc00a7 [app] Allow runOffUiThread() to return null 2022-12-01 17:43:13 +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
3368519677 [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-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
e5ebf7a218 [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-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
fb5b169e54 [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-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
1f0db46212 [app] Add Repo name as prefix to update error toasts 2022-12-01 17:43:13 +01:00
Torsten Grote
f52433730b [app] Fix formatting of timestamps (e.g. lastUpdated) and remove unused Utils methods 2022-12-01 17:43:13 +01:00
Torsten Grote
f6909f4399 [app] Fix downloading from content:// Uris (flash drive repos) 2022-12-01 17:43:13 +01:00
Torsten Grote
d000f3fade [app] Remove code for SDK versions that we don't support anymore 2022-12-01 17:43:13 +01:00
Torsten Grote
6c007e92b3 [app] Remove unused code 2022-12-01 17:43:13 +01:00
Torsten Grote
27ffc97e98 [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-12-01 17:43:13 +01:00
Torsten Grote
65d0bdf738 [app] Fix ApkVerifierTest by removing index v0 XML parsing and adding permissions directly in the test 2022-12-01 17:43:13 +01:00
Torsten Grote
7a1d288792 [app] remove old ContentProviders from old database implementation 2022-12-01 17:43:13 +01:00
Torsten Grote
a783d3cb94 [app] kill old IndexUpdaters and related code as this is now in libraries via RepoUpdater 2022-12-01 09:27:58 +01:00
Torsten Grote
3c25144331 [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-12-01 09:27:58 +01:00
Torsten Grote
cf913ffefa [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-12-01 09:27:57 +01:00
Torsten Grote
d61ecbfa08 [app] Adapt nearby/swap to new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
48d646361b [app] Adjust settings UI to new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
0f7c768b28 [app] Make InstallConfirmActivity use new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
3a2f1b10c3 [app] Make installed apps use new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
ad2700a0db [app] App list search with new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
c4e92fba86 [app] Make Updates tab use new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
adaf2a97ef [app] Move managing repos to new DB 2022-12-01 09:27:57 +01:00
Torsten Grote
0a7debeb30 [app] Expose beta release channel in the app details UI 2022-12-01 09:27:57 +01:00
Torsten Grote
acafbbaa65 [app] Make AppDetailsActivity use new DB
AppIconsTest is now part of org.fdroid.database.AppTest
2022-12-01 09:27:57 +01:00
Torsten Grote
d97d995c43 [app] Use new IndexV1Updater and make latest and category tab use new DB 2022-12-01 09:27:57 +01:00
Hans-Christoph Steiner
ee8af69861 Merge branch 'Use_NotificationChannelCompat' into 'master'
Use NotificationChannelCompat.

See merge request fdroid/fdroidclient!1070
2022-12-01 08:23:52 +00:00
Isira Seneviratne
41ada062b4 Merge branch 'master' into Use_NotificationChannelCompat 2022-12-01 06:46:51 +05:30
Hans-Christoph Steiner
2d443f118a Merge branch 'privext-installer' into 'master'
PrivilegedInstaller: Set installerPackageName to PrivExt

See merge request fdroid/fdroidclient!1128
2022-11-30 17:06:00 +00:00
Chirayu Desai
b28bb18962 PrivilegedInstaller: Set installerPackageName to PrivExt
* This is what we want it to be, so that apps can be uninstalled
  using PrivExt
* No idea why this was set as null here

Change-Id: I1c82104a047e192beb80877daa0fdaeb39fe870a
2022-11-30 16:38:15 +00:00
Hans-Christoph Steiner
fcc5175980 Merge branch 'upgrade-android-studio' into 'master'
ugprade Android Studio to Dolphin !1135

See merge request fdroid/fdroidclient!1145
2022-11-28 12:22:09 +00: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
Hans-Christoph Steiner
c629d21b56 gradle verification: only contact keyservers when updating metadata
This config should include all the PGP keys needed to verify all the
dependencies used in this build.  This prevents Gradle from contacting PGP
keyservers for regular builds.  Gradle will still contact keyservers when
updating the metadata.

https://docs.gradle.org/current/userguide/dependency_verification.html#sec:local-keyring-only
2022-11-28 09:49:38 +01:00
Hans-Christoph Steiner
206d8407d4 gradle verification: ignored keys are now available on keyservers
I sent some to the keyservers, some key owners have pushed them to
keys.openpgp.net.  Also Google people have started maintaining keyrings:

https://android.googlesource.com/platform/frameworks/support/+/HEAD/gradle/verification-keyring.keys
2022-11-28 09:37:14 +01:00
Hans-Christoph Steiner
9f6f010f5d gradle verification: include all keys in .gpg keyring
for f in 429c8816dea04cdb d4da5eab3cd7e958 d5f4c07a434ab3da 03281aa0289ff53a e0cb7823cfd00fbf 02216ed811210daa 03281aa0289ff53a 056aca74d46000bf 280d66a55f5316c5 3967d4eda591b991 429c8816dea04cdb 4dbf5995d492505d 5f7786df73e61f56 6a65176a0fb1cd0b bf984b4145ea13f7 c1b12a5d99c0729d cb43338e060cf9fa d4da5eab3cd7e958 d5f4c07a434ab3da d89d05374952262b d9c565aa72ba2fdd dea3d207428ef16d e0cb7823cfd00fbf eb380dc13c39f675 fefe78456eddc34a; do gpg --export $f | GNUPGHOME=/tmp/fake gpg --primary-keyring gradle/verification-keyring.gpg --import || GNUPGHOME=/tmp/fake gpg --primary-keyring gradle/verification-keyring.gpg --recv-keys $f || GNUPGHOME=/tmp/fake gpg --primary-keyring gradle/verification-keyring.gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys $f || break; done
2022-11-28 09:37:05 +01:00
Hans-Christoph Steiner
5967bad692 Merge branch 'index-v2-randoms' into 'master'
three random fixes from !1135

See merge request fdroid/fdroidclient!1143
2022-11-25 13:11:34 +00:00
Torsten Grote
5cfdae0719 [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 13:37:38 +01:00
Torsten Grote
477436af68 [app] Don't show unknown (other) anti-features by default 2022-11-25 13:37:36 +01:00
Torsten Grote
8c64ad4707 [db] add test for DefaultUriBuilder 2022-11-25 12:59:00 +01:00
Hans-Christoph Steiner
318f09663a Merge branch 'index-v2-renames' into 'master'
Index v2 renames and removals from !1135

See merge request fdroid/fdroidclient!1142
2022-11-25 11:52:27 +00:00