android-components / mozilla.components.support.utils

Package mozilla.components.support.utils

Types

ColorUtils

object ColorUtils

DownloadUtils

object DownloadUtils

DrawableUtils

object DrawableUtils

SafeBundle

class SafeBundle

See SafeIntent for more background: applications can put garbage values into Bundles. This is primarily experienced when there's garbage in the Intent's Bundle. However that Bundle can contain further bundles, and we need to handle those defensively too.

SafeIntent

class SafeIntent

External applications can pass values into Intents that can cause us to crash: in defense, we wrap Intent and catch the exceptions they may force us to throw. See bug 1090385 for more.

StatusBarUtils

object StatusBarUtils

ThreadUtils

object ThreadUtils

WebURLFinder

class WebURLFinder

Regular expressions used in this class are taken from Android's Patterns.java. We brought them in to standardize URL matching across Android versions, instead of relying on Android version-dependent built-ins that can vary across Android versions. The original code can be found here: http://androidxref.com/8.0.0_r4/xref/frameworks/base/core/java/android/util/Patterns.java

Properties

WWW_PREFIX_OFFSET

const val WWW_PREFIX_OFFSET: Int

Functions

segmentAwareDomainMatch

fun segmentAwareDomainMatch(query: String, urls: Iterable<String>): String?