Define 4 new properties that can be used to override the default
notification and ringtone volume number of steps and default value.
Throw IllegalArgumentException when max volume is not strictly
positive, if default volume is greater than max volume or
lower than min volume.
Bug: 228180814
Test: dumpsys audio to check default/max for notif/ring
Change-Id: Ib12fd2207b1201ced4bc838892ed23d10e45c3c9
Add API in AudioDeviceVolumeManager that allows setting
volume for a specific audio device.
Bug: 236764441
Test: atest AudioDeviceVolumeManagerTest
Change-Id: Iebb277b35dbf5aa49c1fd4a8ec6dd904afa11ad9
Add support for associating an initial volume with a BLE
connection:
- add volume info to BluetoothProfileConnectionInfo in a new
BLE output factory method
- when handling device connection for BLE, also check if
volume information from the connection information is available.
Bug: 233975367
Test: atest frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/BluetoothProfileConnectionInfoTest.java
Change-Id: Ib54267727bc4d47e6999f2b84eab805f23c4955a
The launch cookie of the target task will be provided by SysUI;
convert this to the WindowContainerToken so the ContentRecorder
can capture the correct layer of the hierarchy.
Bug: 235984372
Test: atest WmTests:WindowManagerServiceTests
Change-Id: I52f69cd078dd5b8ba6cb5b1c292423773dbd8123
This CL add support for Opus as an A2DP codec in Audio Framework and
selection of the codec in Developer Options.
Bug: 226441860
Test: Sink device using bds-dev
Change-Id: I1d68209e8f996e78adeed03b77a3ee9cacda6307
The API says that null is returned, but an exception was thrown.
Also correct a misleading word in the getAll description.
Bug: 232286218
Change-Id: Iee336628753fad29bb5fccff211e4997fb51a99b
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