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
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
Legacy shim overrides HAL_PIXEL_FORMAT_BLOB to
HAL_PIXEL_FORMAT_RGBA_8888. Make ImageReader aware of the
workaround when returning the format.
Remove the workaround in legacy shim that overrides YUV_420_888
to YV12 because allocating YUV_420_888 buffers with SW access
is supported on Flo.
Bug: 21707937
Change-Id: I84a8610c82ae986a0064873f611e4f257baf1774
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
This made it unsafe to open ports on a device from the MidiManager onDeviceOpened callback
Bug: 21760692
Change-Id: I536acdf574a3ccecdb66a8fde87089538e8bb1ef
MediaPlayerStressTest some media files are missing on the results as they
were reported neither completed nor erroneous.
This case will fall into a new category named unknown playback state so that
we could track them in media dashboard.
Bug: 21755950
Change-Id: Iefcc3e375c63d952a7d9edb418208209d87b9e08