Commit Graph

53 Commits

Author SHA1 Message Date
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
Torsten Grote
8c64ad4707 [db] add test for DefaultUriBuilder 2022-11-25 12:59:00 +01:00
Torsten Grote
38e7bce982 Rename EntryV2 to Entry as requested by Hans in #2443 2022-11-25 12:24:33 +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
Torsten Grote
1608502569 [index] move v1 tests from app to index
and allow permission arrays of larger size for v1
2022-11-24 20:53:19 +01:00
Torsten Grote
4d3e03b89c [download] Fix double slash in repo URLs causing redirect exceptions 2022-11-24 20:53:17 +01: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
Hans-Christoph Steiner
40fdccf262 purge gradle-witness until it is compatible with 'implementation'
https://github.com/signalapp/gradle-witness/issues/27
2018-04-23 12:57:18 +02:00
Daniel Martí
6d579368af Start using gradle-witness
Fixes #429.
2015-09-25 22:00:24 -07:00
Daniel Martí
06dd4c8dcb Move F-Droid project into subdir, keeping a root gradle project
Also improved .gitignore a tad
2014-12-09 15:36:07 +01:00
Daniel Martí
9f0873a3af Update support-v4 to 21.0.1 2014-11-05 20:59:04 +01:00
Daniel Martí
414c4e0c67 Use zxing-core from source in both ant and gradle
Also, temporarily remove zipsigner from ant until spongycastle is added to it
so that ant builds work
2014-05-25 13:39:56 +02:00
Hans-Christoph Steiner
c819d56f18 add link to SDK references for android-support jar
I tried lots of things to make it more general, but the implementation of
this jar properties file is just too simple, so no variables can be used.

I renamed the other files related to android-support to match the naming
scheme.
2014-05-15 14:32:16 -04:00
Hans-Christoph Steiner
3caec653e5 generate QR Codes internally based on ZXing's core.jar
This app needs to be able to generate QR Codes regardless of what other
app might be installed, so zxing's core.jar needs to be embedded in this
app.

This also includes two classes which are modified versions of ZXing classes
that allow the generation of QR Codes without the Barcode Scanner app being
installed:
https://stackoverflow.com/questions/4782543/integration-zxing-library-directly-into-my-android-application

The classes are src/com/google/zxing/encode/Contents.java which is a copy
of zxing/android/src/com/google/zxing/client/android/Contents.java; and
src/com/google/zxing/encode/QRCodeEncoder.java which is a heavily stripped
and modified version of
zxing/android/src/com/google/zxing/client/android/encode/QRCodeEncoder.java

refs #3204 https://dev.guardianproject.info/issues/3204
refs #2470 https://dev.guardianproject.info/issues/2470
2014-05-05 19:37:37 -04:00
Daniel Martí
34d7172ad6 Bump support lib from 19.0 to 19.1 2014-04-06 11:03:14 +02:00
Daniel Martí
ddfbcff0cb Bump support-v4 to r19 2013-11-10 18:55:35 +01:00
Daniel Martí
560b7392cf Bump support library from r13 to r18 2013-08-22 17:44:43 +02:00