Define a new extra, AudioManager.EXTRA_VOLUME_STREAM_TYPE_ALIAS, to be
sent along with the volume change intent, VOLUME_CHANGED_ACTION.
When sending VOLUME_CHANGED_ACTION, attach the stream type alias.
Bug 17955277
Change-Id: I04fd279e223504e3ee1581086d7e9205344a6808
In order to reduce the number of binder calls, only install an
audio port callback in a client process if either:
- an audio port related API has been called once
- an audio port listenr has been registered.
Bug: 22045560.
Change-Id: I0e5cf31bec0c986d6f7761891b860ba6fadd2f4c
setDataSource(String) throws an IllegalArgumentException
when an IOException or FileNotFoundException occurs, but doesn't
close FileDescriptor accordingly.
Change-Id: Ib6e0f1418afeeb19e03abd4bedb4cc845a58b6b4
This allows applications to specify not only channels but also programs
searchable or not enabling finer grained access control.
Bug: 18910284
Change-Id: Id476c37ae8521301c50a4fb2007b41661e74fe89
The app-linking allows channel input sources to provide activity links
from their live channel programming to another activity. This enables
content providers to increase user engagement by offering the viewer
other content or actions.
Bug: 21884742
Change-Id: Iabeea57884c63ac31ee164c27c6e2fe1860f15f6
Update device server's MidiDeviceStatus when a connection is made to one of its output ports.
After connecting an input port to an output port using MidiDevice.connectPorts(),
do not call IMidiDeviceServer.closePort() until MidiDevice.MidiConnection.close() is called.
While I was in there, added missing CloseGuard support to the MidiDevice.MidiConnection class.
This fixes a problem resulting in UsbMidiDevice closing the device's ALSA driver too soon.
Bug: 21850709
Change-Id: I0c120f76b42eec8a143161e46dba73fbec5e4f31
Backgroud: As noted in b/20823981, MediaSessionService calls some
audio service methods while holding a lock and the audio service
methods also talk to other system services. And, deadlock happens when
the other system service fires another request to MediaSessionService
while holding its lock.
Example1) --- resolved by the change in MediaSessionRecord.java
T1: MediaSessionService.dispatchAdjustVolumeLocked()
-> MediaSessionRecord.adjustVolume()
-> +++AudioServiceInternal.adjustSuggestedStreamVolumeForUid()+++
-> AudioService.adjustSuggestedStreamVolume()
-> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
-> MediaSession.setActive()
-> MediaSessionRecord$SessionStub.setActive()
-> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.
Example2) --- resolved by the change in IAudioService.aidl
T1: MediaSessionService.dispatchAdjustVolumeLocked()
-> IAudioService.adjustSuggestedStreamVolume()
-> AudioService.adjustSuggestedStreamVolume()
-> telecom.TelecomManager.isInCall() --- blocked by lock in TelecomManager.
T2: telecom.ConnectionServiceWrapper.handleCreateConnectionComplete()
-> MediaSession.setActive()
-> MediaSessionRecord$SessionStub.setActive()
-> MediaSessionService.updateSession() --- blocked by lock in MediaSessionService.
Here, this change prevents the deadlock by making related audio IPC oneway
and calling the internal audio method without holding the lock.
Bug: 20823981
Change-Id: I4c4b2fc796f23d83be67f7edaacd7496c145d985
If DEAD_OBJECT is returned from binder calls due to
mediaserver crash, throw new MediaDrmResetException.
This allows the app to detect the condition and handle
it properly.
bug: 20614102
Change-Id: Id08b08fb612672fd94383f0470f5fa3f267b944f
Should throw UnsupportedOperationException instead of returning
an uninitialized track object.
Bug: 21890643
Change-Id: I34df73b316fcb490be05eb3beff06b795645fd4c
Should throw UnsupportedOperationException instead of returning
an uninitialized record object.
Bug: 21890643
Change-Id: I9c05a4cff9f5e1d5513c76acace09699a567008f