AppDetails: don't mangle spdx link.

Stripping the `+` form the license link will direct to the wrong spdx
page. (This would also need changing anyway because of spdx v4.0.0)

closes fdroid/fdroidclient#1472
This commit is contained in:
Marcus Hoffmann 2018-05-17 00:55:57 +02:00
parent 63812715aa
commit 724234ef09
No known key found for this signature in database
GPG Key ID: ACDF63BC43D5E530

View File

@ -837,9 +837,6 @@ public class AppDetailsRecyclerViewAdapter
// License link // License link
if (!TextUtils.isEmpty(app.license)) { if (!TextUtils.isEmpty(app.license)) {
String firstLicense = app.license.split(",")[0]; String firstLicense = app.license.split(",")[0];
if (firstLicense.endsWith("+")) { // the + is SPDX syntax on top of the license name
firstLicense = firstLicense.substring(0, firstLicense.length() - 1);
}
String url = "https://spdx.org/licenses/" + firstLicense + ".html"; String url = "https://spdx.org/licenses/" + firstLicense + ".html";
if (uriIsSetAndCanBeOpened(url)) { if (uriIsSetAndCanBeOpened(url)) {
addLinkItemView(contentView, R.string.menu_license, R.drawable.ic_license, url, app.license); addLinkItemView(contentView, R.string.menu_license, R.drawable.ic_license, url, app.license);