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

<init>

SafeIntent(unsafe: Intent)

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

action

val action: String?

categories

val categories: Set<String>?

data

val data: Uri?

dataString

val dataString: String?

extras

val extras: Bundle?

flags

val flags: Int

isLauncherIntent

val isLauncherIntent: Boolean

unsafe

val unsafe: Intent

Functions

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 : Parcelable> getParcelableArrayListExtra(name: String): ArrayList<T>?

getParcelableExtra

fun <T : Parcelable> getParcelableExtra(name: String): T?

getStringArrayListExtra

fun getStringArrayListExtra(name: String): ArrayList<String>?

getStringExtra

fun getStringExtra(name: String): String?

hasExtra

fun hasExtra(name: String): Boolean