Commit Graph

7790 Commits

Author SHA1 Message Date
Oymate
faa87f285f Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>
Currently translated at 100.0% (497 of 497 strings)

Translated using Weblate: Bengali (bn) by Oymate <dhruboadittya96@gmail.com>

Currently translated at 100.0% (497 of 497 strings)

Co-authored-by: Oymate <dhruboadittya96@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/bn/
Translation: F-Droid/F-Droid
2022-11-21 17:00:32 +01:00
Mohammed Anas
40d2572833 Translated using Weblate: Arabic (ar) by Mohammed Anas <triallax@tutanota.com>
Currently translated at 100.0% (497 of 497 strings)

Translated using Weblate: Arabic (ar) by Mohammed Anas <triallax@tutanota.com>

Currently translated at 100.0% (497 of 497 strings)

Translated using Weblate: Arabic (ar) by Mohammed Anas <triallax@tutanota.com>

Currently translated at 100.0% (497 of 497 strings)

Co-authored-by: Mohammed Anas <triallax@tutanota.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2022-11-21 17:00:32 +01:00
Rex_sa
e835e897c1 Translated using Weblate: Arabic (ar) by Rex_sa <rex.sa@pm.me>
Currently translated at 100.0% (497 of 497 strings)

Co-authored-by: Rex_sa <rex.sa@pm.me>
Translate-URL: https://hosted.weblate.org/projects/f-droid/f-droid/ar/
Translation: F-Droid/F-Droid
2022-11-21 17:00:32 +01:00
Hans-Christoph Steiner
02c08dcc08 Merge branch 'tiramisu-split-perms' into 'master'
Handle API 33 split-permissions

See merge request fdroid/fdroidclient!1129
2022-11-18 08:59:10 +00:00
Chirayu Desai
54205b00c6 Handle API 33 split-permissions
* https://developer.android.com/about/versions/13/behavior-changes-13#body-sensors-background-permission
* https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions

13 Beta4 GSI:
* https://dumps.tadiphone.dev/dumps/google/generic/-/blob/gsi_gms_arm64-user-13-TPB4.220624.005-8812298-release-keys/system/system/etc/permissions/platform.xml

TODO: Wait for android13 source drop for link to fw/b
Issue: calyxos#1088
Change-Id: I7c3cd17f2a99b667ff085e7cb0a8ec34010c9289
2022-11-18 08:32:05 +00:00
Hans-Christoph Steiner
23bfbace5e Merge branch 'fix-nightly' into 'master'
Fix canonical nightly repo URL

See merge request fdroid/fdroidclient!1138
2022-11-11 08:11:20 +00:00
Torsten Grote
b19f751c9f Fix canonical nightly repo URL
The old one doesn't work without redirects anymore.

fdroidserver!1163
fdroidserver@c6cf0468ede269d52b95c70a854d6987cb13c577
2022-11-11 08:37:38 +01:00
Hans-Christoph Steiner
53c550eb72 Merge branch 'app-icon-no-repo-crash' into 'master'
Fix crash when loading icons for apps without repo

Closes #2437

See merge request fdroid/fdroidclient!1130
2022-10-24 16:37:34 +00:00
Torsten Grote
9a0761b7f5 [app] Fix crash when loading icons for apps without repo
Happens in panic settings for apps that should get uninstalled.
2022-10-24 16:37:26 +00:00
Michael Pöhn
88d5ad2480 Merge branch 'db-library' into 'master'
Add a new database library for Index V2 and diffs

