Add per user versions of mute methods so
device policy manager can mute the correct
user.
Just persist change if the calling user
isn't the current user.
Treat calls to audio manager coming from uid
1000 as if they were coming from current user
rather than user 0 so that the correct user's
user restriction is checked.
Bug: 21782066
Bug: 21778905
Change-Id: I51469b741096d8a2ffdc520eaf5b3fd754f2c819
It ends up that MediaProvider is persisting MTP storage IDs in its
database, so we need to make sure we generate stable IDs over time,
otherwise we can end up looking into a black hole.
Bug: 22256092
Change-Id: I6a75c239aac1b71fd5f6df0df69b24971079a086
Throw IllegalStateException when queueing or dequeueing an
image if the input surface is already abandoned by the consumer.
Also fix a crash when planes are not initialized when closing
ImageWriter.
Bug: 22279111
Change-Id: I8301920d64a53c45b29e947e52ff323733abbf16
Source and destination images may have different alignment requirements,
therefore may have different strides. Copy row by row for such case.
Bug: 21934891
Change-Id: Id53f45f1429d233032fa608f7ab9e2774e88c13b
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
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