import java.io.FileNotFoundException;\r
import java.io.IOException;\r
import java.io.InputStream;\r
+import java.net.MalformedURLException;\r
import java.net.URL;\r
import java.util.ArrayList;\r
import java.util.Arrays;\r
\r
public String getShortDescription() {\r
\r
- // TODO extract domain from URL and add to UiName if not present.\r
-\r
if (mUiName != null && mUiName.length() > 0) {\r
- return mUiName;\r
+\r
+ String host = "malformed URL";\r
+\r
+ try {\r
+ URL u = new URL(mUrl);\r
+ host = u.getHost();\r
+ } catch (MalformedURLException e) {\r
+ }\r
+\r
+ return String.format("%1$s (%2$s)", mUiName, host);\r
+\r
}\r
return mUrl;\r
}\r