Added a fix for a url that arrives sans 'http://', which would cause failure.

This commit is contained in:
PhotonQyv 2017-11-29 11:32:08 +00:00
parent 0c6f7f9a1b
commit 8433fdc8c2
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ public class RetrieveMetaDataAsyncTask extends AsyncTask<Void, Void, Void> {
String potentialUrl = "";
try {
Matcher matcher;
if (url.startsWith("www."))
url = "http://" + url;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT)
matcher = Patterns.WEB_URL.matcher(url);
else