Merge branch '1.22' into 'master'

Prepare 1.22 release

See merge request fdroid/fdroidclient!1491
This commit is contained in:
Hans-Christoph Steiner
2025-01-23 20:25:54 +00:00
25 changed files with 31 additions and 20 deletions

View File

@@ -1,3 +1,9 @@
### 1.22.0 (2025-01-16)
* automatically add newly installed apps to home-screen for most launchers (Thanks Dhina!)
* disable gentle app updates again because of update issues
* some bug fixes
### 1.22.0-alpha0 (2024-12-17)
* use "gentle update" API so apps don't get killed while in use

View File

@@ -32,7 +32,7 @@ android {
compileSdk libs.versions.compileSdk.get().toInteger()
defaultConfig {
versionCode 1022000
versionCode 1022050
versionName getVersionName()
applicationId "org.fdroid"

View File

@@ -16,6 +16,7 @@ import org.fdroid.download.Mirror;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Utils;
import org.fdroid.index.v1.IndexV1UpdaterKt;
import org.fdroid.index.v2.IndexV2UpdaterKt;
import org.junit.Test;
import java.io.File;
@@ -44,24 +45,22 @@ public class HttpDownloaderTest {
// https://developer.android.com/reference/javax/net/ssl/SSLContext
static {
ArrayList<Pair<String, String>> tempUrls = new ArrayList<>(Arrays.asList(
new Pair<>("https://f-droid.org/repo", IndexV1UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://f-droid.org/repo", IndexV2UpdaterKt.SIGNED_FILE_NAME),
// sites that use SNI for HTTPS
new Pair<>("https://mirrors.edge.kernel.org/", "debian/dists/stable/Release"),
new Pair<>("https://fdroid.tetaneutral.net/fdroid/repo/", IndexV1UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://ftp.fau.de/fdroid/repo/", IndexV1UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://ftp.fau.de/fdroid/repo", "dev.lonami.klooni/en-US/phoneScreenshots/1-game.jpg"),
new Pair<>("https://opencolo.mm.fcix.net/fdroid/repo/", "dev.lonami.klooni/en-US/phoneScreenshots/1-game.jpg"),
//new Pair<>("https://microg.org/fdroid/repo/index-v1.jar"),
//new Pair<>("https://grobox.de/fdroid/repo/index.jar"),
new Pair<>("https://guardianproject.info/fdroid/repo", IndexV1UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://guardianproject.info/fdroid/repo", IndexV2UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://en.wikipedia.org", "/wiki/Index.html"), // no SNI but weird ipv6 lookup issues
new Pair<>("https://mirror.cyberbits.eu/fdroid/repo/", IndexV1UpdaterKt.SIGNED_FILE_NAME) // TLSv1.2 only and SNI
new Pair<>("https://mirror.cyberbits.eu/fdroid/repo/", IndexV2UpdaterKt.SIGNED_FILE_NAME) // TLSv1.2 only and SNI
));
if (Build.VERSION.SDK_INT < 26) {
// domains that use Let's Encrypt won't work on Android 7.1 and older
// https://gitlab.com/fdroid/fdroidclient/-/issues/2102
tempUrls = new ArrayList<>(Arrays.asList(
new Pair<>("https://ftp.fau.de/fdroid/repo/", IndexV1UpdaterKt.SIGNED_FILE_NAME),
new Pair<>("https://ftp.gwdg.de/pub/android/fdroid/repo/", IndexV1UpdaterKt.SIGNED_FILE_NAME)
new Pair<>("https://ftp.gwdg.de/pub/android/fdroid/repo", "dev.lonami.klooni/en-US/phoneScreenshots/1-game.jpg")
));
}
URLS = tempUrls;
@@ -88,7 +87,7 @@ public class HttpDownloaderTest {
public void downloadUninterruptedTestWithProgress() throws IOException, InterruptedException {
final CountDownLatch latch = new CountDownLatch(1);
String path = "index.jar";
List<Mirror> mirrors = Mirror.fromStrings(Collections.singletonList("https://ftp.fau.de/fdroid/repo/"));
List<Mirror> mirrors = Mirror.fromStrings(Collections.singletonList("https://ftp.gwdg.de/pub/android/fdroid/repo/"));
receivedProgress = false;
File destFile = File.createTempFile("dl-", "");
final DownloadRequest request = new DownloadRequest(path, mirrors, null, null, null);
@@ -156,7 +155,7 @@ public class HttpDownloaderTest {
public void downloadThenCancel() throws IOException, InterruptedException {
final CountDownLatch latch = new CountDownLatch(2);
String path = "index.jar";
List<Mirror> mirrors = Mirror.fromStrings(Collections.singletonList("https://ftp.fau.de/fdroid/repo/"));
List<Mirror> mirrors = Mirror.fromStrings(Collections.singletonList("https://ftp.gwdg.de/pub/android/fdroid/repo/"));
File destFile = File.createTempFile("dl-", "");
final DownloadRequest request = new DownloadRequest(path, mirrors, null, null, null);
final HttpDownloader httpDownloader = new HttpDownloader(httpManager, request, destFile);
@@ -171,7 +170,7 @@ public class HttpDownloaderTest {
httpDownloader.download();
fail();
} catch (IOException e) {
e.printStackTrace();
Log.e(TAG, "Error downloading: ", e);
fail();
} catch (InterruptedException e) {
// success!

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Repositories at the top have a higher priority than those at the bottom -->
@@ -27,6 +26,9 @@
https://mirrors.dotsrc.org/fdroid/repo
https://opencolo.mm.fcix.net/fdroid/repo
https://plug-mirror.rcac.purdue.edu/fdroid/repo
https://mirror.init7.net/fdroid/repo
https://mirror.freedif.org/fdroid/repo
https://de.freedif.org/fdroid/repo
</item>
<!-- description -->
<item>The official F-Droid Free Software repository. Everything in this repository is always built from the source code.
@@ -65,6 +67,9 @@
https://mirrors.dotsrc.org/fdroid/archive
https://opencolo.mm.fcix.net/fdroid/archive
https://plug-mirror.rcac.purdue.edu/fdroid/archive
https://mirror.init7.net/fdroid/archive
https://mirror.freedif.org/fdroid/archive
https://de.freedif.org/fdroid/archive
</item>
<!-- description -->
<item>The archive repository of the F-Droid client. This contains older versions of
@@ -83,4 +88,4 @@
</string-array>
</resources>
</resources>

View File

@@ -12,15 +12,16 @@ import kotlin.test.assertFailsWith
class HttpManagerIntegrationTest {
private val userAgent = getRandomString()
private val mirrors = listOf(Mirror("https://example.org"), Mirror("https://example.net/"))
private val downloadRequest = DownloadRequest("", mirrors)
private val mirrors =
listOf(Mirror("https://f-droid.org/"), Mirror("https://cloudflare.f-droid.org/"))
private val downloadRequest = DownloadRequest(".well-known/security.txt", mirrors)
@Test
fun testResumeOnExample() = runSuspend {
val httpManager = HttpManager(userAgent, null)
val lastLine = httpManager.getBytes(downloadRequest, 1248).decodeToString()
assertEquals("</html>\n", lastLine)
val lastLine = httpManager.getBytes(downloadRequest, 974).decodeToString()
assertEquals("-----END PGP SIGNATURE-----\n", lastLine)
}
@Test
@@ -33,7 +34,7 @@ class HttpManagerIntegrationTest {
}
assertEquals("Failed to connect to /127.0.0.1:80", e.message)
val lastLine = httpManager.getBytes(downloadRequest, 1248).decodeToString()
assertEquals("</html>\n", lastLine)
val lastLine = httpManager.getBytes(downloadRequest, 974).decodeToString()
assertEquals("-----END PGP SIGNATURE-----\n", lastLine)
}
}

View File

@@ -1,5 +1,5 @@
* use "gentle update" API so apps don't get killed while in use
* experimental support for un-archiving apps on Android 15
* automatically add newly installed apps to home-screen for most launchers (Thanks Dhina!)
* separate share link and share file actions in app details
* show toast when APK has more permissions than expected
* clean internal caches more often to free up space (Thanks DerGenaue!)