android-components / mozilla.components.support.utils

Package mozilla.components.support.utils

Types

Name Summary
Browsers class Browsers
Helpful tools for dealing with other browsers on this device.
ColorUtils object ColorUtils
DomainMatch data class DomainMatch
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
StorageUtils object StorageUtils
ThreadUtils object ThreadUtils
URLStringUtils object URLStringUtils
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

Functions

Name Summary
asForegroundServicePendingIntent fun <ERROR CLASS>.asForegroundServicePendingIntent(context: <ERROR CLASS>): <ERROR CLASS>
Create a PendingIntent instance to run a certain service described with the Intent.
segmentAwareDomainMatch fun segmentAwareDomainMatch(query: String, urls: Iterable<String>): DomainMatch?
toSafeBundle fun <ERROR CLASS>.toSafeBundle(): <ERROR CLASS>
Returns a SafeBundle for the given Bundle.
toSafeIntent fun <ERROR CLASS>.toSafeIntent(): SafeIntent
Returns a SafeIntent for the given Intent.