@Test public void testNormalize() { assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("file: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: assertEquals("http: }
public static String normalize(@NonNull String input) { String trimmedInput = input.trim(); Uri uri = Uri.parse(trimmedInput); if (TextUtils.isEmpty(uri.getScheme())) { uri = Uri.parse("http: } return uri.toString(); }
UrlUtils { public static String normalize(@NonNull String input) { String trimmedInput = input.trim(); Uri uri = Uri.parse(trimmedInput); if (TextUtils.isEmpty(uri.getScheme())) { uri = Uri.parse("http: } return uri.toString(); } }
UrlUtils { public static String normalize(@NonNull String input) { String trimmedInput = input.trim(); Uri uri = Uri.parse(trimmedInput); if (TextUtils.isEmpty(uri.getScheme())) { uri = Uri.parse("http: } return uri.toString(); }  }
UrlUtils { public static String normalize(@NonNull String input) { String trimmedInput = input.trim(); Uri uri = Uri.parse(trimmedInput); if (TextUtils.isEmpty(uri.getScheme())) { uri = Uri.parse("http: } return uri.toString(); }  static String normalize(@NonNull String input); static boolean isUrl(String url); static boolean isValidSearchQueryUrl(String url); static boolean isHttpOrHttps(String url); static String createSearchUrl(Context context, String searchTerm); static String stripUserInfo(@Nullable String url); static boolean isPermittedResourceProtocol(@Nullable final String scheme); static boolean isSupportedProtocol(@Nullable final String scheme); static boolean isInternalErrorURL(final String url); static boolean urlsMatchExceptForTrailingSlash(final String url1, final String url2); static String stripCommonSubdomains(@Nullable String host); static String stripScheme(@Nullable String url); static String stripSchemeAndSubDomain(String url); static boolean isLocalizedContent(@Nullable String url); }
UrlUtils { public static String normalize(@NonNull String input) { String trimmedInput = input.trim(); Uri uri = Uri.parse(trimmedInput); if (TextUtils.isEmpty(uri.getScheme())) { uri = Uri.parse("http: } return uri.toString(); }  static String normalize(@NonNull String input); static boolean isUrl(String url); static boolean isValidSearchQueryUrl(String url); static boolean isHttpOrHttps(String url); static String createSearchUrl(Context context, String searchTerm); static String stripUserInfo(@Nullable String url); static boolean isPermittedResourceProtocol(@Nullable final String scheme); static boolean isSupportedProtocol(@Nullable final String scheme); static boolean isInternalErrorURL(final String url); static boolean urlsMatchExceptForTrailingSlash(final String url1, final String url2); static String stripCommonSubdomains(@Nullable String host); static String stripScheme(@Nullable String url); static String stripSchemeAndSubDomain(String url); static boolean isLocalizedContent(@Nullable String url);  }