AudioPresentation.Builder


public static final class AudioPresentation.Builder
extends Object

java.lang.Object
   ↳ android.media.AudioPresentation.Builder


A builder class for creating AudioPresentation objects.

Summary

Public constructors

Builder(int presentationId)

Create a Builder.

Public methods

AudioPresentation build()

Creates a AudioPresentation instance with the specified fields.

AudioPresentation.Builder setHasAudioDescription(boolean audioDescriptionAvailable)

Indicate whether the presentation contains audio description for the visually impaired.

AudioPresentation.Builder setHasDialogueEnhancement(boolean dialogueEnhancementAvailable)

Indicate whether the presentation supports dialogue enhancement.

AudioPresentation.Builder setHasSpokenSubtitles(boolean spokenSubtitlesAvailable)

Indicate whether the presentation contains spoken subtitles for the visually impaired.

AudioPresentation.Builder setLabels(Map<ULocaleCharSequence> labels)

Sets locale / text label pairs describing the presentation.

AudioPresentation.Builder setLocale(ULocale language)

Sets the language information of the audio presentation.

AudioPresentation.Builder setMasteringIndication(int masteringIndication)

Sets the mastering indication.

AudioPresentation.Builder setProgramId(int programId)

Sets the ProgramId to which this audio presentation refers.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 29
public Builder (int presentationId)

Create a Builder. Any field that should be included in the AudioPresentation must be added.

Parameters
presentationId int: The presentation ID of this audio presentation.

Public methods

build

Added in API level 29
public AudioPresentation build ()

Creates a AudioPresentation instance with the specified fields.

Returns
AudioPresentation The new AudioPresentation instance This value cannot be null.

setHasAudioDescription

Added in API level 29
public AudioPresentation.Builder setHasAudioDescription (boolean audioDescriptionAvailable)

Indicate whether the presentation contains audio description for the visually impaired.

Parameters
audioDescriptionAvailable boolean: Audio description for the visually impaired.

Returns
AudioPresentation.Builder This value cannot be null.

setHasDialogueEnhancement

Added in API level 29
public AudioPresentation.Builder setHasDialogueEnhancement (boolean dialogueEnhancementAvailable)

Indicate whether the presentation supports dialogue enhancement.

Parameters
dialogueEnhancementAvailable boolean: Dialogue enhancement.

Returns
AudioPresentation.Builder This value cannot be null.

setHasSpokenSubtitles

Added in API level 29
public AudioPresentation.Builder setHasSpokenSubtitles (boolean spokenSubtitlesAvailable)

Indicate whether the presentation contains spoken subtitles for the visually impaired.

Parameters
spokenSubtitlesAvailable boolean: Spoken subtitles for the visually impaired.

Returns
AudioPresentation.Builder This value cannot be null.

setLabels

Added in API level 29
public AudioPresentation.Builder setLabels (Map<ULocaleCharSequence> labels)

Sets locale / text label pairs describing the presentation.

Parameters
labels Map: Text label indexed by its locale corresponding to the language code. This value cannot be null.

Returns
AudioPresentation.Builder This value cannot be null.

setLocale

Added in API level 29
public AudioPresentation.Builder setLocale (ULocale language)

Sets the language information of the audio presentation.

Parameters
language ULocale: Locale corresponding to ISO 639-1/639-2 language code. This value cannot be null.

Returns
AudioPresentation.Builder This value cannot be null.

setMasteringIndication

Added in API level 29
public AudioPresentation.Builder setMasteringIndication (int masteringIndication)

Sets the mastering indication.

Returns
AudioPresentation.Builder This value cannot be null.

setProgramId

Added in API level 29
public AudioPresentation.Builder setProgramId (int programId)

Sets the ProgramId to which this audio presentation refers.

Parameters
programId int: The program ID to be decoded.

Returns
AudioPresentation.Builder This value cannot be null.