ComponentEnabledSetting
class ComponentEnabledSetting : Parcelable
| kotlin.Any | |
| ↳ | android.content.pm.PackageManager.ComponentEnabledSetting |
The class containing the enabled setting of a package component.
This is used by the setComponentEnabledSettings(java.util.List) to support the batch updates of the enabled settings of components.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
ComponentEnabledSetting(componentName: ComponentName, newState: Int, flags: Int)Create an instance of the ComponentEnabledSetting for the component level's enabled setting update. |
|
| Public methods | |
|---|---|
| Int | |
| ComponentName? |
The component name of the application to enable the setting. |
| Int |
The optional behavior flag |
| Int |
The new enabled state |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<PackageManager.ComponentEnabledSetting!> | |
Public constructors
ComponentEnabledSetting
ComponentEnabledSetting(
componentName: ComponentName,
newState: Int,
flags: Int)
Create an instance of the ComponentEnabledSetting for the component level's enabled setting update.
| Parameters | |
|---|---|
componentName |
ComponentName: The component name to update the enabled setting. This value cannot be null. |
newState |
Int: The new enabled state. Value is android.content.pm.PackageManager#COMPONENT_ENABLED_STATE_DEFAULT, android.content.pm.PackageManager#COMPONENT_ENABLED_STATE_ENABLED, android.content.pm.PackageManager#COMPONENT_ENABLED_STATE_DISABLED, android.content.pm.PackageManager#COMPONENT_ENABLED_STATE_DISABLED_USER, or android.content.pm.PackageManager#COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED |
flags |
Int: The optional behavior flags. Value is either 0 or a combination of android.content.pm.PackageManager#DONT_KILL_APP, and android.content.pm.PackageManager#SYNCHRONOUS |
Public methods
describeContents
fun describeContents(): Int
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getComponentName
fun getComponentName(): ComponentName?
The component name of the application to enable the setting.
| Return | |
|---|---|
ComponentName? |
This value may be null. |
getEnabledFlags
fun getEnabledFlags(): Int
The optional behavior flag
| Return | |
|---|---|
Int |
Value is either 0 or a combination of android.content.pm.PackageManager#DONT_KILL_APP, and android.content.pm.PackageManager#SYNCHRONOUS |
getEnabledState
fun getEnabledState(): Int
The new enabled state
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static val CREATOR: Parcelable.Creator<PackageManager.ComponentEnabledSetting!>