Use better filename for apk files shared via hotspot

This commit is contained in:
Sebastian Kürten
2021-05-21 13:14:12 +02:00
committed by Torsten Grote
parent ab6b83d4fa
commit 1c056160e1

View File

@@ -2,6 +2,7 @@ package org.briarproject.briar.android.hotspot;
import android.content.Context;
import org.briarproject.briar.BuildConfig;
import org.briarproject.briar.R;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
@@ -77,10 +78,13 @@ public class WebServer extends NanoHTTPD {
}
String app = ctx.getString(R.string.app_name);
String appV = app + " " + VERSION_NAME;
String filename = "briar" + (BuildConfig.DEBUG ? "-debug-" : "-") +
VERSION_NAME + ".apk";
doc.select("#download_title").first()
.text(ctx.getString(R.string.website_download_title, appV));
doc.select("#download_intro").first()
.text(ctx.getString(R.string.website_download_intro, app));
doc.select(".button").first().attr("href", filename);
doc.select("#download_button").first()
.text(ctx.getString(R.string.website_download_title, app));
doc.select("#download_outro").first()