See merge request fdroid/fdroidclient!1132
2022-09-12 11:20:53 +00:00
Torsten Grote
7d84689068 [db] Verify that v2 files start with /
and add a DbV2StreamReceiverTest for it
2022-09-12 09:46:15 +00: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
f9f81dc894 [db] Allow use of IndexV1Updater with v2 repos 2022-09-12 09:46:15 +00:00
Torsten Grote
3a012e2d2d [db] Use constants for Room table names 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
Torsten Grote
a6bce15116 [db] clean up public API and docs 2022-09-12 09:46:15 +00:00
Torsten Grote
517e646497 [db] add dokka for generation of docs 2022-09-12 09:46:15 +00:00
Torsten Grote
28fa5fd46e [db] add search support with FTS4
FTS5 isn't supported by Room because old Android devices ship only with sqlite with FTS4
2022-09-12 09:46:15 +00:00
Torsten Grote
01381c268d [db] remove getBestLocale() as it was moved to index lib 2022-09-12 09:46:15 +00:00
Torsten Grote
61b9ffe4f5 [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-09-12 09:46:15 +00:00
Torsten Grote
7c5485f958 [db] clean up RepositoryDao and add more tests 2022-09-12 09:46:15 +00:00
Torsten Grote
e0cabc449d [db] simplify app queries and add more tests for AppDao 2022-09-12 09:46:15 +00:00
Torsten Grote
7fe3f9c2c1 [db] Add more tests (for locales, IndexV1, etc.) 2022-09-12 09:46:15 +00:00
Torsten Grote
0a88975c27 [db] improve loading of versions
faster permission loading and more tests
2022-09-12 09:46:15 +00:00
Torsten Grote
db275bf218 [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-09-12 09:46:15 +00:00
Torsten Grote
890dc45718 [db] Implement interfaces from index library
so we can use UpdateChecker and CompatibilityChecker with our DB classes
2022-09-12 09:46:15 +00:00
Torsten Grote
55d78fab01 [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-09-12 09:46:15 +00:00
Torsten Grote
93ff390f07 [db] Implement diffing via DbV2DiffStreamReceiver 2022-09-12 09:46:15 +00:00
Torsten Grote
aecff91dda [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-09-12 09:46:15 +00:00
Torsten Grote
28df05c2c1 [db] use prefix and postfix when serializing lists of strings into the DB
This makes for safer LIKE queries
2022-09-12 09:46:15 +00:00
Torsten Grote
b6fb74a1fe [db] remove grouping of author and donation fields
at the explicit request of Hans who feels strongly about it.
2022-09-12 09:46:15 +00:00
Torsten Grote
94aa1d9824 [db] Add webBaseUrl to Repository
and test another auto-migration with it
2022-09-12 09:46:15 +00:00
Torsten Grote
9e03f1290d [db] allow clearing all repos
used for panic responder in F-Droid
2022-09-12 09:46:15 +00:00
Torsten Grote
1beb6d5bb2 [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-09-12 09:46:15 +00:00
Torsten Grote
770ed6ae81 [db] Add app preferences and let UpdateChecker use them 2022-09-12 09:46:15 +00:00
Torsten Grote
691cd7242d [db] Let UpdateChecker also check for known vulnerabilities 2022-09-12 09:46:15 +00:00
Torsten Grote
536607da22 [db] store localized name and summary in DB
otherwise we can't really sort *all* apps by name in an efficient manner
2022-09-12 09:46:15 +00:00
Torsten Grote
5a015fca3a [db] Enable strict API mode and ktlint for database library 2022-09-12 09:46:15 +00:00
Torsten Grote
a4da725772 [db] Store repo version in DB 2022-09-12 09:46:15 +00:00
Torsten Grote
c4c49b7072 Use sharedTest sourceSet from index library instead own TestUtils 2022-09-12 09:46:15 +00:00
Torsten Grote
4df60a42c8 [db] Calculate app compatibility in DB
and remove feature version as it app can't even use that.

Compatibility checking has been added to the DB layer as a post-processing step only because the UI wants to query for that on the app level (which would need all APKs).
2022-09-12 09:46:15 +00:00
Torsten Grote
3cb7538fc8 [db] Add special queries for AppListItems 2022-09-12 09:46:15 +00:00
Torsten Grote
97567a2057 [db] Add UpdateChecker
Doing the actual update check is more work than it would be with keeping info about all installed apps in the DB. However, this way, we don't need to keep that info in sync with reality. Also, we need to check for updates only after updating repos, so there we are on a worker thread already anyway and an spare an extra second.
2022-09-12 09:46:15 +00:00
Torsten Grote
55a446fe64 [db] Allow pre-populating the database via onCreate callback
Also add more methods for managing repos and improve selecting apps from repos
2022-09-12 09:46:15 +00:00
Torsten Grote
44ceaa6842 [db] Add a method for getting an app without specifying the repoId 2022-09-12 09:46:15 +00:00
Torsten Grote
5908789c29 [db] Add repo preferences as separate table
and use it in IndexV1Updater
2022-09-12 09:46:15 +00:00
Torsten Grote
50bb9ce60c [db] Prepare DB for use by UI
Add AppOverviewItem and certificates for repos
2022-09-12 09:46:15 +00:00
Torsten Grote
95266df96a [db] Add simple IndexV1Updater (not in final form)
just to be able to get a real DB into the app for further testing
2022-09-12 09:46:15 +00:00
Torsten Grote
a445bee197 [db] Add support for apps and streaming 2022-09-12 09:46:15 +00:00
Torsten Grote
ca6da651ec [db] First prototype 2022-09-12 09:46:15 +00:00