Added in API level 33

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

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

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

Added in API level 33
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 one of the following:
flags Int: The optional behavior flags.
Value is either 0 or a combination of the following:

Public methods

describeContents

Added in API level 33
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getComponentName

Added in API level 33
fun getComponentName(): ComponentName?

The component name of the application to enable the setting.

Return
ComponentName? This value may be null.

getEnabledFlags

Added in API level 33
fun getEnabledFlags(): Int

The optional behavior flag

Return
Int Value is either 0 or a combination of the following:

writeToParcel

Added in API level 33
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 the following:

Properties