WallpaperDescription


class WallpaperDescription : Parcelable

Describes a wallpaper, including associated metadata and optional content to be used by its android.service.wallpaper.WallpaperService.Engine, the ComponentName to be used by android.app.WallpaperManager, and an optional id to differentiate between different distinct wallpapers rendered by the same wallpaper service.

This class is used to communicate among a wallpaper rendering service, a wallpaper chooser UI, and android.app.WallpaperManager. This class describes a specific instance of a live wallpaper, unlike WallpaperInfo which is common to all instances of a wallpaper component. Each WallpaperDescription can have distinct metadata.

Summary

Nested classes

Builder for the immutable WallpaperDescription class

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

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

equals

fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getComponent

fun getComponent(): ComponentName?
Return
ComponentName? the component for this wallpaper, or null for a static wallpaper

getContent

fun getContent(): PersistableBundle
Return
PersistableBundle any additional content required to render this wallpaper

getContextDescription

fun getContextDescription(): CharSequence?
Return
CharSequence? the description for the action associated with the wallpaper, or null if not provided

getContextUri

fun getContextUri(): Uri?
Return
Uri? the Uri for the action associated with the wallpaper, or null if not provided

getDescription

fun getDescription(): MutableList<CharSequence!>
Return
MutableList<CharSequence!> the description for this wallpaper, with each list element intended to be shown on a separate line in the UI

getId

fun getId(): String?
Return
String? the id for this wallpaper, or null if not provided

getThumbnail

fun getThumbnail(): Uri?
Return
Uri? the thumbnail for this wallpaper, or null if not provided

getTitle

fun getTitle(): CharSequence?
Return
CharSequence? the title for this wallpaper, or null if not provided

hashCode

fun hashCode(): Int
Return
Int a hash code value for this object.

toBuilder

fun toBuilder(): WallpaperDescription.Builder

Convert the current description to a Builder.

Return
WallpaperDescription.Builder the Builder representing this description

writeToParcel

fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. 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<WallpaperDescription!>