class UrlMatcher
(source)
Provides functionality to process categorized URL black/white lists and match URLs against these lists.
UrlMatcher(patterns: Array<String>) |
fun matches(resourceURI: String, pageURI: String): Boolean fun matches(resourceURI: Uri, pageURI: Uri): Boolean
Checks if the given page URI is blacklisted for the given resource URI. Returns true if the site (page URI) is allowed to access the resource URI, otherwise false. |
|
fun setCategoriesEnabled(categories: Set<String>): Unit
Enables the provided categories. |
const val ADVERTISING: String |
|
const val ANALYTICS: String |
|
const val CONTENT: String |
|
const val DEFAULT: String |
|
const val DISCONNECT: String |
|
const val SOCIAL: String |
|
const val WEBFONTS: String |
fun createMatcher(context: Context, blackListFile: Int, overrides: IntArray?, whiteListFile: Int, enabledCategories: Set<String> = SUPPORTED_CATEGORIES): UrlMatcher fun createMatcher(black: Reader, overrides: List<Reader>?, white: Reader, enabledCategories: Set<String> = SUPPORTED_CATEGORIES): UrlMatcher
Creates a new matcher instance for the provided URL lists. |
|
fun isWebFont(uri: Uri): Boolean
Checks if the given URI points to a Web font. |