FileDocCategorySizeDatePackage
IAudioService.javaAPI DocAndroid 5.1 API75012Sat Mar 14 05:48:10 GMT 2015android.media

IAudioService

public interface IAudioService implements android.os.IInterface
{@hide}

Fields Summary
Constructors Summary
Methods Summary
public intabandonAudioFocus(android.media.IAudioFocusDispatcher fd, java.lang.String clientId, android.media.AudioAttributes aa)

public voidadjustMasterVolume(int direction, int flags, java.lang.String callingPackage)

public voidadjustStreamVolume(int streamType, int direction, int flags, java.lang.String callingPackage)

public voidadjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags, java.lang.String callingPackage)

public voidavrcpSupportsAbsoluteVolume(java.lang.String address, boolean support)

public voiddisableSafeMediaVolume()

public voidforceRemoteSubmixFullVolume(boolean startForcing, android.os.IBinder cb)

public voidforceVolumeControlStream(int streamType, android.os.IBinder cb)

public intgetCurrentAudioFocus()

public intgetLastAudibleMasterVolume()

public intgetLastAudibleStreamVolume(int streamType)

public intgetMasterMaxVolume()

public intgetMasterStreamType()

public intgetMasterVolume()

public intgetMode()

public intgetRingerModeExternal()

public intgetRingerModeInternal()

public android.media.IRingtonePlayergetRingtonePlayer()

public intgetStreamMaxVolume(int streamType)

public intgetStreamVolume(int streamType)

public intgetVibrateSetting(int vibrateType)

public booleanisBluetoothA2dpOn()

public booleanisBluetoothScoOn()

public booleanisCameraSoundForced()

public booleanisHdmiSystemAudioSupported()

public booleanisMasterMute()

public booleanisSpeakerphoneOn()

public booleanisStreamAffectedByRingerMode(int streamType)

public booleanisStreamMute(int streamType)

public booleanisValidRingerMode(int ringerMode)

public booleanloadSoundEffects()

public voidnotifyVolumeControllerVisible(android.media.IVolumeController controller, boolean visible)

public voidplaySoundEffect(int effectType)

public voidplaySoundEffectVolume(int effectType, float volume)

public java.lang.StringregisterAudioPolicy(android.media.audiopolicy.AudioPolicyConfig policyConfig, android.media.audiopolicy.IAudioPolicyCallback pcb, boolean hasFocusListener)

public booleanregisterRemoteControlDisplay(android.media.IRemoteControlDisplay rcd, int w, int h)
Register an IRemoteControlDisplay. Success of registration is subject to a check on the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission. Notify all IRemoteControlClient of the new display and cause the RemoteControlClient at the top of the stack to update the new display with its information.

param
rcd the IRemoteControlDisplay to register. No effect if null.
param
w the maximum width of the expected bitmap. Negative or zero values indicate this display doesn't need to receive artwork.
param
h the maximum height of the expected bitmap. Negative or zero values indicate this display doesn't need to receive artwork.

public booleanregisterRemoteController(android.media.IRemoteControlDisplay rcd, int w, int h, android.content.ComponentName listenerComp)
Like registerRemoteControlDisplay, but with success being subject to a check on the android.Manifest.permission.MEDIA_CONTENT_CONTROL permission, and if it fails, success is subject to listenerComp being one of the ENABLED_NOTIFICATION_LISTENERS components.

public voidreloadAudioSettings()

public voidremoteControlDisplayUsesBitmapSize(android.media.IRemoteControlDisplay rcd, int w, int h)
Update the size of the artwork used by an IRemoteControlDisplay.

param
rcd the IRemoteControlDisplay with the new artwork size requirement
param
w the maximum width of the expected bitmap. Negative or zero values indicate this display doesn't need to receive artwork.
param
h the maximum height of the expected bitmap. Negative or zero values indicate this display doesn't need to receive artwork.

public voidremoteControlDisplayWantsPlaybackPositionSync(android.media.IRemoteControlDisplay rcd, boolean wantsSync)
Controls whether a remote control display needs periodic checks of the RemoteControlClient playback position to verify that the estimated position has not drifted from the actual position. By default the check is not performed. The IRemoteControlDisplay must have been previously registered for this to have any effect.

param
rcd the IRemoteControlDisplay for which the anti-drift mechanism will be enabled or disabled. Not null.
param
wantsSync if true, RemoteControlClient instances which expose their playback position to the framework will regularly compare the estimated playback position with the actual position, and will update the IRemoteControlDisplay implementation whenever a drift is detected.

public intrequestAudioFocus(android.media.AudioAttributes aa, int durationHint, android.os.IBinder cb, android.media.IAudioFocusDispatcher fd, java.lang.String clientId, java.lang.String callingPackageName, int flags, android.media.audiopolicy.IAudioPolicyCallback pcb)

public intsetBluetoothA2dpDeviceConnectionState(android.bluetooth.BluetoothDevice device, int state, int profile)

public voidsetBluetoothA2dpOn(boolean on)

public voidsetBluetoothScoOn(boolean on)

public intsetFocusPropertiesForPolicy(int duckingBehavior, android.media.audiopolicy.IAudioPolicyCallback pcb)

public intsetHdmiSystemAudioSupported(boolean on)

public voidsetMasterMute(boolean state, int flags, java.lang.String callingPackage, android.os.IBinder cb)

public voidsetMasterVolume(int index, int flags, java.lang.String callingPackage)

public voidsetMicrophoneMute(boolean on, java.lang.String callingPackage)

public voidsetMode(int mode, android.os.IBinder cb)

public voidsetRemoteStreamVolume(int index)

public voidsetRingerModeExternal(int ringerMode, java.lang.String caller)

public voidsetRingerModeInternal(int ringerMode, java.lang.String caller)

public voidsetRingtonePlayer(android.media.IRingtonePlayer player)

public voidsetSpeakerphoneOn(boolean on)

public voidsetStreamMute(int streamType, boolean state, android.os.IBinder cb)

public voidsetStreamSolo(int streamType, boolean state, android.os.IBinder cb)

public voidsetStreamVolume(int streamType, int index, int flags, java.lang.String callingPackage)

public voidsetVibrateSetting(int vibrateType, int vibrateSetting)

public voidsetVolumeController(android.media.IVolumeController controller)

public voidsetWiredDeviceConnectionState(int device, int state, java.lang.String name)

public booleanshouldVibrate(int vibrateType)

public voidstartBluetoothSco(android.os.IBinder cb, int targetSdkVersion)

public voidstartBluetoothScoVirtualCall(android.os.IBinder cb)

public android.media.AudioRoutesInfostartWatchingRoutes(android.media.IAudioRoutesObserver observer)

public voidstopBluetoothSco(android.os.IBinder cb)

public voidunloadSoundEffects()

public voidunregisterAudioFocusClient(java.lang.String clientId)

public voidunregisterAudioPolicyAsync(android.media.audiopolicy.IAudioPolicyCallback pcb)

public voidunregisterRemoteControlDisplay(android.media.IRemoteControlDisplay rcd)
Unregister an IRemoteControlDisplay. No effect if the IRemoteControlDisplay hasn't been successfully registered.

param
rcd the IRemoteControlDisplay to unregister. No effect if null.