Added in API level 36

SoundProfileCallback


abstract class SoundProfileCallback
kotlin.Any
   ↳ android.media.quality.MediaQualityManager.SoundProfileCallback

Callback used to monitor status of sound profiles.

Summary

Public constructors

Public methods
open Unit
onError(profileId: String?, errorCode: Int)

This is invoked when an issue has occurred.

open Unit

This is invoked when parameter capabilities has been changed due to status changes of the content.

open Unit
onSoundProfileAdded(profileId: String, profile: SoundProfile)

This is invoked when a sound profile has been added.

open Unit
onSoundProfileRemoved(profileId: String, profile: SoundProfile)

This is invoked when a sound profile has been removed.

open Unit
onSoundProfileUpdated(profileId: String, profile: SoundProfile)

This is invoked when a sound profile has been updated.

Public constructors

SoundProfileCallback

SoundProfileCallback()

Public methods

onError

Added in API level 36
open fun onError(
    profileId: String?,
    errorCode: Int
): Unit

This is invoked when an issue has occurred.

Parameters
profileId String?: the profile ID related to the error. null if there is no associated profile.
errorCode Int: the error code.
Value is one of the following:

onParameterCapabilitiesChanged

Added in API level 36
open fun onParameterCapabilitiesChanged(
    profileId: String?,
    updatedCaps: MutableList<ParameterCapability!>
): Unit

This is invoked when parameter capabilities has been changed due to status changes of the content.

Parameters
profileId String?: the ID of the profile used by the media content. null if there is no associated profile
updatedCaps MutableList<ParameterCapability!>: the updated capabilities.
This value cannot be null.

onSoundProfileAdded

Added in API level 36
open fun onSoundProfileAdded(
    profileId: String,
    profile: SoundProfile
): Unit

This is invoked when a sound profile has been added.

Parameters
profileId String: the ID of the profile.
This value cannot be null.
profile SoundProfile: the newly added profile.
This value cannot be null.

onSoundProfileRemoved

Added in API level 36
open fun onSoundProfileRemoved(
    profileId: String,
    profile: SoundProfile
): Unit

This is invoked when a sound profile has been removed.

Parameters
profileId String: the ID of the profile.
This value cannot be null.
profile SoundProfile: the removed profile.
This value cannot be null.

onSoundProfileUpdated

Added in API level 36
open fun onSoundProfileUpdated(
    profileId: String,
    profile: SoundProfile
): Unit

This is invoked when a sound profile has been updated.

Parameters
profileId String: the ID of the profile.
This value cannot be null.
profile SoundProfile: the profile with updated info.
This value cannot be null.