Skip to content

Tests and slight improvements for multi-sig support when calculating suggested versions.

Working towards multi-sig support. This adds tests and makes a change to the suggested version code query to ensure that apks with a different signature to the installed app do not end up being "suggested" to the user.

It also drops the primary key from fdroid_apk which used to be a composite of appId + versionCode + repoId. This is no longer relevant or correct, so instead it now just uses the default rowid provided by sqlite for the primary key.

Note that although the tests work, the actual client will appear broken due to #1052 (closed). I don't think that needs to stop this being reviewed and merged though.

Related to but not sufficient to complete #740 (closed).

Things that still need doing which are broken with multi-sig (but which are not made any worse by this MR) are:

  • When touching "Install" in AppDetails, it does the following to get the apk to install: ApkProvider.Helper.findApkFromAnyRepo(this, app.packageName, app.suggestedVersionCode);. Each place where there is an assumption that packageName + app.suggestedVersionCode is enough to find the suggested apk is no longer suitable. They also need to take into account ``app.installedSig` or something.
Edited by username-removed-25042

Merge request reports