PictureProfile


public final class PictureProfile
extends Object implements Parcelable

java.lang.Object
   ↳ android.media.quality.PictureProfile


Profile for picture quality.

Summary

Nested classes

class PictureProfile.Builder

A builder for PictureProfile

Constants

int ERROR_DUPLICATE

Error code for creating a profile with existing profile type and name.

int ERROR_INVALID_ARGUMENT

Error code for invalid argument.

int ERROR_NOT_ALLOWLISTED

Error code for the case when an operation requires an allowlist but the caller is not in the list.

int ERROR_NO_PERMISSION

Error code for missing necessary permission to handle the profiles.

int ERROR_UNKNOWN

Error code for unknown errors.

String NAME_DEFAULT

Name for the default picture profile.

String NAME_ENERGY_SAVING

Name for the energy saving picture profile.

String NAME_GAME

Name for the game picture profile.

String NAME_MOVIE

Name for the movie picture profile.

String NAME_SPORTS

Name for the sports picture profile.

String NAME_STANDARD

Name for the standard picture profile.

String NAME_UNKNOWN

Name for an unknown picture profile.

String NAME_USER

Name for the user-defined picture profile.

String NAME_VIVID

Name for the vivid picture profile.

int TYPE_APPLICATION

Application profile type.

int TYPE_SYSTEM

System profile type.

Inherited constants

Fields

public static final Creator<PictureProfile> CREATOR

Public methods

int describeContents()

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

String getInputId()

Gets the input ID if the profile is for a TV input.

String getName()

Gets the profile name.

String getPackageName()

Gets the package name of this profile.

PersistableBundle getParameters()

Gets the parameters of this profile.

String getProfileId()

Gets profile ID.

int getProfileType()

Gets profile type.

Map<StringPersistableBundle> getStreamStatusVariants()

Gets the stream status variant parameters.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

ERROR_DUPLICATE

Added in API level 36
public static final int ERROR_DUPLICATE

Error code for creating a profile with existing profile type and name.

Constant Value: 2 (0x00000002)

ERROR_INVALID_ARGUMENT

Added in API level 36
public static final int ERROR_INVALID_ARGUMENT

Error code for invalid argument.

Constant Value: 3 (0x00000003)

ERROR_NOT_ALLOWLISTED

Added in API level 36
public static final int ERROR_NOT_ALLOWLISTED

Error code for the case when an operation requires an allowlist but the caller is not in the list.

Constant Value: 4 (0x00000004)

ERROR_NO_PERMISSION

Added in API level 36
public static final int ERROR_NO_PERMISSION

Error code for missing necessary permission to handle the profiles.

Constant Value: 1 (0x00000001)

ERROR_UNKNOWN

Added in API level 36
public static final int ERROR_UNKNOWN

Error code for unknown errors.

Constant Value: 0 (0x00000000)

NAME_DEFAULT

Added in API level 37
public static final String NAME_DEFAULT

Name for the default picture profile.

This profile represents the system's baseline configuration and is used when no specific profile is selected.

Constant Value: "default"

NAME_ENERGY_SAVING

Added in API level 37
public static final String NAME_ENERGY_SAVING

Name for the energy saving picture profile.

This profile is optimized to reduce power consumption, often by lowering backlight intensity or brightness.

Constant Value: "energy_saving"

NAME_GAME

Added in API level 37
public static final String NAME_GAME

Name for the game picture profile.

This profile is typically optimized for gaming, often prioritizing low latency and minimizing post-processing effects.

Constant Value: "game"

NAME_MOVIE

Added in API level 37
public static final String NAME_MOVIE

Name for the movie picture profile.

This profile is typically optimized for cinematic content, often aligning with standard cinema color temperatures and gamma curves.

Constant Value: "movie"

NAME_SPORTS

Added in API level 37
public static final String NAME_SPORTS

Name for the sports picture profile.

This profile is typically optimized for fast-motion content, such as sporting events, to reduce motion blur.

Constant Value: "sports"

NAME_STANDARD

Added in API level 37
public static final String NAME_STANDARD

Name for the standard picture profile.

This profile is typically optimized for general viewing conditions and standard content types.

Constant Value: "standard"

NAME_UNKNOWN

Added in API level 37
public static final String NAME_UNKNOWN

Name for an unknown picture profile.

This value is used to represent a profile name that is not recognized by the current version of the SDK. It serves as a fallback to ensure backwards compatibility when new profile names are introduced in future platform versions.

Constant Value: "unknown"

NAME_USER

Added in API level 37
public static final String NAME_USER

Name for the user-defined picture profile.

This profile represents custom settings configured by the user.

Constant Value: "user"

NAME_VIVID

Added in API level 37
public static final String NAME_VIVID

Name for the vivid picture profile.

This profile typically emphasizes color saturation and contrast to create a more vibrant image.

Constant Value: "vivid"

TYPE_APPLICATION

Added in API level 36
public static final int TYPE_APPLICATION

Application profile type.

A profile of application type is managed by the package returned by getPackageName().

Constant Value: 2 (0x00000002)

TYPE_SYSTEM

Added in API level 36
public static final int TYPE_SYSTEM

System profile type.

A profile of system type is managed by the system, and readable to the package returned by getPackageName().

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 36
public static final Creator<PictureProfile> CREATOR

Public methods

describeContents

Added in API level 36
public int describeContents ()

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(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

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

getInputId

Added in API level 36
public String getInputId ()

Gets the input ID if the profile is for a TV input.

Returns
String the corresponding TV input ID; null if the profile is not associated with a TV input.

getName

Added in API level 36
public String getName ()

Gets the profile name.

Returns
String

getPackageName

Added in API level 36
public String getPackageName ()

Gets the package name of this profile.

The package name defines the user of a profile. Only this specific package and system app can access to this profile.

Returns
String the package name; null if the profile is built locally using Builder and the package is not set.

getParameters

Added in API level 36
public PersistableBundle getParameters ()

Gets the parameters of this profile.

The keys of commonly used parameters can be found in MediaQualityContract.PictureQuality.

Returns
PersistableBundle The profile parameters. Empty bundle if parameters are not included in a query.

getProfileId

Added in API level 36
public String getProfileId ()

Gets profile ID.

A profile ID is a globally unique ID generated and assigned by the system. For profile objects retrieved from system (e.g MediaQualityManager.getAvailablePictureProfiles) this profile ID is non-null; For profiles built locally with Builder, it's null.

Returns
String the unique profile ID; null if the profile is built locally with Builder.

getProfileType

Added in API level 36
public int getProfileType ()

Gets profile type.

Returns
int Value is one of the following:

getStreamStatusVariants

Added in API level 37
public Map<StringPersistableBundle> getStreamStatusVariants ()

Gets the stream status variant parameters.

Returns a map where the key is the stream status. MediaQualityContract.STREAM_STATUS_HDR10 and the value is the parameter bundle associated with that status.

Returns
Map<StringPersistableBundle> A map of status variants. Returns empty map if no variants are defined.

writeToParcel

Added in API level 36
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: