When MediaProjection sets the session details in
MediaProjectiondManagerService, clear and re-set the
calling identity (since we have entered the system server
across the aidl boundary).
Additionaly, verify that the call originated from a valid
MediaProjection session. In the current model for
MediaProjection, signature-level permission
MANAGE_MEDIA_PROJECTION is held by the component that shows the
acceptance dialog to the user. The user allowing some app to
capture with MediaProjection is represented by
the IMediaProjection token (see MediaProjectionManagerService#
isValidMediaProjection).
Bug: 230748205
Test: Manual
Change-Id: Iace8eb7eea6c7a99fba7ea726481461a11bd1c90
Expand documentation for AudioTrack.play() to include get and set start
threshold from Android S.
Bug: 192920591
Test: N/A, only changes documentation
Change-Id: Ibb4da2c3f5239b480c49e7bcbaae5b50ef5d01d3
Currently, multiple absolute volume listeners from the same controller
can be notified of volume change events because old ones are not removed
from AudioDeviceVolumeManager.
This CL removes existing listeners for a device when a new one is added.
We also no longer forbid re-adding a listener currently in
AudioDeviceVolumeManager's list, as it might have been removed from
AudioService.
Bug: 231433390
Test: manual; atest android.hdmicec.cts.playback.HdmiCecAvcToTvTest
Change-Id: If7ecd58880001b955565e0f65ede9f0787e1be49
SurfaceImage's `close` method is not thread safe but can be called by
multiple threads. If two threads call `SurfaceImage#close`
simulatneously, it can cause ImageReader to throw
IllegalArgumentException.
This CL synchronizes the `close` method to prevent spurious exceptions
from being thrown when multiple threads attempt to close a SurfaceImage.
Bug: 223447712
Test: All existing CTS tests pass on Oriole
Change-Id: I49426b771736e378862e1550124e65c26f5d7c1b
Implement callback from AudioPolicy to resend volume ranges
when requested, after an error in volume min/max indices was
detected by AudioPolicyManager
Bug: 206966260
Test: adb shell dumpsys audio | grep MSG_VOL_RANGE_INIT_REQ
Change-Id: Ic257f8007c2908e3c5e6c648cca7598993e8f93e
On native audioserver recovery the assistant UIDs will reset to an empty
list, followed by adding the current role or setting holder for
assistant. Also added a settings lock around the update assistant
method. Added remove assistant UID for reset hotword detection
connection.
Bug: 222584963
Bug: 222777782
Test: atest VoiceInteractionTest
Test: atest AudioManagerTest
Test: atest HotwordDetectionServiceBasicTest
Test: kill audio server and verify assistant UIDs is not increasing
unbounded.
Test: adb shell cmd voiceinteraction restart-detection, verify assistant
UIDs list is not increasing unbounded.
Change-Id: I475bfee1f0bcd56a750e4fef8aa8a2b93fe090fc
observations about missing action in close().
javadoc on some KEY_* fields.
Implement PlaybackStateEvent within BundleSession as example.
Bug: 220129161
Test: atest CtsMediaHostTestCases (with corresponding CLs for cts)
Change-Id: I09a8be6d3f2780ca97b6b08cd33ccf35b02c245f
- Adds a map to store information about audio devices using absolute
volume behavior. The map is updated when devices change behavior.
- setStreamVolume and adjustStreamVolume now notify absolute volume
listeners after changing the stream state.
- Added option for absolute volume dispatcher to dispatch abstract
volume adjustments (e.g. raise, lower, mute) as a result of calls to
adjustStreamVolume. When registering the listener, the controller
specifies whether it handles adjustments; if it does, future calls to
adjustStreamVolume are forwarded to the controller without affecting
stream state.
- Refactoring to support the changes above:
- rescaleIndex is generalized to allow converting between stream and
absolute volume ranges.
- Volume adjustment mode constants are moved into
AudioDeviceVolumeManager because they are needed when dispatching
volume adjustments to absolute volume controllers.
Bug: 205817863
Test: atest AbsoluteVolumeBehaviorTest
Change-Id: Ie5fb2179adea2096bd2d226fe73b4f09b28b0cf1
Add APIs for registering and unregistering a listener
for changes to any device's volume behavior.
Bug: 201781907
Test: atest DeviceVolumeBehaviorTest
Change-Id: I75b6463a73109e624ffd14b14bae3f829974f3ea