android-components / mozilla.components.support.utils / SafeIntent

SafeIntent

class SafeIntent (source)

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.

Constructors

Name Summary
<init> SafeIntent(unsafe: <ERROR CLASS>)
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.

Properties

Name Summary
action val action: String?
categories val categories: Set<String>?
data val data: <ERROR CLASS>?
dataString val dataString: String?
extras val extras: <ERROR CLASS>?
flags val flags: Int
isLauncherIntent val isLauncherIntent: Boolean
unsafe val unsafe: <ERROR CLASS>

Functions

Name Summary
getBooleanExtra fun getBooleanExtra(name: String, defaultValue: Boolean): Boolean
getBundleExtra fun getBundleExtra(name: String): SafeBundle?
getCharSequenceExtra fun getCharSequenceExtra(name: String): CharSequence?
getIntExtra fun getIntExtra(name: String, defaultValue: Int): Int
getParcelableArrayListExtra fun <T> getParcelableArrayListExtra(name: String): ArrayList<T>?
getParcelableExtra fun <T> getParcelableExtra(name: String): T?
getStringArrayListExtra fun getStringArrayListExtra(name: String): ArrayList<String>?
getStringExtra fun getStringExtra(name: String): String?
hasExtra fun hasExtra(name: String): Boolean

Extension Functions

Name Summary
getSessionId fun SafeIntent.getSessionId(): String?
Retrieves mozilla.components.browser.session.Session ID from the intent.