don't crash when manually adding a repo by typing it in
closes #1448 fdroid/fdroidclient!664 c83c8301e6ccca7ee408c7b4b898e81f6c23e222
This commit is contained in:
parent
e05e306006
commit
0b3e52a924
@ -715,9 +715,14 @@ public class ManageReposActivity extends AppCompatActivity
|
||||
path = path.substring(0, path.length() - 1);
|
||||
}
|
||||
}
|
||||
return new URI(uri.getScheme().toLowerCase(Locale.ENGLISH),
|
||||
String scheme = uri.getScheme();
|
||||
String host = uri.getHost();
|
||||
if (TextUtils.isEmpty(scheme) || TextUtils.isEmpty(host)) {
|
||||
return urlString;
|
||||
}
|
||||
return new URI(scheme.toLowerCase(Locale.ENGLISH),
|
||||
uri.getUserInfo(),
|
||||
uri.getHost().toLowerCase(Locale.ENGLISH),
|
||||
host.toLowerCase(Locale.ENGLISH),
|
||||
uri.getPort(),
|
||||
path,
|
||||
uri.getQuery(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user