Install from bintray on Android 7 and later

This commit is contained in:
Fredrik Fornwall
2019-04-03 23:02:15 +02:00
parent e4220a7ab1
commit 70a786613d

View File

@@ -170,7 +170,10 @@ final class TermuxInstaller {
/** Get bootstrap zip url for this systems cpu architecture. */
private static URL determineZipUrl() throws MalformedURLException {
String archName = determineTermuxArchName();
return new URL("https://termux.net/bootstrap/bootstrap-" + archName + ".zip");
String url = Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
? "https://bintray.com/termux/bootstrap/download_file?file_path=bootstrap-" + archName + ".zip"
: "https://termux.net/bootstrap/bootstrap-" + archName + ".zip";
return new URL(url);
}
private static String determineTermuxArchName() {